I now have TECO ported and running on the Atari. TECO is an implementation of DEC's Text Editor and COrrector for the 6502. All editing functionality should be there (I haven't test this port much). File I/O (reading and writing input and output files) has yet to be ported:. Yeah, I know, it's pretty useless without. I'll be looking at doing that part next. For those not familiar with TECO, not only is it a character-oriented editor, but it is considered Turing complete, meaning you can write programs with it. For example, the code:
will insert the numbers 10 to 100 with increments of 10 into the text buffer, then print the buffer. Note the '$' shown in the command is the ESC key. Two ESCs terminates and executes the command. The code means:
- 10U1 = Assign the value 10 to Q-register 1 (Q-registers are numeric or text-holding registers).
- 10<...> means execute the enclosed text 10 times
- Q!\ = Insert the value held in Q-register 1 into the text buffer
- Q1+10U1 = Take the value held in Q-register 1, add 10 to it and place the result back in Q-register 1
- I<eol> = Insert an end of line
- HT = Show the entire text buffer
TECO is pretty cryptic, but very cool. Like Perl, it has pattern-matching capabilities too. Anyway, give it a shot and let me know what you think.
You can find a copy of the executable attached.