Split nbp up into startup code and main
This commit is contained in:
parent
260db9f8d7
commit
1005a24c7f
24
kernel/main.asm
Normal file
24
kernel/main.asm
Normal file
@ -0,0 +1,24 @@
|
||||
main:
|
||||
mov ax, cs
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
|
||||
mov bx, 0x002E
|
||||
mov dx, debug_reg_ir
|
||||
|
||||
call ivt_set
|
||||
|
||||
call heap_init
|
||||
mov ax, 18
|
||||
call malloc
|
||||
|
||||
ret
|
||||
|
||||
%include "kernel/heap.asm"
|
||||
%include "kernel/intr.asm"
|
||||
%include "kernel/debug.asm"
|
||||
%include "kernel/kprintf.asm"
|
||||
|
||||
align 16
|
||||
heap:
|
||||
dw 0
|
25
nbp.asm
25
nbp.asm
@ -39,27 +39,4 @@ _exit:
|
||||
.message:
|
||||
db "Halted: Waiting for poweroff...", 0
|
||||
|
||||
main:
|
||||
mov ax, cs
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
|
||||
mov bx, 0x002E
|
||||
mov dx, debug_reg_ir
|
||||
|
||||
call ivt_set
|
||||
|
||||
call heap_init
|
||||
mov ax, 18
|
||||
call malloc
|
||||
|
||||
ret
|
||||
|
||||
%include "kernel/heap.asm"
|
||||
%include "kernel/intr.asm"
|
||||
%include "kernel/debug.asm"
|
||||
%include "kernel/kprintf.asm"
|
||||
|
||||
align 16
|
||||
heap:
|
||||
dw 0
|
||||
%include "kernel/main.asm"
|
||||
|
Loading…
Reference in New Issue
Block a user