progress: new assembler works, instruction set fully implemented with call/ret and push/pop, bf.dsa works which means the dsa assembly language works reliably. still a few bugs to fix. might be able to squeeze out a tiny bit more performance
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
include print: "./print.dsa"
|
||||
db msg: "hello world"
|
||||
dw stack: 0x1000
|
||||
_init:
|
||||
ldw stack, bpr
|
||||
mov bpr, spr
|
||||
lwi 1000000, rg5
|
||||
|
||||
_loop:
|
||||
call print::reset
|
||||
lwi msg, rg0
|
||||
push rg0
|
||||
call print::print
|
||||
pop zero
|
||||
subi rg5, 1, rg5
|
||||
igt rg5, zero, rg4
|
||||
jnz rg4, _loop
|
||||
|
||||
hlt
|
||||
Reference in New Issue
Block a user