Page 1 of 1

loading a big kernel

Posted: Sun Mar 30, 2003 12:01 am
by adeelmahmood1
how can i load my kernel in the memory if its size goes more than 18 sectors
this is the code i m using to load the first 18 sectors how can i load the next 18 sectors

Code: Select all

readFloppy:
   ;es:bx==> 0000:5000h
   mov ax,0
   mov es,ax
   mov bx,5000h
   
   mov ah,2
   mov al,17   ;load two floppy heads full of data
   mov ch,0   ;cylinder=0
   mov cl,3   ;sector=2
   mov dh,0   ;head=0
   mov dl,0   ;floppy drive
   int 13h    ;read it
   jc readFloppy
thanx for ur help

Re:loading a big kernel

Posted: Sun Mar 30, 2003 10:06 am
by _mark
Do more then one read. You could either loop around to readFloppy again, or just duplicate the code so that it calls int 13 twice with different values in bx.

Code: Select all

readFloppy:
   ;es:bx==> 0000:5000h
   mov ax,0
   mov es,ax
   mov bx,5000h
   
   mov ah,2
   mov al,17   ;load two floppy heads full of data
   mov ch,0   ;cylinder=0
   mov cl,3   ;sector=2
   mov dh,0   ;head=0
   mov dl,0   ;floppy drive
   int 13h    ;read it
   jc readFloppy
readFloppy2:
   ;es:bx==> 0000:5000h
   mov ax,0
   mov es,ax
   mov bx,5000h + 200h*18
   
   mov ah,2
   mov al,17   ;load two floppy heads full of data
   mov ch,0   ;cylinder=0
   mov cl,3   ;sector=2
   mov dh,0   ;head=0
   mov dl,0   ;floppy drive
   int 13h    ;read it
   jc readFloppy

_mark()