rdos/kernel/main.asm

58 lines
734 B
NASM
Raw Normal View History

cpu 8086
self: equ 0xF000
diskbuf: equ (self-0x200) ; deblocking
stack: equ (diskbuf) ; grows down
defdrv: equ 4
2019-09-29 23:25:29 +02:00
org self
jmp init
pad 3
self_offset:
db (self >> 8)
2019-09-06 00:24:39 +02:00
banner:
2019-10-08 21:53:41 +02:00
db "RDOS 2019-09", 0x0A, 0x0D, '$', 0
2019-09-19 22:02:16 +02:00
init:
mov sp, stack
mov byte [defdrv], 0x01
2019-10-08 21:53:41 +02:00
mov dx, banner
call print_string
2019-09-29 14:23:39 +02:00
2019-10-16 23:09:31 +02:00
call exec_chain
cli
.halt:
hlt
jmp .halt
2019-09-06 00:24:39 +02:00
2019-09-29 14:23:39 +02:00
init_program:
db "HELLO.COM", 0
cpm_syscall:
2019-10-08 21:53:41 +02:00
cmp cl, 0
je init
cmp cl, 1
je console_input
cmp cl, 2
je console_output
cmp cl, 9
je print_string
cmp cl, 10
je read_buffer
stc
ret
2019-10-08 21:53:41 +02:00
%include "char.asm"
2019-09-29 14:23:39 +02:00
%include "exec.asm"
2019-10-16 23:09:31 +02:00
%include "fdc.asm"
2019-09-29 14:23:39 +02:00
%include "fcb.asm"
2019-10-08 19:54:39 +02:00
%include "fcbparse.asm"
2019-09-29 23:25:29 +02:00
%include "drive.asm"
2019-10-08 19:54:39 +02:00
%include "log2.asm"
2019-10-12 20:33:26 +02:00
%include "dump.asm"