On Tue, 16 Dec 2003 19:54:25 -0500, Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 11:38 PM +0000 12/16/03, Pete Lomax wrote:Hi, I've hit a very strange problem:
set N18, 86 save N18 restore N18
Solved. I forgot I was using -O2 when executing via CreateProcessA, which I wasn't when running at the DOS prompt. Under -O2 the above code outputs:
set N18, 86 save 86 restore N18
which explains things. I'll stop using -O2 (for now).
Maybe pushing an int and popping a num should be allowed?
I've considered making pop autoconverting, but the assumption at the moment is that only compiler-generated code (and the odd hand-written stuff) will be pushing and popping things onto the stack, so if there's a type mismatch it indicates a problem. It does make conversion a pop/set combo rather than just a pop, but I'm not sure that's a problem. Also, if we disallow autoconversion we can possibly shrink down the size of stack entries some by not keeping the type information around at all. (Though that has the possibility of exploitation by malicious code and DOD issues, so it's probably not worth it)
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk