kernel: implement diskio using drive table
This commit is contained in:
parent
4a294ee21c
commit
f0a000b7d1
5 changed files with 93 additions and 259 deletions
|
@ -39,17 +39,18 @@ intlp: movsw
|
|||
stosw
|
||||
loop intlp
|
||||
|
||||
; file descriptor 0 = CON
|
||||
mov word [fd_table], con_ftab
|
||||
|
||||
; print banner
|
||||
mov dx, banner
|
||||
mov cx, 13
|
||||
mov bx, 0
|
||||
call fd_write
|
||||
|
||||
call drives_init
|
||||
|
||||
mov dl, 0
|
||||
call drive_select
|
||||
xor ax, ax
|
||||
xor dx, dx
|
||||
call drive_seek
|
||||
call drive_read
|
||||
mov ax, [diskbuf+0x1FE]
|
||||
int 3
|
||||
|
||||
loop: int 0x28
|
||||
jmp loop
|
||||
|
||||
|
@ -235,12 +236,7 @@ fputc: push ax
|
|||
pop ax
|
||||
iret
|
||||
|
||||
%include "kernel/fd.asm"
|
||||
%include "kernel/con.asm"
|
||||
|
||||
%include "kernel/drive.asm"
|
||||
%include "kernel/diskio.asm"
|
||||
%include "kernel/fat.asm"
|
||||
|
||||
zero: dw 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue