Ronald G Minnich <[EMAIL PROTECTED]> writes: > On Wed, 6 Feb 2002, Eric Seppanen wrote: > > > I have also had problems with gcc not correctly generating 16-bit code > > is some cases (in mixed 16/32bit code where symbols need to be resolved > > later by the linker). I was not able to find a solution; maybe another > > assembler would work better. > > > my solution was to let nasm assemble it and then put the bytes into the .S > file with the .byte operator
Hmm. So far I haven't had problems with using .code16 / .code32 to specify what kind of code I wanted to use. And if you actually want to compile C code there is a .code16_gcc, that assembles gcc's normal 32 bit assembly so it runs in 16 bit mode. It is still 32 bit code and will only run on a 386+, but it runs fine in real mode. Eric