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
+21 -6
View File
@@ -1,7 +1,8 @@
include print "./lib/print.dsa"
include print "./lib/io/print.dsa"
dw idt: 0xFFFF0000
dw stack: 0x10000
db string: "Hello world"
db interrupt: "INT: Hello world"
init:
// set up a stack.
@@ -9,10 +10,24 @@ init:
mov bpr, spr
start:
lwi string, rg1
ldw idt, idr
push rg1
call print::print
pop rg1
lwi handle_hard_fault, rg0
stw rg0, idr, 4
lli 0x20, rg0
push rg0
call print::print_hex_byte
pop zero
hlt
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