Another attempt on disk i/o

This commit is contained in:
Nero 2020-05-02 23:57:23 +02:00
parent 404825387b
commit 36f4673c91
3 changed files with 101 additions and 129 deletions

View file

@ -3,6 +3,7 @@
jmp 0:(init+0x7C00-$$)
%include "inc/bpb.asm"
%include "inc/mbr.asm"
; Far call via interrupt vector
%macro intcall 1
@ -195,7 +196,7 @@ fputc: push ax
%include "kernel/diskio.asm"
vects: dw int20h, int21h, retf, retf
dw retf, int25h, int26h, int20h
dw retf, retf, retf, int20h
dw idle, fputc
main: ; zero out first 64kb except our code
@ -222,12 +223,7 @@ intlp: movsw
call dnconv
mov al, dl
mov cx, 1
mov dx, 0
mov bx, buffer
int 3
intcall 0x25
int 3
call select
loop: int 0x28
jmp loop
@ -250,6 +246,3 @@ init: cli
section .bss
; stack to be used during init and disk i/o
stack: resw stacks
; default int 25h/26h handler use a cache to keep geometry for
; the first 4 drives
buffer: resb 512