>> I tried compiling my code with Watcom. I got extremely strange behaviour >> - >> the compiler planted stack checking calls, and the stack checks were >> *convinced* I needed vast amounts of stack space to proceed with even >> the >> first function call out of main(). (I make very little use of the >> stack.) > > That's because OpenWatcom's default calling convention uses the stack > to pass arguments. To change the default calling convention to, say, > something like __cdecl, there should be a compiler option.
No, there was something much more dire than that going on. My whole call tree doesn't go more that 8 or 10 functions deep, and it's a rare function that gets passed more than a pair of ints. Certainly no passing of structs or anything large. And no large automatic varibles or arrays, either. So maybe a few hundred words total might have been needed, but it was claiming many thousands. And it apparently calculated the maximum necessary depth at every point in the call tree, because it would trigger a stack overflow on the first call out of main - which made it impossible to figure out which function it really thought, way down the tree, needed all the space. After a half hour of banging around, I downloaded DM, and there were no stack problems. > You don't need a 32-bit DOS kernel, but a 16-bit DOS kernel (like > freedos's) and a DOS extender like cwsdpmi, dos32a, etc... I'm hoping I don't even need the extender. Unless waterloo TCP is ginormous, there's no reason why my code, DOS, and a packet driver shouldn't fit in 640K. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Freedos-user mailing list Freedosfirstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/freedos-user