worked on print.dsa and maths/core.dsa
This commit is contained in:
+21
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user