Boot loader appears to work somewhat, kernel is questionable

This commit is contained in:
2015-01-23 23:02:25 -08:00
parent 6034fe2573
commit 20ee203ace
5 changed files with 188 additions and 24 deletions

26
asm/libinterrupt.S Normal file
View File

@@ -0,0 +1,26 @@
resetFloppy:
mov ax, 0 ; reset floppy disk (only need ah, reset
; al while we're here though)
mov dl, 0 ; use drive 0 (first floppy)
int 0x13
jc resetFloppy
ret
loadDiskSector:
printCharacter: ; print a single character to the display
mov ah, 0x0e ; int 0x10 is the entire display control,
; 0x0e means teletype output
mov bh, 0x00 ; Print on the zero (primary) page
mov bl, 0x07 ; Color. 0x07 is grey on black.
int 0x10
ret
printString: ; print the entire string pointed to by si
mov al, [si] ; [x] == *x, dereferencing source index
call printCharacter
inc si
cmp al, 0x0 ; found the trailing NULL?
jne printString
ret