views:

29

answers:

1

Hello, 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?

+3  A: 

You need to terminate your string with a $

text db 'Text to output$'

crowne
oh yeah...the tutorial even mentioned that in previous chapters...thanks a lot!
Jaynathan Leung