rdos/kernel/main.asm

37 lines
507 B
NASM
Raw Normal View History

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