updates to dsa libs

This commit is contained in:
2025-06-26 00:51:20 +01:00
parent 620584488b
commit e9f04824ea
4 changed files with 152 additions and 26 deletions
+28
View File
@@ -0,0 +1,28 @@
dw idt: 0xFFFF0000
dw stack: 0x10000
init:
// setup interrupt handlers
ldw idt, idr
lwi handle_hard_fault, rg0
stw rg0, idr, 4
// set up a stack.
ldw stack, bpr
mov bpr, spr
start:
lwi 10, rg0
push rg0
call maths::fib_n
pop zero
hlt
// fault handler in case we fail DSA.
dw hard_fault_err: "FATAL: Illegal Instruction or Memory Access!"
handle_hard_fault:
call print::clear
call print::reset
lwi hard_fault_err, rg0
push rg0
call print::print
pop zero
hlt