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
ASM: operand size prefix
hi James,
Yes, programming 16bit code with gcc is tricky, but I think it is worth that.
1. gcc is de-factor compiler, and available everywhere.
2. C code is always better than assembly in term of maintain and hack.
Some says that OpenWatcom is a good compiler for 16bit code, but I havent tried that yet.
Thanks,
J
Yes, programming 16bit code with gcc is tricky, but I think it is worth that.
1. gcc is de-factor compiler, and available everywhere.
2. C code is always better than assembly in term of maintain and hack.
Some says that OpenWatcom is a good compiler for 16bit code, but I havent tried that yet.
Thanks,
J
Might be, but ".code16" is an arkane and seldom-used (thus not well-tested) feature. Expect all kinds of quirks to come from this, with little hope for help...junkoi wrote:1. gcc is de-factor compiler, and available everywhere.
2. C code is always better than assembly in term of maintain and hack.
Every good solution is obvious once you've found it.
http://www.osdev.org/phpBB2/viewtopic.php?t=14157
--
PS: dev86 include bcc
http://homepage.ntlworld.com/robert.deb ... .17.tar.gz
--
PS: dev86 include bcc
http://homepage.ntlworld.com/robert.deb ... .17.tar.gz