some problem in BIOS call
Posted: Sat Oct 25, 2003 1:44 am
I write some simple codes in call BIOS to print "hello,world !",
compile in nasm.
when I use BOCHS and vmware to emulate ,It has nothing wrong.
but when use real PC to boot ,It just display nothing, but hang .
could somebody tell me what theproblem is
and how to correct it?
thx a lot .
here are the codes:
[bits 16]
[org 0x7c00]
;set the screen to text mode
mov al,3
mov ah,0
int 10h
;clear screen
mov cx,80*25
mov al,' '
mov bl,1eh ;use yellow in blue lettering
mov ah,09h
int 10h
;display the message
mov bp,msg
mov cx,len
mov dx,0 ;display on (0,0)
mov al,0 ;make cursor return
mov bl,1eh
mov ah,13h ;call BIOS
int 10h
loop1: jmp loop1
msg db 'Hello,world !'
len equ $-msg
times 510-($-$$) db 0
dw 0xaa55
compile in nasm.
when I use BOCHS and vmware to emulate ,It has nothing wrong.
but when use real PC to boot ,It just display nothing, but hang .
could somebody tell me what theproblem is
and how to correct it?
thx a lot .
here are the codes:
[bits 16]
[org 0x7c00]
;set the screen to text mode
mov al,3
mov ah,0
int 10h
;clear screen
mov cx,80*25
mov al,' '
mov bl,1eh ;use yellow in blue lettering
mov ah,09h
int 10h
;display the message
mov bp,msg
mov cx,len
mov dx,0 ;display on (0,0)
mov al,0 ;make cursor return
mov bl,1eh
mov ah,13h ;call BIOS
int 10h
loop1: jmp loop1
msg db 'Hello,world !'
len equ $-msg
times 510-($-$$) db 0
dw 0xaa55