DG> Setting SP 2 bytes above is something I never thought of,
DG> and would work in all situations.. unless, of course, one is working
DG> with an XT, in which case SP is decremented after the write.
actually on an XT it's decremented before the write, and the new v
alue is stored at SS:(SP) I just tested it.
on my 486 the old (un-decremented) value is stored at the new
(decremented) address.
in other words...
start with SP=FFEE , then do push SP
xt SS:[FFEC] = FFEC
486 SS:[FFEC] = FFEE
end with SP=FFEC
Someone said you could initialise SP to 2 bytes _past_ then end of
stack segment and then push a Dword, I don't think that'll work
because the cpu will attempt to write the last 2 bytes of the dword
past the end of the stack segment, (won't that cause a SEGV and
that'll cause a double-fault :) ) i think pointing to the first
non-stack-segment asddress is the highest you can go with SP.
--- EzyQwk V1.20
---------------
* Origin: CSS Brisbane, Qld, Australia. (61-7-3367-3890) (3:640/350)
|