From 280a948e8bed008bf6a8e3c8d569683f1e8a0b4b Mon Sep 17 00:00:00 2001 From: CrazyEttin <> Date: Wed, 24 Aug 2022 14:41:30 +0300 Subject: [PATCH] Change the way escape works slightly and correct some terminology in the readme --- gidubba.asm | 22 ++++++++++++++++++---- readme.md | 16 ++++++++-------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/gidubba.asm b/gidubba.asm index 6b83335..1f0129a 100644 --- a/gidubba.asm +++ b/gidubba.asm @@ -15,12 +15,12 @@ cmdp: load r0, prompt store ffff, r0 ;Input the command - cleq r0, r0, input +cmdin: cleq r0, r0, input ;Check for control characters ;Escape load r0, esc - breq r0, r2, cmdp + breq r0, r2, cmdesc ;End-of-file load r0, eof breq r0, r2, end @@ -276,6 +276,11 @@ cnarg: load r1, ucp cmderr: cleq r0, r0, error breq r0, r0, cmdp +cmdesc: load r0, space + store ffff, r0 + store ffff, r0 + breq r0, r0, cmdin + ;*** ;Insert a line @@ -287,12 +292,12 @@ insln: cleq r0, r0, fend instrt: cleq r0, r0, prnln ;Input the line - cleq r0, r0, input +inline: cleq r0, r0, input ;Check for control characters ;Escape load r0, esc - breq r0, r2, instrt + breq r0, r2, inesc ;End-of-file load r0, eof breq r0, r2, cmdp @@ -323,6 +328,15 @@ instrt: cleq r0, r0, prnln ;Insert the next line breq r0, r0, insln +inesc: load r0, space + store ffff, r0 + store ffff, r0 + store ffff, r0 + store ffff, r0 + store ffff, r0 + store ffff, r0 + breq r0, r0, inline + ;*** ;Set a mark for copying diff --git a/readme.md b/readme.md index 056ee9c..d055b7c 100644 --- a/readme.md +++ b/readme.md @@ -10,9 +10,9 @@ System requirements ------------------- Gidubba requires a terminal with local echo at address FFFF, and -optionally a line printer at address FFFE and a punched tape reader and -punch or a casette drive at FFFD. If your setup differs from this you -have to modify the code yourself. +optionally a character printer at address FFFE and a punched tape reader +and punch or a casette drive at FFFD. If your setup differs from this +you have to modify the code yourself. Usage ----- @@ -40,9 +40,9 @@ Commands with no arguments: * R: Read from the tape reader or casette drive * W: Write to the tape punch or casette drive -A delete (^?) discards the preceding character if any and outputs an -underscore to the terminal. An escape (^[) discards the current command -or line and gives a prompt for retyping it. An end-of-file (^Z) discards -the current command and halts the computer or discards the current line -and returns to the command prompt. +A delete (^?) discards the preceding character and outputs an underscore +to the terminal. An escape (^[) discards the contents of the current +command or line and outputs a backslash and a newline to the terminal. +An end-of-file (^Z) discards the current command and halts the computer +or discards the current line and returns to the command prompt.  \ No newline at end of file