c - 有针对 8086 的 C 编译器吗?

标签 c compiler-construction x86 x86-16

<分区>

我有一个 8086 CPU 模拟器。它仅模拟 8086 条指令。我现在正在寻找一个 C 编译器来定位这个模拟器。有没有可以做到这一点的 C 编译器?

此外,拥有可用的 libc 等对我来说并不重要。模拟器使用自定义(即非 PC)硬件,因此任何 libc 甚至 ctr0 都可能不得不重写

最佳答案

bcc - Bruce 的 C 编译器

来自 bcc(1) - Linux man page :

Description

Bcc is a simple C compiler that produces 8086 assembler, in addition compiler compile time options allow 80386 or 6809 versions. The compiler understands traditional K&R C with just the restriction that bit fields are mapped to one of the other integer types.

The default operation is to produce an 8086 executable called a.out from the source file.

打开 Watcom

来自Open Watcom C/C++ User’s Guide中编译器选项/80x86运行时约定0的描述(PDF 链接):

(16-bit only) The compiler will make use of only 8086 instructions in the generated object code. This is the default. The resulting code will run on 8086 and all upward compatible processors. The macro __SW_0 will be predefined if "0" is selected

关于c - 有针对 8086 的 C 编译器吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4493035/

相关文章:

c++ - 为什么我们在从 main() 返回时遵循相反的约定?

c - 没有递归的二叉搜索树插入 C

c - 如何使用 opengl 函数制作用于在 c 中绘制 3D 点的 3D 窗口?

c++ - 当值变得很小时,为什么这些计算需要多 20 倍的时间

C - _IOLBF 自定义缓冲区不加载单行

c++ - 使用 CodeBlocks 忽略在 C++ 中调用 main 函数

c - 有没有办法在 C switch 语句中使用指针?

unix - OCaml:如何获取*当前模块*/我的项目目录的路径?

assembly - 在x86中 "test eax,eax"和 "cmp eax,0"有什么区别

汇编语言编程提示和技巧