It was thus said that the Great Michael B. Brutman once stated:
DEC bigots can skip this message safely. :-)
I've been working on a TCP/IP stack for my beloved PCjr. There are
already TCP/IP stacks that run on it, but that's not the point.
Borrowing a page from Tony's book, I decided to write my own so that I
could fix the inevitable bugs.
You're writing a TCP/IP stack for the PCjr in C++?
I'd say get away from C++ and find a C compiler. Smaller code, less
headaches.
Anyway, I'm interested in reducing memory
consumption. Any complex code
involves tradeoffs between function and performance, and I've been
careful, but one thing that is bothering me is the initialization code.
I've got a fair amount of code that reads environment variables, talks
to the packet driver, and sets up data structures. The nature of the
code is that it runs once, and then just sits there consuming memory.
How much code are we talking about here? IP itself isn't terribly complex
(UDP isn't much harder, although TCP is). The only thing I see being
required for setup is IP address, netmask, gateway (broadcast can be figured
out with the IP and netmask)---anything else (like DNS) can be added later I
would think.
Any ideas? The only one I can think of is kind of
brute force ... have
two apps, one that inits everything and leaves the storage resident, and
another that refers to that resident storage. (I was hoping for
something simpler in the Borland runtime support.)
Sorry, been too long since I last did MS-DOS programming (although if I
were to do it, I'd probably do it in Assembly, and reuse the init portion as
data space later on ... )
-spc (My second computer was a PCjr ... did quite a bit of development on
it, mostly assembler ... )