rdos/kernel/main.asm

63 lines
754 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
call disk_parm_init
mov dx, 0x7F
mov byte [0x7F], 0x7F
mov byte [0x80], 2
call read_buffer
int3
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
; helper function for idle loops
idle:
pushf
sti
hlt
popf
ret
%include "syscall.asm"
%include "con86.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"
%include "disk.asm"
2019-10-08 19:54:39 +02:00
%include "log2.asm"
2019-10-12 20:33:26 +02:00
%include "dump.asm"