Re: debug and the newbe



On Aug 28, 12:29 pm, "Jean Pierre Daviau" <O...@xxxxxxxxxx> wrote:
Hi everybody,

Please tell me whats wrong with that small dot com
----
-a 100
0DF1:0100 mov ah,09
0DF1:0102 mov dx, 107
0DF1:0105 int 21
0DF1:0107 "Allo"

Using that Interrupt function requires the string to be terminated
with $. Also, it looks like your program will crash since there is no
means to exit the program and the program flows directly into the
data. Here is a more appropriate example, written in NASM.

ORG 0x100
[BITS 16]

;Print the String
mov ah,9
mov dx,MSG
int 0x21

;Exit to DOS
mov ax,0x4C00
int 0x21

;The Message to Print
MSG DB 'Allo$'

Assemble this example with NASM using the flat binary format (-f bin)
and make sure it assembled file has the .com extension.

.



Relevant Pages