progress on serial and added editor

This commit is contained in:
2026-03-16 04:31:47 +00:00
parent a4446cdb62
commit 6061e1701e
47 changed files with 1878 additions and 396 deletions
+22 -2
View File
@@ -34,20 +34,34 @@ dw current: 0x20000
// ------------------------------------------
// prints the string at addr(arg[0]) to the screen.
print: func
push rg0
push rg1
push rg2
push rg3
ldw bpr, rg0, 8
ldw current, rg1
_print_loop:
ldb rg0, rg2
ieq rg2, zero, rg4
jnz rg4, _end
ieq rg2, zero, rg3
jnz rg3, _print_end
stb rg2, rg1
addi rg0, 1
addi rg1, 1
jmp _print_loop
_print_end:
stw rg1, current
pop rg3
pop rg2
pop rg1
pop rg0
return
// ------------------------------------------
// println:
// push bpr
@@ -99,11 +113,17 @@ _print_loop:
// ------------------------------------------
// prints the last byte of arg[0] to the screen.
print_byte: func
push rg0
push rg1
ldw bpr, rg0, 8
ldw current, rg1
stb rg0, rg1
addi rg1, 1
pop rg1
pop rg0
jmp _end
// ------------------------------------------