diff --git a/src/kernal/arnitech/arnitech_terminal.s b/src/kernal/arnitech/arnitech_terminal.s index 3bcbebc7..64bfcdb0 100644 --- a/src/kernal/arnitech/arnitech_terminal.s +++ b/src/kernal/arnitech/arnitech_terminal.s @@ -29,8 +29,9 @@ terminal_find: ; ; Outside quote and insert mode the byte goes to Output. While either is on, every control code ; but RETURN, SHIFT+RETURN, and STOP goes to Literal, which draws it as a glyph; so does DEL -; while INSRT is not 0, which a DEL between quotes leaves to delete. RETURN, SHIFT+RETURN, and -; STOP end both modes. A glyph drawn counts INSRT down, a quote toggles QTSW, and an INS that +; while INSRT is not 0, which a DEL between quotes leaves to delete, but INS then opens another +; space, as on a C64 (Programmer's Reference Guide, p. 96). RETURN, SHIFT+RETURN, and STOP end +; both modes. A glyph drawn counts INSRT down, a quote toggles QTSW, and an INS that ; opened a space (status bit 3) counts INSRT up. ; @@ -78,7 +79,11 @@ chrout_terminal_control: beq chrout_terminal_end_modes ldy INSRT - bne chrout_terminal_literal ; in the spaces INS opened, DEL too is a glyph + beq @1 + cmp #KEY_INS + beq chrout_terminal_code ; in the spaces INS opened, INS opens another + bne chrout_terminal_literal ; ... and DEL too is a glyph +@1: ldy QTSW beq chrout_terminal_code cmp #KEY_DEL