fox32rom: Fix a few mistakes with the monitor
This commit is contained in:
parent
92f23e91a6
commit
9769b10df6
|
@ -3,8 +3,6 @@
|
||||||
; print a string to the monitor
|
; print a string to the monitor
|
||||||
; inputs:
|
; inputs:
|
||||||
; r0: pointer to null-terminated string
|
; r0: pointer to null-terminated string
|
||||||
; r1: foreground color
|
|
||||||
; r2: background color
|
|
||||||
; outputs:
|
; outputs:
|
||||||
print_string_to_monitor:
|
print_string_to_monitor:
|
||||||
push r0
|
push r0
|
||||||
|
@ -23,20 +21,12 @@ print_string_to_monitor_loop:
|
||||||
; print a single character to the monitor
|
; print a single character to the monitor
|
||||||
; inputs:
|
; inputs:
|
||||||
; r0: character
|
; r0: character
|
||||||
; r1: foreground color
|
|
||||||
; r2: background color
|
|
||||||
; outputs:
|
; outputs:
|
||||||
; none
|
; none
|
||||||
print_character_to_monitor:
|
print_character_to_monitor:
|
||||||
push r0
|
push r0
|
||||||
push r1
|
push r1
|
||||||
push r2
|
push r2
|
||||||
push r3
|
|
||||||
push r4
|
|
||||||
push r5
|
|
||||||
|
|
||||||
mov r3, r1
|
|
||||||
mov r4, r2
|
|
||||||
|
|
||||||
cmp.8 r0, 0 ; null
|
cmp.8 r0, 0 ; null
|
||||||
ifz jmp print_character_to_monitor_end
|
ifz jmp print_character_to_monitor_end
|
||||||
|
@ -80,9 +70,6 @@ print_character_to_monitor_lf:
|
||||||
ifgteq call scroll_monitor_console
|
ifgteq call scroll_monitor_console
|
||||||
call redraw_monitor_console
|
call redraw_monitor_console
|
||||||
print_character_to_monitor_end:
|
print_character_to_monitor_end:
|
||||||
pop r5
|
|
||||||
pop r4
|
|
||||||
pop r3
|
|
||||||
pop r2
|
pop r2
|
||||||
pop r1
|
pop r1
|
||||||
pop r0
|
pop r0
|
||||||
|
|
|
@ -61,8 +61,6 @@ monitor_event_loop:
|
||||||
key_down_event:
|
key_down_event:
|
||||||
mov r0, r1
|
mov r0, r1
|
||||||
call scancode_to_ascii
|
call scancode_to_ascii
|
||||||
mov r1, TEXT_COLOR
|
|
||||||
mov r2, 0x00000000
|
|
||||||
call print_character_to_monitor
|
call print_character_to_monitor
|
||||||
call redraw_monitor_console_line
|
call redraw_monitor_console_line
|
||||||
ret
|
ret
|
||||||
|
|
Loading…
Reference in New Issue
Block a user