print CRLF instead of just CR
This commit is contained in:
parent
312332cdda
commit
cedf9fc1d4
1 changed files with 12 additions and 2 deletions
14
messages.asm
14
messages.asm
|
@ -84,19 +84,29 @@ int 0x10
|
|||
mov dx, 0x00 ; COM1
|
||||
int 0x14
|
||||
|
||||
cmp al, 0x0D ; enter
|
||||
je .nl
|
||||
cmp al, 0x0D ; enter (carriage return)
|
||||
je .nl_lf
|
||||
|
||||
jmp nonewline ; all other characters
|
||||
|
||||
.nl_reset_state:
|
||||
mov byte[is_from_virtual_kbd], 0x0 ; reset state variable
|
||||
jmp .nl
|
||||
|
||||
;; BIOS keyboard routines read <enter> as CR which is usually not recognized
|
||||
;; as actually beginning a new line, so anytime a CR is sent a LF is sent with
|
||||
;; it
|
||||
.nl_lf:
|
||||
mov al, 0x0A ; line feed
|
||||
mov ah, 0x01 ; transmit char
|
||||
int 0x14
|
||||
.nl:
|
||||
call newline
|
||||
jmp .loop
|
||||
|
||||
.virtual_kbd_loop_init:
|
||||
mov byte[is_from_virtual_kbd], 0x1 ; update state variable
|
||||
;; same as regular .loop except nothing is sent to serial
|
||||
.virtual_kbd_loop:
|
||||
;; read a character, ASCII in al
|
||||
mov ah, 0x00
|
||||
|
|
Loading…
Reference in a new issue