added a create-project system to assembler, and fixed a couple of parsing bugs
This commit is contained in:
+5
-14
@@ -1,5 +1,4 @@
|
||||
include print "./print.dsa"
|
||||
include fib "./fib.dsa"
|
||||
|
||||
dw stack: 0x10000
|
||||
db string: "An idiot admires complexity, a genius admires simplicity,
|
||||
@@ -9,23 +8,15 @@ gonna think you're a god cause you made it so complicated nobody can understand
|
||||
That's how they write journals in Academics, they try to make it so complicated people think you're a genius"
|
||||
|
||||
init:
|
||||
// set up a stack.
|
||||
ldw stack, bpr
|
||||
mov bpr, spr
|
||||
|
||||
start:
|
||||
lwi string, rg1
|
||||
|
||||
// push variables
|
||||
push rg1 // string address.
|
||||
push pcx // return address.
|
||||
|
||||
// call
|
||||
jmp print::print
|
||||
|
||||
|
||||
lli 25, rg0
|
||||
push rg0
|
||||
push pcx
|
||||
jmp fib::fib_n
|
||||
|
||||
push rg1
|
||||
call print::print
|
||||
pop rg1
|
||||
|
||||
hlt
|
||||
Reference in New Issue
Block a user