NASM 和关于 ADC 的问题 - ASM 8086

发布于 2024-08-29 22:46:57 字数 202 浏览 5 评论 0原文

我在高中学习汇编,我想尝试在家制作汇编程序。
我下载了 NASM,但我不明白如何用它运行 .s 文件 - 如果你可以在这里编写一个简单的方法来运行它,我很高兴:-)

另外我有一个问题:当我使用 ADC 时例如:AL = 01 和 BL = 02,CF = 1,当我这样做时: ADC AL、BL AL会是3还是4? (加了CF还是不加了?)

谢谢!!

I study assembly on High-school and I would like to try to make assembly programs at home.
I downloaded NASM but I don't understand how to run the .s files with it - if you can write a simple way here to run it I'd glad :-)

and in addition I have a question: when I use ADC for exmaple: AL = 01 and BL = 02, and CF = 1, when I make this:
ADC AL,BL
Will AL be 3 or 4? (with the CF addition or without?)

Thank you!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遥远的绿洲 2024-09-05 22:46:57

从命令提示符(Linux 的 bash):

nasm myasm.s -o myasm.bin -f bin

这是基本的命令行结构。我不知道你在哪个操作系统上编写,但对于 Linux 使用:

nasm -h  // (I believe, or --help)

用于命令参数列表。

无论如何,-o 告诉 nasm 输出文件是什么,-f 告诉 nasm 格式是什么。在此示例中,我们只是编写一个平面二进制文件。

有关更多信息,请参阅编译汇编程序。 .

有关使用 ADC 的更多信息,请参阅此问题

From your command prompt (bash for Linux):

nasm myasm.s -o myasm.bin -f bin

This is the basic command line structure. I don't know which OS you are writing on, but for Linux use:

nasm -h  // (I believe, or --help)

for a list of command parameters.

Anyway, the -o tells nasm what the output file is, and the -f tells nasm what the format is. In this example, we are simply writing a flat binary.

For a lot more information see Compiling an assembly program...

For more information on using ADC, see this question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文