diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-03 23:24:50 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-03 23:24:50 +0200 |
| commit | 49327432b456c3110064556ac4613b49be54b925 (patch) | |
| tree | ae1d75b210b6168010c6a21332795907fc7c2f4d /asm/text_mode.atk16 | |
| parent | bef9b09493403187079f4b8ec6633f5258376f44 (diff) | |
Fix character code mapping
Diffstat (limited to 'asm/text_mode.atk16')
| -rw-r--r-- | asm/text_mode.atk16 | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/asm/text_mode.atk16 b/asm/text_mode.atk16 index fa4f297..7ec9fef 100644 --- a/asm/text_mode.atk16 +++ b/asm/text_mode.atk16 @@ -8,12 +8,39 @@ @include bootstrap @label main - cursor_to_line RA 1 - put_string RA RB " HELLO CORECAMP" - cursor_to_line RA 2 - put_string RA RB " BY JAN" + cursor_to_line RC 1 + put_string RC RB " HELLO CORECAMP" + cursor_to_line RC 2 + put_string RC RB " BY JAN" + cursor_to_line RC 4 + put_string RC RB " > " set_graphics_mode gr_text_mode @label loop jpi loop + +@label keyboard_isr + stack_stash RA RB + ldi vt_kb_pp_addr RA ; RA := Keyboard peripheral address pointer + ldr RA RA ; RA := Keyboard peripheral address deref + ldr RA RA ; RA := <16-bit keyboard character code> from MMIO register + ldi vt_term_pp_addr RB ; RB := Terminal peripheral address pointer + ldr RB RB ; RB := Terminal peripheral address deref + + str RA RC + mov RA RD + 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 " " + cursor_to_line RC 4 + put_string RC RB " > " +@label keyboard_isr_end + stack_restore RA RB + rti |
