problems in tutorial 4
Posted: Sat Sep 03, 2011 7:31 am
i have made following changes to my previous code to display "welcome to my os!'.
however it still doesn't works
*******************************************************
org 0x7c00 ;we are loaded at 07c00
bits 16 ;16 bits real mode
start: jmp loader
msg db "WELCOME TO MY OS!",0
print:
lodsb
or al,al
jz done
mov ah,0x0E ;request display
mov bl,0x1E ;foreground color
int 0x10 ;call interrupt service
jmp print
done:
ret
loader:
xor ax,ax
mov ds,ax
mov es,ax
mov si,msg
call print
cli
jmp $ ;infinite loop
times 510-($-$$) db 0
dw 0xAA55
*******************************************************
it just displays
booting from floppy....
nothing else
also plz tell why to make ds register 0
what if its made to point to 7c00
whats wrong in this code,really tired doing same thing
however it still doesn't works
*******************************************************
org 0x7c00 ;we are loaded at 07c00
bits 16 ;16 bits real mode
start: jmp loader
msg db "WELCOME TO MY OS!",0
print:
lodsb
or al,al
jz done
mov ah,0x0E ;request display
mov bl,0x1E ;foreground color
int 0x10 ;call interrupt service
jmp print
done:
ret
loader:
xor ax,ax
mov ds,ax
mov es,ax
mov si,msg
call print
cli
jmp $ ;infinite loop
times 510-($-$$) db 0
dw 0xAA55
*******************************************************
it just displays
booting from floppy....
nothing else
also plz tell why to make ds register 0
what if its made to point to 7c00
whats wrong in this code,really tired doing same thing