Skip to content

Latest commit

 

History

History
177 lines (110 loc) · 5.29 KB

new.md

File metadata and controls

177 lines (110 loc) · 5.29 KB

TECO-64 – New & Enhanced Features

This document describes the features that are either new to TECO-64, or which have been copied or enhanced from earlier TECOs.

General syntax changes

Whitespace may be used to make TECO-64 commands more readable. However, unlike previous versions of TECO, whitespace may not occur within anything considered a token, which includes digit strings and multi-character commands such as ER or FS. Therefore, commands such as “1 2 3 =” are no longer valid, and must instead be written as “123=” or “123 =”. Whitespace between tokens is always valid.

Note that whitespace may now occur between a search or replace command and any subsequent semi-colon command. Earlier versions of TECO required that semi-colons immediately followed such commands, and printed a NAS error if they did not. So the following are now valid:

< @S/foo/ ; >

< @FN/foo/baz/ ; >

If the E2&4 flag bit is set, an error will result if the following occurs:

  • An at sign is used to modify a command that does not allow it.
  • More than one at sign is used to modify a command.

If the E2&8 flag bit is set, an error will result if the following occurs:

  • A colon is used to modify a command that does not allow it.
  • A double colon is used to modify a command that does not allow it.
  • More than two colons are used to modify a command.

Numeric expressions consist of either a single numeric value, called n, or a pair of values, called m and n, separated by a comma. If a comma is seen, then it must be preceded by an m argument, and must be followed by an n argument. Multiple commas are not allowed.

Colons are allowed for all commands that open files, and will result in -1 being returned if the open succeeded, and 0 if it failed.

Commands

^A - Print text

  • Added colon modifier for adding CR/LF after text.

^E - Match control constructs

  • Added ^Ennn.

[^F - Reserved for future use]

^K - Reset display colors

^P - Current page number (TECO-10)

^T - Type character

  • Added repeat count.
  • Allowed -1 for printing CR/LF.

^U - Add/Delete Q-register text

  • Added ability to delete text.

^V - Lower case text (TECO-10)

^W - Upper case text (TECO-10)

^X- Search mode flag

  • Flag may be set to 1, in addition to 0 and -1.

; - Branch out of current iteration

  • Allowed whitespace preceding semi-colon.

= - Print numeric value

  • Added ability to use printf() format string.

@ - Text argument modifier

  • Restricted delimiters to graphic ASCII characters.
  • Allowed whitespace between command and delimiter.

C - Move Pointer Forward

  • Added colon modifier to return success/failure value. (TECO-10)

D - Delete Characters

  • Added colon modifier to return success/failure value. (TECO-10)

E% - Write file from Q-register (TECO-10)

E1 - Extended Features Flag

E2 - Command Restrictions Flag

E3 - File Operations Flag

E4 - Display Mode Flag

EC - Set Memory Size (TECO-10)

EI - Indirect File Command

  • Added colon modifier to return success/failure value.

EJ - Get environment information

  • Changed returned values, and added new ones.

EL - Open/close log file (TECO-10)

EM - Echo macro in Q-register

EO - TECO version number

  • Updated version number of 200, and added minor and patch versions.

EQ - Read file to Q-register (TECO-10)

EW - Open output file

  • Added colon modifier to return success/failure value.

EY - Yank backwards

  • Added optional code to allow backwards paging (TECO-32).

EZ - Execute system command w/o exiting

F0 - Edit buffer position at start of window (TECO-10)

F1 - Set command window colors

F2 - Set text window colors

F3 - Set status line colors

FD - Search and delete (TECO-10)

[FF - Reserved for future use]

FH - Equivalent to F0,FZ (TECO-10)

FK - Search and delete (TECO-10)

FL - Lower case text

FM - Map keycode to command string

FQ - Map keycode to Q-register

FU - Upper case text

FZ - Edit buffer position at end of window (TECO-10)

G+ - Results of last ::EG command

I - Insert string

  • Added repeat count.

J - Jump to position

  • Added colon modifier to return success/failure value. (TECO-10)

L - Line count

  • Added colon modifier to return line count.

N - Non-stop search

  • Allowed backwards searching if virtual memory code included. (TECO-32)

P - Write page to file

  • Allowed backwards paging if virtual memory code included. (TECO-32)

R - Move pointer backward

  • Added colon modifier to return success/failure value. (TECO-10)

U - Load Q-register with numeric value

  • Added colon modifier to allow for default value.

X - Load Q-register from edit buffer

  • Added ability to delete text from Q-register.

Y - Yank page

  • Allowed backwards yanking if virtual memory code included. (TECO-32)

{} - Braced text arguments