Hi!

chris evans wrote:

That is true, ss:sp will always be set to some address. I seen programs that don't initialize SS:SP at start.

     All programs, compiled by OpenWatcom in non-tiny memory model are such.

In that case one would think that would default to whatever was set prior to it being run (i.e. Dos stack).

Wrong think. For .com programs, SS points to PSP, SP equal to 0xFFFE (or less, if there is less than 64k of free memory to run program - for example, in UMB). For .exe files, +SS:SP always specified in header - this is why program doesn't not need to change SS:SP after start explicitly, this may be performed by linker (if stack size and placement if fixed inside program image). DOS stacks are irrelevant there.

Even though the linker will emit a warning 'No Stack'.

This warning only means, that linker doesn't found in object files explicit segment with STACK attribute. Then for .exe program it inserts its own, default segment (512 bytes in size, AFAIR).

if the program doesn't need it then that will be normal, abeit will have to be careful.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to