Skip to content

Commit 30552a4

Browse files
author
Ian Seyler
committed
Support backspace in serial output
1 parent f4ded2c commit 30552a4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/syscalls/io.asm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ b_output_serial:
4444

4545
b_output_serial_next:
4646
lodsb ; Load a byte from the string into AL
47+
cmp al, 3 ; Check for Decrement cursor
48+
je b_output_serial_decrement
4749
cmp al, 10 ; Check for Line Feed
4850
jne b_output_serial_send
4951
mov al, 13 ; Carriage Return
@@ -58,6 +60,11 @@ b_output_serial_send:
5860
pop rcx
5961
pop rsi
6062
ret
63+
64+
b_output_serial_decrement:
65+
mov al, 8 ; Backspace
66+
jmp b_output_serial_send
67+
6168
; -----------------------------------------------------------------------------
6269

6370

0 commit comments

Comments
 (0)