new ui, control panel kinda works, display works, framebuffer works, serial write works. widget for registers works. next is serial input and the editor
This commit is contained in:
+25
-2
@@ -185,8 +185,8 @@ print_whitespace: func
|
||||
addi rg1, 1
|
||||
jmp _end
|
||||
|
||||
// // ------------------------------------------
|
||||
// // print newline
|
||||
// ------------------------------------------
|
||||
// print newline
|
||||
// print_newline:
|
||||
// push bpr
|
||||
// mov spr, bpr
|
||||
@@ -214,6 +214,29 @@ print_whitespace: func
|
||||
|
||||
// jmp _end
|
||||
|
||||
newline:
|
||||
push bpr
|
||||
mov spr, bpr
|
||||
|
||||
ldw display, rg0
|
||||
ldw current, rg1
|
||||
|
||||
sub rg1, rg0, rg2 // offset from base
|
||||
lli 80, rg3
|
||||
|
||||
_newline_mod:
|
||||
ilt rg2, rg3, rg4
|
||||
jnz rg4, _newline_done
|
||||
sub rg2, rg3, rg2
|
||||
jmp _newline_mod
|
||||
|
||||
_newline_done:
|
||||
// rg2 = offset % 80 (position within current line)
|
||||
sub rg1, rg2, rg1 // go back to line start
|
||||
addi rg1, 80, rg1 // advance to next line
|
||||
|
||||
jmp _end
|
||||
|
||||
// ------------------------------------------
|
||||
// prints arg[0] as a decimal number to the screen.
|
||||
// print_num:
|
||||
|
||||
Reference in New Issue
Block a user