loading a big kernel

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
adeelmahmood1

loading a big kernel

Post 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
_mark

Re:loading a big kernel

Post 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()
Post Reply