开发者

FASM running error with jmp

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,开发者_如何学C 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?


You need to terminate your string with a $

text db 'Text to output$'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜