I have collected a lot of information from this forum.But i have a problem with boot loader.This boot loader consists of few parts written by users of this forum.Here is the code
;---------------------------------------------------------------
;Sector 1
;---------------------------------------------------------------
use16
org 0x7C00
jmp 0x0000:main
nop
main:
xor ax,ax ;ds=0
mov ds,ax
mov si,load_msg ;wellcome msg
call print_str
xor ax,ax
mov es,ax ;buffer es:bx=0x0000:0x7E00
mov bx,0x7E00
mov dl,0 ; device = 0
mov dh,0 ; head = 0
mov ch,0 ; track = 0
mov cl,2 ; sector = 2
mov al,1 ; number of tracks to read = 1
mov ah,2
int 0x13
jc read_error ; if error run procedure 'read_error'
xor ax,ax
mov ds,ax ;ds=0
jmp 0x0000:0x7E00 ; jump to loaded sector
;---------------------------------------------------------------
;Procedures
;---------------------------------------------------------------
print_str:
mov ah,0x0E
mov bh,0x00
mov bl,0x07
.nextchar:
lodsb
or al,al
jz .return
int 0x10
jmp .nextchar
.return:
ret
read_error:
mov si,error_msg
call print_str
jmp $
ret
;---------------------------------------------------------------
;Data
;---------------------------------------------------------------
load_msg db 'Loading Kernel...',13,10,0
error_msg db 'Error',13,10,0
;---------------------------------------------------------------
times 510-($-$$) db 0
dw 0xAA55
;---------------------------------------------------------------
;Sector 2
;---------------------------------------------------------------
sector2:
mov si,kernel_msg
call print_str ;print second message
hlt
;---------------------------------------------------------------
;DAta
;---------------------------------------------------------------
kernel_msg db 'Loaded Kernel.',13,10,0
;---------------------------------------------------------------
It does not print second message?Whats the problem?Please help