WIP on main
This commit is contained in:
parent
4d827ec4e9
commit
8c4821967c
22
main.asm
22
main.asm
@ -40,14 +40,24 @@ _exit:
|
|||||||
db "Halted: Waiting for poweroff...", 0
|
db "Halted: Waiting for poweroff...", 0
|
||||||
|
|
||||||
main:
|
main:
|
||||||
call dumpreg
|
|
||||||
mov ax,cs
|
mov ax,cs
|
||||||
mov ds,ax
|
mov ds,ax
|
||||||
mov si, string_halt
|
|
||||||
call kprintf
|
sub sp, 0x30
|
||||||
.loop:
|
|
||||||
hlt
|
xor ax,ax
|
||||||
jmp .loop
|
mov es,ax
|
||||||
|
mov ax,_int_2F
|
||||||
|
xchg ax,[es:0x2F*4]
|
||||||
|
mov ax,cs
|
||||||
|
xchg ax,[es:0x2F*4+2]
|
||||||
|
int 0x2F
|
||||||
|
test ax, 0xFF
|
||||||
|
int 0x2F
|
||||||
|
|
||||||
|
add sp, 0x30
|
||||||
|
|
||||||
|
ret
|
||||||
|
|
||||||
%include "dumpreg.asm"
|
%include "dumpreg.asm"
|
||||||
%include "kprintf.asm"
|
%include "kprintf.asm"
|
||||||
|
Loading…
Reference in New Issue
Block a user