Implement common char i/o functions

This commit is contained in:
Nero 2021-02-19 08:57:21 +00:00
parent d7c1781d2f
commit a91fb3de0d
2 changed files with 144 additions and 35 deletions

View file

@ -3,36 +3,35 @@
jmp init
%defstr V VERSION
banner: db "RDOS ", V, 0x0A, 0x0D, 0, 0x1A
banner: db "RDOS KERNEL ", V, 0x0A, 0x0D, '$', 0x1A
%include "kernel/far.asm"
%include "kernel/char.asm"
%include "inc/bpb.asm"
%include "kernel/drive.asm"
section .text
init: call rstseg
mov si, banner
.l01: lodsb
test al, al
jz .l02
mov ah, 0x0e
xor bx, bx
int 0x10
jmp .l01
.l02:
call dinit
mov dl, 0
call logdrv
mov dx, banner
call puts
xor ax, ax
xor dx, dx
call maprd
mov byte [testbuf], 5
mov dx, testbuf
call gets
inc word [dskbuf+0x80]
call dirty
call flush
mov ax, [testbuf]
mov cx, [testbuf+2]
mov dx, [testbuf+4]
mov bx, [testbuf+6]
int 3
hlt: hlt
jmp hlt
section .bss
testbuf resb 130