Implement entrypoint and table for syscalls

This commit is contained in:
Nero 2021-01-02 03:45:03 +00:00
parent 015eea2f2f
commit 1dbfb2f592
3 changed files with 113 additions and 7 deletions

View file

@ -14,7 +14,7 @@ init: cli
mov ds, ax
mov es, ax
mov ss, ax
mov sp, ( stack+stacksize )
mov sp, ax
call printf
%defstr VERSIONSTR VERSION
@ -31,20 +31,25 @@ init: cli
call logdrv
mov bx, testfcb
call open
push ax
call printf
db "AX=",2,0x0A,0x0D,0
mov word [0x21*4], int21
mov word [0x21*4+2], cs
mov word [curpsp], 0x1000
mov ah, 2
mov dl, 0x37
int 0x21
restart:
hlt: hlt
jmp hlt
%include "kernel/bdos.asm"
%include "kernel/far.asm"
%include "kernel/fcb.asm"
%include "kernel/find.asm"
%include "kernel/drive.asm"
%include "kernel/drive.asm"
%include "kernel/printf.asm"
%include "kernel/char.asm"
section .data
@ -54,4 +59,5 @@ testfcb: db 0
section .bss
alignb 2
stack: resb stacksize