Page 1 of 1

problems in tutorial 4

Posted: Sat Sep 03, 2011 7:31 am
by digvijay
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

Re: problems in tutorial 4

Posted: Sun Nov 24, 2013 4:59 am
by utsav_popli
I am not sure, but as far as i found about the bootloader.
bios loads the bootcode at CS:0, ip 07c0
So to make ds and cs point to same are we make ds and other segments 0

Re: problems in tutorial 4

Posted: Thu Mar 28, 2019 12:03 pm
by Ulrich
Is this the only problem in tutorials?