ASM: operand size prefix
Posted: Wed Apr 09, 2008 11:32 pm
Hi,
My code is *16bit*, compiled with gcc using ".code16gcc". The "far ret" instruction is compiled like this (reversed using ndisasm):
66CB o32 retf
In which "66" is operand size prefix, "CB" is opcode of "retf".
The question is: Is this true that in this case, "retf" will take *32bit* address from the top of stack as returned address?? (normally 16bit code only takes 16bit returned address from stack)
Thanks,
J
My code is *16bit*, compiled with gcc using ".code16gcc". The "far ret" instruction is compiled like this (reversed using ndisasm):
66CB o32 retf
In which "66" is operand size prefix, "CB" is opcode of "retf".
The question is: Is this true that in this case, "retf" will take *32bit* address from the top of stack as returned address?? (normally 16bit code only takes 16bit returned address from stack)
Thanks,
J