Page 2 of 2

Re:Gateway booting problem

Posted: Sat Jan 04, 2003 10:28 pm
by jrfritz
Because...it'll load my kernel for me.

Re:Gateway booting problem

Posted: Sat Jan 04, 2003 10:31 pm
by jrfritz
There...got X windows back up and running.

; Reset the floppy drive. Need to do this to read the C++ kernel.
ResetFloppy:
   mov ax,      0x00      ; Select Floppy Reset BIOS Function
mov dl,      [ drive ]   ; Select the floppy FritzOS booted from

int 13h            ; Reset the floppy drive

jc ResetFloppy      ; If there was a error, try again.

; Read the floppy drive for loading the FritzOS C+ Kernel
ReadFloppy:
mov bx,   9000h      ; Load FritzOS at 9000h.
mov ah,   0x02      ; Load disk data to ES:BX
mov al,   17      ; Load two floppy head full's worth of data.

mov ch,   0      ; First Cylinder
mov cl,   2      ; Start at the 2nd Sector, so you don't load the bootsector, you load
               ; the C++ Kernel/Second Stage Loader ( they are linked together ).
mov dh,   0      ; Use first floppy head
mov dl,   [ drive ]   ; Load from the drive FritzOS booted from.

int 13h         ; Read the floppy disk.

    jc ReadFloppy         ; Error, try again.

; Now, since FritzOS is over 17 sectors ( one floppy head has 17 sectors ( 18, sector 0 is included in the
; number ), we load another floppy head.
ReadFloppy2:
   mov al,      17   ; The Second Head Full
   inc dh         ; Set it to the second head

   int 13h         ; Read the floppy disk.

   jc ReadFloppy2      ; If there was a error, try again.