FASM 使用 jmp 运行错误

发布于 2024-09-13 11:38:18 字数 521 浏览 2 评论 0原文

我已经开始从本教程学习 16 位汇编(最终升级到 32 位): http://matthew-4gl.wikispaces.com/fasm_tutorial 我正在对平面汇编器版本 1.69 进行一些测试和实践 我进入了教程中有关跳转的部分,以及 jmp 指令的使用。然而,无论我做什么,即使我只是复制一些示例代码并将其粘贴进去,当我运行程序本身时,一旦它到达告诉它跳转的部分,它就会开始混乱 在本例中,这是直接从教程中取出的一些代码

org 256
jmp Start
text db 'Text to output'
Start:
mov ah,9
mov dx,text
int 21h
int 20h

,命令框显示“要输出的文本”,后面跟着一堆垃圾行。它还会发出很大的嘟嘟声,持续大约二十行才停止。 我相当确定这不是代码的问题。教程中是否缺少有关 FASM 和跳跃的内容?

I've started learning 16-bit assembly (eventually moving up to 32-bit) from this tutorial here:
http://matthew-4gl.wikispaces.com/fasm_tutorial
and I am doing a few tests and practices on the flat assembler version 1.69
I got to the part in the tutorial on jumps, and the use of the jmp instruction. No matter what I do, however, even when I just copy some of the example code and paste it in, when I run the program itself, as soon as it gets to a part that tells it to jump, it starts to mess up
here's some code straight out of the tutorial

org 256
jmp Start
text db 'Text to output'
Start:
mov ah,9
mov dx,text
int 21h
int 20h

in this case, the command box says Text to output and is followed by a bunch of lines of garbage. It also beeps really loudly and goes on for about twenty lines before stopping.
I'm fairly certain this isn't a problem with the code. is there something about FASM and jumping that the tutorial is missing?

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

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

发布评论

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

评论(1

幽梦紫曦~ 2024-09-20 11:38:18

您需要使用 $

text db 'Text to output$'终止您的字符串

You need to terminate your string with a $

text db 'Text to output$'

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