rdos/kernel/main.asm

37 lines
535 B
NASM
Raw Normal View History

; assumptions about the starting envionment
cpu 8086
org 0x0000
_startup:
mov ax, cs
mov ss, ax
mov sp, 0x0000
2019-04-01 00:58:19 +02:00
; <0x0010 is BIOS segment when relocated to HMA
; so we need a nop sled
times (0x10 - ($-$$)) nop
main:
2019-04-01 00:58:19 +02:00
call hma_relocate
2019-03-31 22:54:51 +02:00
call ivt_backup
2019-04-01 00:58:19 +02:00
call debug_init
2019-03-31 22:54:51 +02:00
2019-04-01 00:58:19 +02:00
int 0x2E
mov ax,0x1234
int 0x2E
2019-03-31 22:54:51 +02:00
call kprint16
.halt:
hlt
jmp .halt
2019-04-01 00:58:19 +02:00
%include "hma.asm"
%include "heap.asm"
%include "intr.asm"
%include "debug.asm"
%include "kprintf.asm"
_reloc_end:
align 16
heap: