#LAG ( -- CDATA -> CHARACTER UNSIGNED )
CDATA -> CHARACTER is the address of the character stored at the editing cursor. UNSIGNED is the number of characters in the current line after the editing cursor.
#LEAD ( -- CDATA -> CHARACTER UNSIGNED )
CDATA -> CHARACTER is the starting address of the current line. UNSIGNED is the number of characters in the current line before the editing cursor.
#LOCATE ( -- UNSIGNED UNSIGNED )
From the editing cursor, determine the line number as the second UNSIGNED and the offset into the line as the first UNSIGNED.
-MOVE ( CDATA -> CHARACTER UNSIGNED-- )
Copy C/L characters starting at address CDATA -> CHARACTER to line UNSIGNED of the current screen. Mark the current screen as updated.
1LINE ( -- FLAG )
Scan the current line for a match to the text in PAD. If a match is found, update the editing cursor to the end of the matching text and return TRUE as FLAG. Otherwise update the editing cursor to the start of the next line and return FALSE as FLAG.
?FIND ( -- )
Search for a match to the text in PAD, from the editing cursor to the end of the current screen. If a match is found, update the editing cursor to the end of the matching text. Otherwise issue an error message and update the editing cursor to the top of the screen.
B ( -- )
Move the editing cursor back by the number in COUNT. Then display the current line, inserting an underscore character at the cursor position.
C ( "ccc" -- )
Initialize PAD with spaces. Parse ccc delimited by the end of the line. Copy ccc to PAD and store the number of characters copied in COUNT. Insert ccc at the editing cursor, moving the rest of the current line to the right. Then display the current line, inserting an underscore character at the cursor position.
CLEAR ( UNSIGNED -- )
Clear block UNSIGNED. Store UNSIGNED in SCR. Move the editing cursor to the top of the screen.
COPY ( unsigned 1ST -- )
Copy the contents of block UNSIGNED to block 1ST.
COUNT ( -- DATA -> UNSIGNED )
DATA -> UNSIGNED is the address of a cell containing the length of the character string stored in PAD.
D ( UNSIGNED -- )
Copy the contents of line UNSIGNED into PAD. Delete line UNSIGNED. All following lines move one line up.
DEL ( UNSIGNED -- )
Delete UNSIGNED characters prior to the editing cursor.
E ( UNSIGNED -- )
Erase line UNSIGNED with spaces.
F ( "ccc" -- )
Initialize PAD with spaces. Parse ccc delimited by the end of the line. Copy ccc to PAD and store the number of characters copied in COUNT. Search for a match to ccc, from the editing cursor to the end of the current screen. If a match is found, update the editing cursor to the end of the matching text. Then display the current line, inserting an underscore character at the cursor position. Otherwise issue an error message and update the editing cursor to the top of the screen.
H ( UNSIGNED -- )
Copy the contents of line UNSIGNED into PAD.
I ( UNSIGNED -- )
Insert the contents of PAD in line UNSIGNED. The original line UNSIGNED and all following lines move one line down.
INDEX ( UNSIGNED 1ST -- )
Display the first line of each block starting with block UNSIGNED up to and including block 1ST.
L ( -- )
Display the contents of the current screen. Then display the current line, inserting an underscore character at the cursor position.
LINE ( UNSIGNED -- CDATA -> CHARACTER )
CDATA -> CHARACTER is the address of line UNSIGNED of the current screen. An ambigous condition exists if UNSIGNED is not within the allowed range for line numbers (0 to 15).
LIST ( UNSIGNED -- )
Display the contents of block UNSIGNED. Store UNSIGNED in SCR. Move the editing cursor to the top of the screen.
M ( integer -- )
Move the editing cursor by the signed amount INTEGER. Then display the current line, inserting an underscore character at the cursor position.
N ( -- )
Search for a match to the text in PAD, from the editing cursor to the end of the current screen. If a match is found, update the editing cursor to the end of the matching text. Then display the current line, inserting an underscore character at the cursor position. Otherwise issue an error message and update the editing cursor to the top of the screen.
P ( UNSIGNED "ccc" -- )
Initialize PAD with spaces. Parse ccc delimited by the end of the line. Copy ccc to PAD and store the number of characters copied in COUNT. Copy ccc to line UNSIGNED.
R ( UNSIGNED -- )
Replace line UNSIGNED with the contents of PAD.
R# ( -- DATA -> UNSIGNED )
DATA -> UNSIGNED is the address of a cell containing the offset of the editing cursor from the top of the screen.
S ( UNSIGNED -- )
Insert an empty line at line UNSIGNED. The original line UNSIGNED and all following lines move one line down. This editor command is called spread.
T ( UNSIGNED -- )
Move the editing cursor to the start of line UNSIGNED. Copy the contents of line UNSIGNED into PAD and display it.
TOP ( -- )
Move the editing cursor to the top of the screen.
TEXT ( CHARACTER "ccc" -- )
Initialize PAD with spaces. Parse ccc delimited by the delimiter CHARACTER. Copy ccc to PAD and store the number of characters copied in COUNT.
TILL ( "ccc" -- )
Initialize PAD with spaces. Parse ccc delimited by the end of the line. Copy ccc to PAD and store the number of characters copied in COUNT. Search for a match to ccc, from the editing cursor to the end of the current line. If a match is found, delete all character between the editing cursor and the end of the matching text. Then display the current line, inserting an underscore character at the cursor position. Otherwise issue an error message and update the editing cursor to the start of the next line.
X ( "ccc" -- )
Initialize PAD with spaces. Parse ccc delimited by the end of the line. Copy ccc to PAD and store the number of characters copied in COUNT. Search for a match to ccc, from the editing cursor to the end of the current screen. If a match is found, delete it. Then display the current line, inserting an underscore character at the cursor position. Otherwise issue an error message and update the editing cursor to the top of the screen.
Dr. Stephan Becher - January 9th, 2008