"Cranky" <spamtrap@[EMAIL PROTECTED]
> wrote in message
news:e7f84580-90d3-4416-9fd3-b22663ee7dbd@[EMAIL PROTECTED]
> Using an operand override with a segment push in RM seems to push the
> lower 16bits of EFlags onto the stack as well as the segment register
> i.e.
>
> db 66
> push ds
> pop ax
> pop bx
>
> will produce ax=ds, bx=flags on my P3. Is this normal or just an
> example of 'undefined'
>
Using "db 0x66" - operand size override, you told "push" to push a 32-bit
operand onto a 16-bit stack:
....
ELSE StackAddrSize = 16
IF OperandSize = 16
THEN
...
ELSE (* OperandSize = 32 *)
SP <- (SP - 4);
SS:SP <- SRC; (* Push doubleword *)
FI;
FI;
But, DS is only 16-bits so "push" must get 16 more bits from somewhere...
For FS or GS, Intel defines the outcome of pu****ng the additional 16-bits:
"If the source operand is the FS or GS and its size is less than the
address
size of the stack, the zero-extended value is pushed on the stack."
Rod Pemberton


|