Page 1 of 1

I met a strange error

Posted: Tue Apr 10, 2007 6:53 am
by gfmay
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.

Posted: Tue Apr 10, 2007 7:16 am
by Tyler
What strange? You loop infinetly at the end of the program so obviously dos doesnt respond...

Posted: Wed Apr 11, 2007 2:46 am
by gfmay
Thanks Tyler!
And sorry, I forgot that I had commented the instruction "jmp $"