worked on print.dsa and maths/core.dsa

This commit is contained in:
2025-06-25 00:40:31 +01:00
parent 82b99c127c
commit c171b0db89
9 changed files with 172 additions and 320 deletions
+34
View File
@@ -0,0 +1,34 @@
include print "../io/print.dsa"
dw idt: 0xFFFF0000
setup_idt:
push bpr
mov spr, bpr
// load the IDT into the IDR
ldw idt, idr
mov bpr, spr
pop bpr
irt
setup_hard_fault_handler:
push bpr
mov spr, bpr
lwi handle_hard_fault, rg0
stw rg0, idr, 4
mov bpr, spr
pop bpr
irt
dw hard_fault_err: "FATAL: Illegal Instruction or Memory Access!"
handle_hard_fault:
call print::reset
lwi hard_fault_err, rg0
push rg0
call print::print
pop zero
hlt