How to use GCC to compile C code to build 8088?

I was looking for some of the information and could not find it, maybe you guys could give me a hand. This is a simple question:

  • How to use GCC to compile C code to assembly 8088?

I am coding a small program in assembly 8088 and would like to know how some things are done by the compiler, it would be very cool.

Thanks!

+7
source share
4 answers

There is a 16-bit version of djgpp (which is based on gcc) that is said to be able to generate 8086/88 code here

+1
source

The -S flag creates assembler output, although not these days for 8088.

gcc -S myfile.c 

The output will be in the file myfile.s.

+2
source

GCC allows you to specify the target architecture of a machine using -mtune = cpu-arch, but it currently does not support i8088. Supported architectures - i386 and newer architectures.

+2
source

If you can consider other compilers, there is always OpenWatcom, which is open source and will generate 16-bit code.

+2
source

All Articles