monitor: Drastically improve the scrolling performance

This commit is contained in:
Ry 2022-09-02 14:24:46 -07:00
parent 9550e1945b
commit 93093fbbcc
7 changed files with 10 additions and 6 deletions

View File

@ -42,6 +42,7 @@ monitor_shell_parse_command:
; invalid command
mov r0, monitor_shell_invalid_command_string
call print_string_to_monitor
call redraw_monitor_console
ret

View File

@ -5,6 +5,7 @@ monitor_shell_help_command_string: data.str "help" data.8 0
monitor_shell_help_command:
mov r0, monitor_shell_help_text
call print_string_to_monitor
call redraw_monitor_console
ret
monitor_shell_help_text:

View File

@ -11,4 +11,6 @@ monitor_shell_jump_command:
call r0
call redraw_monitor_console
ret

View File

@ -64,6 +64,8 @@ monitor_shell_list_command_ascii_loop_done:
call print_character_to_monitor
loop monitor_shell_list_command_line_loop
call redraw_monitor_console
ret
monitor_shell_list_text: data.str "address | x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF | ASCII" data.8 10 data.8 0

View File

@ -71,4 +71,6 @@ monitor_shell_set32_command:
mov [r10], r11
call redraw_monitor_console
ret

View File

@ -14,7 +14,6 @@ print_string_to_monitor_loop:
inc r3
cmp.8 [r3], 0x00
ifnz jmp print_string_to_monitor_loop
call redraw_monitor_console_line
pop r3
pop r0
ret
@ -41,7 +40,6 @@ print_hex_word_to_monitor_loop:
call print_character_to_monitor
add r1, r6
loop print_hex_word_to_monitor_loop
call redraw_monitor_console_line
pop r31
pop r12
@ -71,7 +69,6 @@ print_hex_byte_to_monitor_loop:
call print_character_to_monitor
add r1, r6
loop print_hex_byte_to_monitor_loop
call redraw_monitor_console_line
pop r31
pop r12
@ -180,9 +177,6 @@ scroll_monitor_console_clear_loop:
inc r0
loop scroll_monitor_console_clear_loop
; redraw the screen
call redraw_monitor_console
pop r31
pop r2
pop r1

View File

@ -5,6 +5,7 @@ monitor_shell_start:
call monitor_shell_clear_buffer
mov r0, monitor_shell_prompt
call print_string_to_monitor
call redraw_monitor_console
monitor_shell_event_loop:
call get_next_event
@ -73,6 +74,7 @@ monitor_shell_key_down_event_enter:
mov r0, monitor_shell_prompt
call print_string_to_monitor
call redraw_monitor_console
ret
monitor_shell_key_down_event_backspace:
; check if we are already at the start of the prompt