From: Christoffer Bubach Date: Sun, 11 Jan 2015 00:09:08 +0000 (+0100) Subject: Some more source cleaning X-Git-Url: https://git.wirehaze.ovh/BOS.git/commitdiff_plain/59a857987f4ffac79e5c7ef663197c69b9d00b33 Some more source cleaning --- diff --git a/boot/BOS_boot.asm b/boot/BOS_boot.asm index a7a5c12..432465c 100755 --- a/boot/BOS_boot.asm +++ b/boot/BOS_boot.asm @@ -4,282 +4,270 @@ ; - FAT12 compatible. ; ; - Loads a binary file from the floppy. ; ; ; +; 16-bit mem map (seg:off) ; +;------------------------------------------------------------; +; 0x0000:0x0000 -> 0x0000:0x0500 BIOS stuff ; +; 0x0000:0x0500 -> 0x0000:0x2100 FAT12 rootdir ; +; 0x0000:0x2100 -> 0x0000:0x3300 FAT for FAT12 ; +; 0x0000:0x3300 -> 0x0000:0x6c00 14,25kb free space ; +; 0x0000:0x6c00 -> 0x0000:0x7400 IDT, 256 descriptors ; +; 0x0000:0x7400 -> 0x0000:0x7c00 GDT, 256 descriptors ; +; 0x0000:0x7c00 -> 0x0000:0x7e00 bootsector ; +; 0x0000:0x7e00 <- 0x0000:0x8000 512b stack for boot ; +; 0x0000:0x8000 -> 0x9000:0xffff 608kb kernel/free space ; +; 0xA000:0x0000 -> ............. VGA mem etc. ; ;------------------------------------------------------------; - -; TODO: -; as i moved some 16-bit stuff to the kernel, i now got -; space to do proper testing (for data-area etc), -; fix that... -; -; TODO2: -; find out why this crap takes ages to load the kernel.. :S - - -; -; 16-bit mem map (seg:off) -; 0x0000:0x0000 -> 0x0000:0x0500 BIOS stuff -; 0x0000:0x0500 -> 0x0000:0x2100 FAT12 rootdir -; 0x0000:0x2100 -> 0x0000:0x3300 FAT for FAT12 -; 0x0000:0x3300 -> 0x0000:0x6c00 14,25kb free space -; 0x0000:0x6c00 -> 0x0000:0x7400 IDT, 256 descriptors -; 0x0000:0x7400 -> 0x0000:0x7c00 GDT, 256 descriptors -; 0x0000:0x7c00 -> 0x0000:0x7e00 bootsector -; 0x0000:0x7e00 <- 0x0000:0x8000 512b stack for boot -; 0x0000:0x8000 -> 0x9000:0xffff 608kb kernel/free space -;;;; 0x0000:0x7e00 <- 0x0000:0xffff ~32,5kb stack for boot -;;;; 0x1000:0x0000 -> 0x9000:0xffff 576kb kernel/free space -; 0xA000:0x0000 -> ............. VGA mem etc. use16 org 0x7C00 boot: - jmp short start - nop + jmp short start + nop ;------------------------------------------; ; Standard BIOS Parameter Block, "BPB". ; ;------------------------------------------; - bpbOEM db 'BOS 0.04' - bpbSectSize dw 512 - bpbClustSize db 1 - bpbReservedSec dw 1 - bpbFats db 2 - bpbRootSize dw 224 - bpbTotalSect dw 2880 - bpbMedia db 240 - bpbFatSize dw 9 - bpbTrackSect dw 18 - bpbHeads dw 2 - bpbHiddenSect dd 0 - bpbLargeSect dd 0 - ;---------------------------------; - ; extended BPB for FAT12/FAT16 ; - ;---------------------------------; - bpbDriveNo db 0 - bpbReserved db 0 - bpbSignature db 41 ; 0 = nothing more. 41 = three more (below).. - bpbID dd 1 - bpbVolumeLabel db 'BOOT FLOPPY' - bpbFileSystem db 'FAT12 ' + bpbOEM db 'BOS 0.04' + bpbSectSize dw 512 + bpbClustSize db 1 + bpbReservedSec dw 1 + bpbFats db 2 + bpbRootSize dw 224 + bpbTotalSect dw 2880 + bpbMedia db 240 + bpbFatSize dw 9 + bpbTrackSect dw 18 + bpbHeads dw 2 + bpbHiddenSect dd 0 + bpbLargeSect dd 0 + ;---------------------------------; + ; extended BPB for FAT12/FAT16 ; + ;---------------------------------; + bpbDriveNo db 0 + bpbReserved db 0 + bpbSignature db 41 ; 0 = end. 41 = three more. + bpbID dd 1 + bpbVolumeLabel db 'BOOT FLOPPY' + bpbFileSystem db 'FAT12 ' ;----------------------------------------; ; starting point of bootsector code ; ;----------------------------------------; start: - cli - - xor ax, ax ; initialize all the necessary - mov ds, ax ; registers. - mov es, ax - mov ss, ax - mov sp, 0x8000 ; Stack.. - - mov [bpbDriveNo], dl - - sti - - -;----------------------------------; -; clear screen and print some ; -;----------------------------------; - mov ax, 3 ; Set mode 0x03 - int 0x10 - - mov bp, loading ; Print loading message. - mov ax, 0x1301 - mov bx, 7 - mov cx, 12 - mov dx, 0x0102 - int 0x10 - - mov bl, 2 ; Set cursor. - mov ah, 2 - mov dx, 0x0201 - int 0x10 - - mov ah, 9 ; Print 14 green dots. - mov al, '.' - mov cx, 14 - int 0x10 - - -;---------------------------; -; load FAT and root ; -;---------------------------; - mov di, 0x0050 ; Load the root to - mov ax, 19 ; 0x0000:0x0500 (0x500/0x10) - mov cx, 14 - call read_sectors - - mov di, 0x0210 ; Load the fat to - mov ax, 1 ; 0x0000:0x2100 - mov cx, 9 - call read_sectors - - - ;------------------------; - ; search for the file ; - ;------------------------; - mov dx, [bpbRootSize] - mov bx, 0x0500 - filesearch: - cld - mov si, filename - mov cx, 11 - mov di, bx - repe cmpsb - je found - add bx, 32 - dec dx - jz error - jmp filesearch + cli + + xor ax, ax ; initialize all the necessary + mov ds, ax ; registers. + mov es, ax + mov ss, ax + mov sp, 0x8000 ; Stack.. + + mov [bpbDriveNo], dl + + sti + + + ;----------------------------------; + ; clear screen and print some ; + ;----------------------------------; + mov ax, 3 ; Set mode 0x03 + int 0x10 + + mov bp, loading ; Print loading message. + mov ax, 0x1301 + mov bx, 7 + mov cx, 12 + mov dx, 0x0102 + int 0x10 + + mov bl, 2 ; Set cursor. + mov ah, 2 + mov dx, 0x0201 + int 0x10 + + mov ah, 9 ; Print 14 green dots. + mov al, '.' + mov cx, 14 + int 0x10 + + + ;---------------------------; + ; load FAT and root ; + ;---------------------------; + mov di, 0x0050 ; Load the root to + mov ax, 19 ; 0x0000:0x0500 (0x500/0x10) + mov cx, 14 + call read_sectors + + mov di, 0x0210 ; Load the fat to + mov ax, 1 ; 0x0000:0x2100 + mov cx, 9 + call read_sectors + + + ;------------------------; + ; search for the file ; + ;------------------------; + mov dx, [bpbRootSize] + mov bx, 0x0500 + .filesearch: + cld + mov si, filename + mov cx, 11 + mov di, bx + repe cmpsb + je found + add bx, 32 + dec dx + jz error + jmp .filesearch ;-----------------------------------; ; variables & functions ; ;-----------------------------------; - loading db 'Starting BOS' - filename db 'KERNEL SYS' - failure db 'Read error!' - - - ;-----------------------------------------------; - ; read a number of sectors (one at a time) ; - ;-----------------------------------------------; - ; in: ; - ; di = segment to save at ; - ; ax = sector to read ; - ; cx = number of sectors ; - ; out: ; - ; di = updated (added for next read) ; - ; ax = updated (added for next read) ; - ;-----------------------------------------------; - read_sectors: - pusha - mov bl, byte [bpbTrackSect] ; bl = number of sectors per track - div bl ; al = ax / bl - mov cl, ah ; cl = real sector number - add cl, 1 - - xor ah, ah ; del the rest of the div before - mov bl, byte [bpbHeads] ; bl = number of heads - div bl ; ah = rest of ( ax / bx ), al = ax / bx - mov ch, al ; ch = number of track - mov dh, ah ; dh = the head number - - mov ax, cx ; save cx in ax - mov cx, 6 ; try it 6 times - .next_try: - push es - push cx - mov cx, ax ; restore cx - push cx - - xor ax, ax - mov dl, [bpbDriveNo] ; reset drive - push dx - int 0x13 - jc .failed - - pop dx - pop cx - xor bx, bx - mov es, di - mov ax, 0x0201 ; function 2, 1 sector - int 0x13 - jnc .ok ; if it was ok, check next.. - - .failed: - pop dx - pop ax - - pop cx - pop es - loop .next_try ; else try once again if there is an error - jmp error ; if cx = 0 and the read operation failed, halt - .ok: - pop cx ; from the next_try loop - pop es - popa - add di, 32 ; add 32 (512/16) to segment - inc ax ; add sector counter - loop read_sectors - ret - - - ;----------------------------------------------------; - ; show a message and wait for a key before reboot ; - ;----------------------------------------------------; - error: - mov bp, failure - mov ax, 0x1301 - mov bx, 4 - mov cx, 11 - mov dx, 0x0401 - int 0x10 - - mov ah, 0 - int 0x16 - int 0x19 + loading db 'Starting BOS' + filename db 'KERNEL SYS' + failure db 'Read error!' + + +;-----------------------------------------------; +; read a number of sectors (one at a time) ; +;-----------------------------------------------; +; in: ; +; di = segment to save at ; +; ax = sector to read ; +; cx = number of sectors ; +; out: ; +; di = updated (added for next read) ; +; ax = updated (added for next read) ; +;-----------------------------------------------; +read_sectors: + pusha + mov bl, byte [bpbTrackSect] ; bl = number of sectors per track + div bl ; al = ax / bl + mov cl, ah ; cl = real sector number + add cl, 1 + + xor ah, ah ; del the rest of the div before + mov bl, byte [bpbHeads] ; bl = number of heads + div bl ; ah = rest of ( ax / bx ), al = ax / bx + mov ch, al ; ch = number of track + mov dh, ah ; dh = the head number + + mov ax, cx ; save cx in ax + mov cx, 6 ; try it 6 times + .next_try: + push es + push cx + mov cx, ax ; restore cx + push cx + + xor ax, ax + mov dl, [bpbDriveNo] ; reset drive + push dx + int 0x13 + jc .failed + + pop dx + pop cx + xor bx, bx + mov es, di + mov ax, 0x0201 ; function 2, 1 sector + int 0x13 + jnc .ok ; if it was ok, check next.. + + .failed: + pop dx + pop ax + + pop cx + pop es + loop .next_try ; else try once again if there is an error + jmp error ; if cx = 0 and the read operation failed, halt + .ok: + pop cx ; from the next_try loop + pop es + popa + add di, 32 ; add 32 (512/16) to segment + inc ax ; add sector counter + loop read_sectors + ret + + +;----------------------------------------------------; +; show a message and wait for a key before reboot ; +;----------------------------------------------------; +error: + mov bp, failure + mov ax, 0x1301 + mov bx, 4 + mov cx, 11 + mov dx, 0x0401 + int 0x10 + + mov ah, 0 + int 0x16 + int 0x19 ;-----------------------------------; ; the file is found, load it. ; ;-----------------------------------; found: - mov bp, [bx+26] ; bp=cluster number from directory entry - mov di, 0x800 ; 1000 (segment) - - .next_block: - xor cx, cx - mov cl, [bpbClustSize] ; reset sector count to 1 cluster - mov si, bp ; si=next should-be cluster for - ; contiguous reads - .next_contiguous: - mov ax, 3 ; 3 - mul si ; multiply cluster number by 3 - shr ax, 1 ; divide by two - mov bx, ax - mov ax, word [(0x2100+bx)] ; ax=FAT element with junk - jc .odd_cluster ; jump if the value was odd - and ax, 0x0FFF ; leave only lower 12 bits - jmp .got_cluster ; got it - .odd_cluster: - shr ax, 4 ; (leave only bits 4-15) - - .got_cluster: - inc si ; si=current cluster+1 - cmp ax, si ; next cluster=current cluster+1? - jne .force_read ; is it still contiguous? - - add cl, [bpbClustSize] ; increase sector count by 1 cluster - adc ch, 0 ; add cf+0 to ch - jmp .next_contiguous - - .force_read: - xchg bp, ax ; ax=bp (base cluster), bp=new cluster - dec ax ; decrease by 2 to get the actual... - dec ax ; ...cluster number - - movzx dx, byte [bpbClustSize] - mul dx ; multiply by sectors per cluster - add ax, 33 ; add data-area location (33) - call read_sectors - - cmp bp, 0x0FF8 ; is the new cluster EOF (FF8-FFF)? - jb .next_block ; if not, read next block + mov bp, [bx+26] ; bp = cluster from dir entry + mov di, 0x0800 ; 800 (segment) + + .next_block: + xor cx, cx + mov cl, [bpbClustSize] ; reset sector count to 1 cluster + mov si, bp ; si = next should-be cluster for + ; contiguous reads + .next_contiguous: + mov ax, 3 + mul si ; multiply cluster number by 3 + shr ax, 1 ; divide by two + mov bx, ax + mov ax, word [(0x2100+bx)] ; ax = FAT element with junk + jc .odd_cluster ; jump if the value was odd + and ax, 0x0FFF ; leave only lower 12 bits + jmp .got_cluster ; got it + .odd_cluster: + shr ax, 4 ; (leave only bits 4-15) + + .got_cluster: + inc si ; si = current cluster+1 + cmp ax, si ; next cluster = current cluster+1? + jne .force_read ; is it still contiguous? + + add cl, [bpbClustSize] ; increase sector count by 1 cluster + adc ch, 0 ; add cf + 0 to ch + jmp .next_contiguous + + .force_read: + xchg bp, ax ; ax = bp (base cluster), bp = new cluster + dec ax ; decrease by 2 to get the actual... + dec ax ; ...cluster number + + movzx dx, byte [bpbClustSize] + mul dx ; multiply by sectors per cluster + add ax, 33 ; add data-area location (33) + call read_sectors + + cmp bp, 0x0FF8 ; is the new cluster EOF (FF8-FFF)? + jb .next_block ; if not, read next block ;-----------------------; ; the file is loaded ; ;-----------------------; quit: - jmp 0x0000:0x8000 ; jump to loaded file (64kb in mem) + jmp 0x0000:0x8000 ; jump to loaded file (64kb in mem) ;-------------------------------------; ; set the BOOT-signature at byte 510. ; ;-------------------------------------; - rb boot+512-2-$ - dw 0xAA55 \ No newline at end of file + rb boot+512-2-$ + dw 0xAA55 \ No newline at end of file diff --git a/kernel/16bit/gdt.asm b/kernel/16bit/gdt.asm index 43b144f..3645376 100755 --- a/kernel/16bit/gdt.asm +++ b/kernel/16bit/gdt.asm @@ -10,17 +10,16 @@ ; pointer to GDT ; ;-------------------; gdtr: - .size dw gdt_end - gdt - 1 - .address dd 0x7400 ; this is where we move - ; the gdt + .size dw gdt_end - gdt - 1 + .address dd 0x7400 ; here we move the gdt + ;-----------------------------------; ; Global Descriptor Table (GDT). ; ;-----------------------------------; gdt: - .null dw 0x0000,0x0000,0x0000,0x0000 ; null desc. - .BOS_code: dw 0xFFFF,0x0000,0x9A00,0x00CF ; 0x08 , was 9800 before. - .BOS_data: dw 0xFFFF,0x0000,0x9200,0x00CF ; 0x10 - .BOS_16code: dw 0xFFFF,0x0000,0x9A00,0x0000 ; 0x18 - .BOS_16data: dw 0xFFFF,0x0000,0x9200,0x0000 ; 0x20 - + .null dw 0x0000, 0x0000, 0x0000, 0x0000 ; null desc. + .BOS_code: dw 0xFFFF, 0x0000, 0x9A00, 0x00CF ; 0x08 , was 9800 before. + .BOS_data: dw 0xFFFF, 0x0000, 0x9200, 0x00CF ; 0x10 + .BOS_16code: dw 0xFFFF, 0x0000, 0x9A00, 0x0000 ; 0x18 + .BOS_16data: dw 0xFFFF, 0x0000, 0x9200, 0x0000 ; 0x20 gdt_end: \ No newline at end of file diff --git a/kernel/16bit/idt.asm b/kernel/16bit/idt.asm index 6335776..b677ae5 100755 --- a/kernel/16bit/idt.asm +++ b/kernel/16bit/idt.asm @@ -12,5 +12,5 @@ ; IDT pointer ; ;-----------------; idtr: - .size dw 0x800 - .address dd 0x6C00 + .size dw 0x800 + .address dd 0x6C00 \ No newline at end of file diff --git a/kernel/16bit/init16bit.asm b/kernel/16bit/init16bit.asm index 652cfb1..4815455 100755 --- a/kernel/16bit/init16bit.asm +++ b/kernel/16bit/init16bit.asm @@ -10,12 +10,12 @@ ; save info ; ;---------------------; init16bit: - call getmem ; realmode/mem.inc + call getmem ; realmode/mem.inc mov [ram_amount], eax xor eax, eax ; clear mem for IDT and GDT - mov edi, 0x6c00 ; IDT address - mov ecx, (0x800 + 0x800)/4 + mov edi, [idtr.address] ; IDT address + mov ecx, ([idtr.size] + [idtr.size])/4 rep stosd mov eax, cs @@ -29,7 +29,7 @@ init16bit: mov [gdt.BOS_16data + 7], ah lea esi, [gdt] - mov edi, 0x7400 ; GDT address + mov edi, [gdtr.address] ; GDT address mov ecx, (gdt_end - gdt)/4 rep movsd ; Move it to final pos. diff --git a/kernel/16bit/variables.asm b/kernel/16bit/variables.asm index 2ab6707..0d739b0 100755 --- a/kernel/16bit/variables.asm +++ b/kernel/16bit/variables.asm @@ -9,21 +9,21 @@ ;---------------------------------------; ; needed to get back to 16-bit mode ; ;---------------------------------------; - realmode_cs dw 0 - ridtr: dw 0x3FF - dd 0 + realmode_cs dw 0 + ridtr: dw 0x3FF + dd 0 ;----------------; ; other stuff ; ;----------------; - int_number db 0 - realmode_error db 0 - realmode_ax dw 0 - realmode_bx dw 0 - realmode_cx dw 0 - realmode_dx dw 0 + int_number db 0 + realmode_error db 0 + realmode_ax dw 0 + realmode_bx dw 0 + realmode_cx dw 0 + realmode_dx dw 0 ;-------------------; ; saved info ; ;-------------------; - ram_amount dd 0 \ No newline at end of file + ram_amount dd 0 \ No newline at end of file diff --git a/kernel/fdc/fdc.asm b/kernel/fdc/fdc.asm index d90218d..81b4997 100755 --- a/kernel/fdc/fdc.asm +++ b/kernel/fdc/fdc.asm @@ -2,15 +2,10 @@ ; BOS kernel Christoffer Bubach, 2004-2005. ; ;----------------------------------------------------------; ; ; -; floppy disk driver originally by Craig Bamford, Dex4u. ; -; adjustments and for BOS by bubach. ; +; floppy disk driver. ; ; ; ;----------------------------------------------------------; -; NOTE: I'm almost finished with a much improved version of -; this code, that supports 2 drives of multiple types. -; I'll wait with that until next version, so you won't -; have to see a half finished mess here. ;---------------------------; ; variables and contants ; diff --git a/kernel/init/init32b.asm b/kernel/init/init32b.asm index 73e1354..01bb358 100755 --- a/kernel/init/init32b.asm +++ b/kernel/init/init32b.asm @@ -9,120 +9,120 @@ bos_init: - ;----------------------; - ; we are in pmode.. ; - ;----------------------; - mov bx, 0x0193 - call setcursor - mov esi, pmode_load - mov bl, 0x07 - call print - - mov bx, 0x01C5 - call setcursor - mov esi, pmode_load_ok - mov bl, 0x02 - call print - - ;----------------------; - ; kernel loaded.. ; - ;----------------------; - mov bx, 0x01E3 - call setcursor - mov esi, kernel_load - mov bl, 0x07 - call print - - mov bx, 0x0215 - call setcursor - mov esi, kernel_load_ok - mov bl, 0x02 - call print - - ;----------------; - ; remap PICs ; - ;----------------; - mov cl, 0x20 ; PIC 1, irq0-irq7 -> int 0x20-27. - mov ch, 0x28 ; PIC 2, irq8-irq15 -> int 0x28-30. - call remap_pics - call disable_irqs - - mov bx, 0x0233 - call setcursor - mov esi, pic_irq - mov bl, 0x07 - call print - - mov bx, 0x0265 - call setcursor - mov esi, pic_irq_ok - mov bl, 0x02 - call print - - ;--------------; - ; setup IDT ; - ;--------------; - mov edi, u_isr ; isr.inc - call init_idt ; idt.inc - mov esi, idt_list ; idt.inc - call set_idt_list ; idt.inc - - sti ; Interrupts back.. - - mov bx, 0x0283 - call setcursor - mov esi, idt_mess - mov bl, 0x07 - call print - - mov bx, 0x02B5 - call setcursor - mov esi, idt_ok - mov bl, 0x02 - call print - - - ;---------------------------------------------; - ; enable IRQs (one after one as i code it) ; - ;---------------------------------------------; - mov cl, 1 - call enable_irq ; Enable IRQ 1. - - mov bx, 0x02D3 - call setcursor - mov esi, kbd_load - mov bl, 0x07 - call print - - mov bx, 0x0305 - call setcursor - mov esi, kbd_ok - mov bl, 0x02 - call print - - ;------------------------------------; - ; get CMOS data, set PIT to 100Hz ; - ; and start timer. ; - ;------------------------------------; - call get_cmos_data ; cmos.inc - call set_pit_freq ; timer.inc - mov cl, 0 - call enable_irq ; Enable IRQ 0. - - ;-------------------; - ; init simple MM ; - ;-------------------; - mov ebx, 0x100000 ; address of first free - mov ecx, [ram_amount] ; RAM. everything before - call init_mem ; that is reserved. - - ;--------------------; - ; init fdc driver ; - ;--------------------; - call fdc_init ; fdc.inc - - - ;-------------------------; - ; return to kernel.asm ; - ;-------------------------; - ret \ No newline at end of file + ;----------------------; + ; we are in pmode.. ; + ;----------------------; + mov bx, 0x0193 + call setcursor + mov esi, pmode_load + mov bl, 0x07 + call print + + mov bx, 0x01C5 + call setcursor + mov esi, pmode_load_ok + mov bl, 0x02 + call print + + ;----------------------; + ; kernel loaded.. ; + ;----------------------; + mov bx, 0x01E3 + call setcursor + mov esi, kernel_load + mov bl, 0x07 + call print + + mov bx, 0x0215 + call setcursor + mov esi, kernel_load_ok + mov bl, 0x02 + call print + + ;----------------; + ; remap PICs ; + ;----------------; + mov cl, 0x20 ; PIC 1, irq0-irq7 -> int 0x20-27. + mov ch, 0x28 ; PIC 2, irq8-irq15 -> int 0x28-30. + call remap_pics + call disable_irqs + + mov bx, 0x0233 + call setcursor + mov esi, pic_irq + mov bl, 0x07 + call print + + mov bx, 0x0265 + call setcursor + mov esi, pic_irq_ok + mov bl, 0x02 + call print + + ;--------------; + ; setup IDT ; + ;--------------; + mov edi, u_isr ; isr.inc + call init_idt ; idt.inc + mov esi, idt_list ; idt.inc + call set_idt_list ; idt.inc + + sti ; Interrupts back. + + mov bx, 0x0283 + call setcursor + mov esi, idt_mess + mov bl, 0x07 + call print + + mov bx, 0x02B5 + call setcursor + mov esi, idt_ok + mov bl, 0x02 + call print + + + ;---------------------------------------------; + ; enable IRQs (one after one as i code it) ; + ;---------------------------------------------; + mov cl, 1 + call enable_irq ; Enable IRQ 1. + + mov bx, 0x02D3 + call setcursor + mov esi, kbd_load + mov bl, 0x07 + call print + + mov bx, 0x0305 + call setcursor + mov esi, kbd_ok + mov bl, 0x02 + call print + + ;------------------------------------; + ; get CMOS data, set PIT to 100Hz ; + ; and start timer. ; + ;------------------------------------; + call get_cmos_data ; cmos.inc + call set_pit_freq ; timer.inc + mov cl, 0 + call enable_irq ; Enable IRQ 0. + + ;-------------------; + ; init simple MM ; + ;-------------------; + mov ebx, 0x100000 ; address of first free + mov ecx, [ram_amount] ; RAM. everything before + call init_mem ; that is reserved. + + ;--------------------; + ; init fdc driver ; + ;--------------------; + call fdc_init ; fdc.inc + + + ;-------------------------; + ; return to kernel.asm ; + ;-------------------------; + ret \ No newline at end of file