All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
gfmay
Posts: 3 Joined: Mon Apr 09, 2007 6:27 am
Post
by gfmay » Tue Apr 10, 2007 6:53 am
When I run a simple program, I got a strange error which makes DOS frozen. Here is my code:
Code: Select all
org 0100h
mov ax,cs
mov ds,ax
mov es,ax
call disp_str
jmp $
disp_str:
mov ax,msg
mov bp,ax
mov cx,16
mov ax,01301h
mov bx,000ch
mov dl,0
int 10h
ret
msg: db 'Hello OS world!'
times 510-($-$$) db 0
dw 0xaa55
and I built it as a .com file using Nasm in DOS 6.22. This OS was installed in Virtual PC 2004.
Tyler
Member
Posts: 514 Joined: Tue Nov 07, 2006 7:37 am
Location: York, England
Post
by Tyler » Tue Apr 10, 2007 7:16 am
What strange? You loop infinetly at the end of the program so obviously dos doesnt respond...
gfmay
Posts: 3 Joined: Mon Apr 09, 2007 6:27 am
Post
by gfmay » Wed Apr 11, 2007 2:46 am
Thanks Tyler!
And sorry, I forgot that I had commented the instruction "jmp $"