Files
damn_simple_architecture/resources/dsa/test.dsa
T

34 lines
477 B
Plaintext

include print "./lib/io/print.dsa"
dw idt: 0xFFFF0000
dw stack: 0x10000
db interrupt: "INT: Hello world"
init:
// set up a stack.
ldw stack, bpr
mov bpr, spr
start:
ldw idt, idr
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