Old editors - TRS-80 BASIC, Altair BASIC
Tuesday, 31 March 2026 07:42 pmFell down a deep rabbithole today. For far too long I have been on a quest to find (or create) the perfect text editor. Today I found out about TECO -- the ancestor to emacs. If you thought emacs is ugly (I do) then you will be appalled at the awful, powerful ugliness of TECO. It is fascinating.
This seems a bit random, right? Spending much of the day reading about a text editor whose heyday was way back when I was a kid in school? I came to that after musing about the command set for the line editor Microsoft made for the TRS-80 and CoCo computers (I know the CoCo is technically a TRS-80 computer, but that gets confusing). The clumsy line editor (for editing program lines) has a very sparse, but powerful command set of just 16 instructions:
I wondered if there were any more, so I read the disassembly of the BASIC ROMs for the old TRS-80 and CoCo. No. That's the full command set for their line editor.
I became curious about where they got the idea for this line editor from. When I looked for earlier examples of use of these commands in a line editor, I found that Bill Gates, and Paul Allen also wrote the BASIC interpreter for the Altair 8080 -- the world's first personal computer -- and Gates recently released the source code. So I read through its code. No, that early version doesn't include a line editor, however it turns out that a later, extended version of the Altair's BASIC in 1977 did have an identical line editor (I don't have the code for it, but was able to download a manual for it).
Interestingly, he and Allen didn't have an Altair at the time they wrote that BASIC, but their school had timeshare access to a PDP-8, and Paul Allen had written an 8080 emulator for the PDP-8, so they wrote the BASIC interpreter on the PDP-8 using that emulator! I don't know what editor they used at the time, but it might have been TECO... and that's how I came to be doing that particular bit of computer archaeology.
Oh, and by the way, if you feel masochistic enough, you can download and compile TECO today.
https://github.com/blakemcbride/TECOC
This seems a bit random, right? Spending much of the day reading about a text editor whose heyday was way back when I was a kid in school? I came to that after musing about the command set for the line editor Microsoft made for the TRS-80 and CoCo computers (I know the CoCo is technically a TRS-80 computer, but that gets confusing). The clumsy line editor (for editing program lines) has a very sparse, but powerful command set of just 16 instructions:
| nSpace | Move forward n number of characters |
| nC | Change n number of characters |
| nD | Delete n number of characters |
| nSc | Search for nth occurence of character c |
| nKc | Kill (delete) to nth occurrence of character c |
| n ← | Move cursor n characters to the left |
| I | Insert text |
| H | Hack off rest of line and go into insert mode |
| L | List current line and continue editing |
| X | eXtends line - go to end of line and enter insert mode |
| A | Abort changes and continue editing |
| Shift ↑ | escape subcommand (escape insert mode) |
| Q | Quit without saving |
| Break | Quit without saving |
| E | End editing, save changes |
| Enter | End editing, save changes |
I wondered if there were any more, so I read the disassembly of the BASIC ROMs for the old TRS-80 and CoCo. No. That's the full command set for their line editor.
I became curious about where they got the idea for this line editor from. When I looked for earlier examples of use of these commands in a line editor, I found that Bill Gates, and Paul Allen also wrote the BASIC interpreter for the Altair 8080 -- the world's first personal computer -- and Gates recently released the source code. So I read through its code. No, that early version doesn't include a line editor, however it turns out that a later, extended version of the Altair's BASIC in 1977 did have an identical line editor (I don't have the code for it, but was able to download a manual for it).
Interestingly, he and Allen didn't have an Altair at the time they wrote that BASIC, but their school had timeshare access to a PDP-8, and Paul Allen had written an 8080 emulator for the PDP-8, so they wrote the BASIC interpreter on the PDP-8 using that emulator! I don't know what editor they used at the time, but it might have been TECO... and that's how I came to be doing that particular bit of computer archaeology.
Oh, and by the way, if you feel masochistic enough, you can download and compile TECO today.
https://github.com/blakemcbride/TECOC
no subject
Date: 2026-03-31 11:46 am (UTC)The BASIC interpreter seems to have been written by Hong Kong company "Video Technology", also apparently known as VTech. From Wikipedia page on the VTech Laser 200 (VZ200): Back then, I looked enviously at those VZ200 computers at Dick Smiths, but couldn't really afford one. It had the same video processor chip as the CoCo, but used a Z80 microprocessor. What an interesting machine.
Additional: I managed to download the ROM code for the VZ200 (or VZ300?), so can disassemble it one day if I ever get the urge to. The BASIC of the VZ is suprisingly sophisticated. Very cool!
Additional additional: There is actually a VZ200/300 emulator (which I downloaded, of course https://web.archive.org/web/20040909090109fw_/http://www.fortunecity.com/skyscraper/laser/184/vzemu.zip all bow to the wonderful InternetArchive). Unfortunately it only runs on MSWindows. But I couldn't leave it there... Google found for me an emulator that can be compiled for Linux... or for anything. :) https://github.com/PaulAnderson/VzEmulator
I think AI is going to kill off Microsoft. I keep hearing that Microsoft is getting much (most?) of its programming done by AI now. What a stupid move. Apparently what is not moved to the cloud, is now riddled with bugs. And probably much of the software on the cloud is buggy too.
Makes me so glad I use Linux.
no subject
Date: 2026-03-31 01:39 pm (UTC)https://www.youtube.com/watch?v=tlMpiV3P8YY
no subject
Date: 2026-04-01 01:25 pm (UTC)I think mine was $200(?) and I got it for my ninth birthday? My SF wanted me to learn BASIC and such.
He had tapes or discs of Assembly Code, but my brain never worked that way.
The VZ200 was pretty great for what it was. I was always jealous of my friends with C64s, but I never had to peek, poke to lode games, and I did (kinda) learn how to code.
no subject
Date: 2026-04-03 01:57 am (UTC)Yeah, it can be a real problem for me when I'm supposed to be doing something else. Makes me almost unemployable. I don't really get to choose what my brain will get carried away with. It just takes off.
no subject
Date: 2026-04-05 04:02 am (UTC)I can do similar, just less... focused.
I watched my nephew (13) on Roblox yesterday. I don't know how it works, nor how his coding skills are, and it is impossible to watch him work, but even if hehe doesn't know how to code, he understands the lexicon.