miriam_e: from my drawing MoonGirl (Default)
[personal profile] miriam_e
Fell 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:
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

Date: 2026-03-31 10:13 am (UTC)
greylock: (Default)
From: [personal profile] greylock
IIRC, the text editor I had on my VZ200 allowed you to see (and edit?) one single line of text at a time.
I forget the specifics, or if it was software or something my SF coded from somewhere, but it is hard to write that way.

(In other news, while notepad is as perfect as one can get for text, AI has been shoved into it and I don't like it.)

Date: 2026-04-01 01:25 pm (UTC)
greylock: (Default)
From: [personal profile] greylock
Wow. You went ALL IN on the VZ200!
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.

Date: 2026-04-05 04:02 am (UTC)
greylock: (Default)
From: [personal profile] greylock
I'm not sure it's a bad thing.
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.

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

April 2026

S M T W T F S
   1234
567891011
12131415161718
19202122232425
2627282930  

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Sunday, 5 April 2026 05:14 pm
Powered by Dreamwidth Studios