Hi,
How can I write 16bit code using GCC?
Thanks.
16Bit C Code
Re:16Bit C Code
Short answer: you don't.
Long answer: insert the __asm__(".code16gcc") directive at the top of your source file and find a linker which will output 16-bit code properly. gcc and ld were designed to support only 32-bit flat code; 16-bit code is segmented.
Useful answer: download Turbo C or Borland C++ and use that.
Long answer: insert the __asm__(".code16gcc") directive at the top of your source file and find a linker which will output 16-bit code properly. gcc and ld were designed to support only 32-bit flat code; 16-bit code is segmented.
Useful answer: download Turbo C or Borland C++ and use that.