IT WORKS HELL YEAH.

This commit is contained in:
2025-06-18 22:53:01 +01:00
parent 1210b19333
commit e281bc2d1d
26 changed files with 715 additions and 188 deletions
+36
View File
@@ -0,0 +1,36 @@
dw string: "this is some random string idk"
dw len: 8
start:
// we use lwi in this case because
// in a generic case 'string' could be a 32 bit addr
lwi string, rg1
push rg1
lwi len, rg1
push rg1
push pcx
jmp start
hlt
dw display: 0x20000
print:
pop ret // return address
pop rg0 // length
pop rg1 // string
ldw display, rg2
loop:
ldw rg1, acc
stw acc, rg2
dec rg0
iadd rg1, 4
iadd rg2, 4
cmp rg0, zero
jge loop
end:
jmp 4, ret