Change the way escape works slightly and correct some terminology in the readme

This commit is contained in:
CrazyEttin 2022-08-24 14:41:30 +03:00
parent b91f86f1b6
commit 280a948e8b
2 changed files with 26 additions and 12 deletions

View File

@ -15,12 +15,12 @@ cmdp: load r0, prompt
store ffff, r0 store ffff, r0
;Input the command ;Input the command
cleq r0, r0, input cmdin: cleq r0, r0, input
;Check for control characters ;Check for control characters
;Escape ;Escape
load r0, esc load r0, esc
breq r0, r2, cmdp breq r0, r2, cmdesc
;End-of-file ;End-of-file
load r0, eof load r0, eof
breq r0, r2, end breq r0, r2, end
@ -276,6 +276,11 @@ cnarg: load r1, ucp
cmderr: cleq r0, r0, error cmderr: cleq r0, r0, error
breq r0, r0, cmdp breq r0, r0, cmdp
cmdesc: load r0, space
store ffff, r0
store ffff, r0
breq r0, r0, cmdin
;*** ;***
;Insert a line ;Insert a line
@ -287,12 +292,12 @@ insln: cleq r0, r0, fend
instrt: cleq r0, r0, prnln instrt: cleq r0, r0, prnln
;Input the line ;Input the line
cleq r0, r0, input inline: cleq r0, r0, input
;Check for control characters ;Check for control characters
;Escape ;Escape
load r0, esc load r0, esc
breq r0, r2, instrt breq r0, r2, inesc
;End-of-file ;End-of-file
load r0, eof load r0, eof
breq r0, r2, cmdp breq r0, r2, cmdp
@ -323,6 +328,15 @@ instrt: cleq r0, r0, prnln
;Insert the next line ;Insert the next line
breq r0, r0, insln 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 ;Set a mark for copying

View File

@ -10,9 +10,9 @@ System requirements
------------------- -------------------
Gidubba requires a terminal with local echo at address FFFF, and Gidubba requires a terminal with local echo at address FFFF, and
optionally a line printer at address FFFE and a punched tape reader and optionally a character printer at address FFFE and a punched tape reader
punch or a casette drive at FFFD. If your setup differs from this you and punch or a casette drive at FFFD. If your setup differs from this
have to modify the code yourself. you have to modify the code yourself.
Usage Usage
----- -----
@ -40,9 +40,9 @@ Commands with no arguments:
* R: Read from the tape reader or casette drive * R: Read from the tape reader or casette drive
* W: Write to the tape punch or casette drive * W: Write to the tape punch or casette drive
A delete (^?) discards the preceding character if any and outputs an A delete (^?) discards the preceding character and outputs an underscore
underscore to the terminal. An escape (^[) discards the current command to the terminal. An escape (^[) discards the contents of the current
or line and gives a prompt for retyping it. An end-of-file (^Z) discards command or line and outputs a backslash and a newline to the terminal.
the current command and halts the computer or discards the current line An end-of-file (^Z) discards the current command and halts the computer
and returns to the command prompt. or discards the current line and returns to the command prompt.