If the user just press enter, do not handle this as a command

This commit is contained in:
Baptiste Wicht 2013-10-19 16:24:21 +02:00
parent 3b0efe5aab
commit c360a149a8
3 changed files with 8 additions and 3 deletions

View File

@ -531,7 +531,7 @@ date_command:
mov r9, colon_length
call print_normal
.display
.display:
; print everything

View File

@ -55,10 +55,15 @@ key_entered:
jmp .end_handler
.enter:
mov r8, [current_input_length]
; If the user didn't enter anything, just go to the next line
test r8, r8
je .end
call goto_next_line
; zero terminate the input string
mov r8, [current_input_length]
mov byte [current_input_str + r8], 0
; Iterate through the command table and compare each string

View File

@ -70,7 +70,7 @@ goto_next_line:
mov rsi, TRAM + 2 * 0x14 * 8
mov rdi, TRAM + 1 * 0x14 * 8
.scroll_up
.scroll_up:
mov al, byte [rsi]
mov byte [rdi], al