<分区>
我有一个 8086 CPU 模拟器。它仅模拟 8086 条指令。我现在正在寻找一个 C 编译器来定位这个模拟器。有没有可以做到这一点的 C 编译器?
此外,拥有可用的 libc 等对我来说并不重要。模拟器使用自定义(即非 PC)硬件,因此任何 libc 甚至 ctr0 都可能不得不重写
<分区>
我有一个 8086 CPU 模拟器。它仅模拟 8086 条指令。我现在正在寻找一个 C 编译器来定位这个模拟器。有没有可以做到这一点的 C 编译器?
此外,拥有可用的 libc 等对我来说并不重要。模拟器使用自定义(即非 PC)硬件,因此任何 libc 甚至 ctr0 都可能不得不重写
最佳答案
bcc - Bruce 的 C 编译器
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/