Looking for 16-bit c compiler for x86 [closed]

天涯浪子 提交于 2019-11-29 03:56:27

Check out the FreeDOS project. They have developer tools that include compilers, assemblers, and linkers. You'll probably have to modify the standard library, though, so that it uses BIOS calls rather than int 21h.

Peter Teoh

16-bit compilers? Several of them are mentioned here:

Is there a C compiler that targets the 8086?

Generally they are used for academic exercises, so if u target at educational institution you can find lots of examples too:

http://www.google.com.sg/search?q=site%3Aedu+C+compiler+8086

At a former job we had a project that was based on uc/OS running on a real-mode x86 platform. We used TopSpeed C rather than the more well-known Borland or Microsoft compilers, because TopSpeed C was the only one of the set available and viable at the time that got volatile right. Which you dearly need when building uc/OS. Both Turbo C and Microsoft C (and I think its QuickC too) miscompiled accesses to volatile variables - typically caching values in registers and similar breakage.

You'd have a hard time getting hold of TopSpeed C, though. And its assembler syntax is... unique. (I think it's based on Modula-2 or something; it ends up being very unlike MASM/TASM/nasm with which you may be 100 times more familiar.)

Check out any bootloader project, such as GRUB. It should be readily apparent that they also need everything you mentioned.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!