rdos/kernel/main.asm

39 lines
439 B
NASM

cpu 8086
org 0x0100
push cs
pop es
mov di, isr_dos_main
mov ax, 0x21
call intr_register
.loop:
mov ah, 0x01
int 0x21
jmp .loop
cli
.halt:
hlt
jmp .halt
isr_dos_main:
cmp ah, 0x01
je isr_getc
cmp ah, 0x02
je isr_putc
isr_error:
push bp
mov bp, sp
; set carry flag
or WORD [SS:BP+6], 1
pop bp
isr_return:
iret
%include "intr.asm"
%include "drvtab.asm"
%include "chario.asm"
times 1000 db 0xEA