Fuck up the kernel, i have other ideas now

This commit is contained in:
Nero 2020-09-15 21:44:32 +02:00
parent 4b5993cfa9
commit 303b1756e0
2 changed files with 48 additions and 258 deletions

36
kernel/main.asm Normal file
View file

@ -0,0 +1,36 @@
cpu 8086
org 0x7C00
jmp init
%include "kernel/fd.asm"
%include "kernel/con.asm"
entry_int21: iret
init: ; install int 21h handler
mov ax, cs
mov ds, ax
mov es, ax
mov word [4*0x21], entry_int21
mov word [4*0x21+2], cs
mov word [fd_table], con_ftab
; print banner
mov dx, .banner
mov cx, 13
mov bx, 0
call con_write
; execute shell
mov ax, 0x4B00
mov dx, .shellfn
int 0x21
.hlt: hlt
jmp .hlt
.banner: db "rdos kernel", 0x0A, 0x0D
.shellfn: db "SHELL.COM", 0