aboutsummaryrefslogtreecommitdiffstats
path: root/asm/text_mode.atk16
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2023-11-04 12:10:40 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2023-11-04 12:10:40 +0200
commit066ad25889c143f62a817248f7fbf66490a7f4a3 (patch)
tree51f61e012f8095661f40c081ee50e33065f95c9e /asm/text_mode.atk16
parent6b7965facbeb34fd1fc84fff2bdd3d3a0c17e474 (diff)
Add backspace support
Diffstat (limited to 'asm/text_mode.atk16')
-rw-r--r--asm/text_mode.atk1619
1 files changed, 13 insertions, 6 deletions
diff --git a/asm/text_mode.atk16 b/asm/text_mode.atk16
index d7cdcec..9a57954 100644
--- a/asm/text_mode.atk16
+++ b/asm/text_mode.atk16
@@ -29,18 +29,25 @@
ldi vt_term_pp_addr RB ; RB := Terminal peripheral address pointer
ldr RB RB ; RB := Terminal peripheral address deref
+ mov RA RD
+ subi RD 5 RD
+ subi RD 5 RD
+ bri zero keyboard_isr_clear
+ mov RA RD
+ subi RD 5 RD
+ subi RD 3 RD
+ bri zero keyboard_isr_backspace
str RA RC
addi RC 1 RC
-
- subi RA 5 RA
- subi RA 5 RA
- bri zero keyboard_isr_clear
jpi keyboard_isr_end
@label keyboard_isr_clear
- ; cursor_to_line RC 4
- ; put_string RC RB " "
new_line RC
put_string RC RB " > "
+ addi RC 1 RC
+@label keyboard_isr_backspace
+ subi RC 1 RC
+ put_char RC RB " "
+ subi RC 1 RC
@label keyboard_isr_end
stack_restore RA RB
rti