本文介绍了有没有针对8086 C编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个8086的CPU仿真器。它模拟只有8086指令。我现在正在寻找一个C编译器瞄准这一仿真器。是否有任何C语言编译器,有可以做到这一点?

I have an 8086 CPU emulator. It emulates only 8086 instructions. I am searching now for a C compiler to target this emulator with. Is there any C compiler out there that can do this?

另外,有一个可用的libc和这样的对我来说并不重要。仿真器使用自定义的(即非PC)的硬件和任何为此libc的,甚至CTR0很可能必须重写反正

Also, having a usable libc and such is not important to me. The emulator uses custom(ie, non-PC) hardware and therefor any libc or even ctr0 would probably have to be rewritten anyway

推荐答案

BCC - 布鲁斯的C编译器

BCC(1) - Linux手册页的:

说明

密件是一个简单的C编译器产生8086汇编,除了编译器来编译时间选项允许80386或6809的版本。编译器理解传统的K&安培; R C与只是位域映射到其它整数类型之一限制

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.

默认操作是从源文件生成可执行的8086名为a.out的。

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

打开在Watcom

这是编译器选项/ 80x86的运行时间约定在(PDF链接):

From the description of compiler option / 80x86 run-time convention 0 in Open Watcom C/C++ User’s Guide (PDF link):

(仅16位)编译器将利用在生成的对象code仅8086指令。这是在
  默认。由此产生的code将在8086和所有向上兼容的处理器上运行。宏__SW_0
  会如果0被选择predefined

这篇关于有没有针对8086 C编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 19:02