最佳答案
参见 Turbo C user manual第 430 页:
Inline assembly not allowed
Your source file contains inline assembly language statements and you are compiling it from within the Integrated Environment. You must use the TCC command to compile this source file.
我相信您还需要将 -B
选项传递给 TCC(第 455 页)。
或者,您可以使用 __emit__
(第 103 页)将相对简单的代码输入为机器代码而不是汇编助记符。
在 IDE 中不允许内联汇编似乎是一个奇怪的限制。您可能会考虑“升级”到我认为允许的 Turbo C++ 3.0。我想 TC++ 会在出现 .c 文件时编译 C 代码,或者可以将 IDE 设置为显式编译 C。有一个 manual也是为了那个。
关于c - 如何使用 Turbo C 2.01 编写内联汇编?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47580731/