This weekendʼs project: Teaching myself FORTH on a Udamonic Scamp3 single-board computer.
My first introduction to FORTH was around 1984 with H.E.S.ʼ 64 FORTH, which everyone just called “Sixty-Forth” because itʼs easier to say and made us feel clever. I didnʼt get very far with it because the H.E.S. FORTH came on a cartridge, and I had no means of storing my completed programs. Not even a datasette. By the time I got my first 1541 disk drive, I had moved on to other things.
But I have an affinity for old programming languages, so when I ran across the Scamp on the internet, I ordered one right away. I didnʼt receive it right away, though. It was shipped from Australia via a start-up called Sendle, so the computer I ordered in March arrived at the end of June. Iʼm amazed that it works, considering it was packed in little more than a thin layer of bubble wrap, and mailed in a basic envelope, which had been torn open along the way.
By design, both 64 Forth and FlashForth on the Scamp are FORTH supersets. Programs being only semi-portable between platforms is considered a feature, not a bug, in FORTH. Still, all FORTHs conform to the same programming paradigms and seem to have 95% compatibility with one another. Much like computers in the 1970ʼs, when youʼd buy a generic book of BASIC programs at Brentanoʼs and then it was up to you to customize the code to fit your machine.
Interestingly, the H.E.S. variation of FORTH seems more capable than the FlashForth that the Scamp runs. 64 Forth has over 500 words in its vocabulary, and comes with a split-screen I.D.E. method of interaction. The Scamp superset of FlashForth has just 425 words, and is designed for very bare-bones TTY output. No fancy ANSI windows here.
On the other hand, the Scamp can be powered off and when it's plugged in again you can pick up right where you left off. With any Commodore 64 FORTH, once you restart, you have to rebuild or reload all of the words you have previously defined. So while FlashForth isn't flashy, it's certainly more useful to use for a long-term project.
So what will I do with a 55-year-old programming language in 2023? Iʼm going to learn. Iʼm going to explore. Iʼm going to expand my ways of thinking and understand how things were done in the past so that I can do things better in the future.
Whenever I get a new piece of kit, Iʼm automatically challenged with ”What good is it?” I shouldnʼt have to answer that. Intellectual curiosity should be rewarded and saluted. Not everything is a start-up. Not everything is a business. Not everything has to make money. 50 years ago, nobody would have asked someone who does woodworking in his spare time, “How are you going to monetize that?” The notion would have been ludicrous. And, not surprisingly, the sort of people who donʼt understand intellectual curiosity are also the same group of people who spend their free time laying on a couch binge watching the latest zombiethon on the trendy streaming service of the day.
SAM76 was one of many computer languages that came out in the 1970ʼs that promised to be the “next big thing,” but failed to gain traction.
It looks a bit like AP/L, with its tight syntax, but was meant for text manipulation like Lisp.
I haven't found a SAM76 interpreter to play with in 2022, so here's an example of what a SAM76 program would look like, from the May-June, 1978 issue of Creative Computing that would take a number from the terminal input, and uses recursion to print out the factorial of that number.
I'm no SAM76 expert, but I think there's a typo in this listing. I think the !%ii… is actually supposed to be !%is… to retrieve an “input string” from the terminal. But I'm happy to be proven wrong.
As you may have guessed from the ten slashes, this language is all about nesting commands. Amusingly, it doesn't matter how many slashes you close your expressions with, as long as it's enough. So just keep banging that slash key!
SAM76 is a great example of smart people dealing with the scarcity of their time. This is a language that has been optimized for teletypes, punch cards, and paper tape. The % isn't a command prompt, it's a command. (More specifically, a “warning character.”) The “mu” and “pt” and such are shortened, almost tokenized, keywords.
Sadly, there is no SAM76 entry on Wikipedia, and almost no information on the internet about it, so it will soon be erased from the public memory by search engines (*cough*Google*cough*) that choose to only show things currently trending in popular culture. Shakespeare, youʼre next.
Cheaper than Google Cloud, more relianle than Microsoft Azure
Thursday, July 15th, 2021Alive18,342days
Every ten years it seems like the tech world bring in a new batch of people who never bothered to study how things worked in previous decades, and thus end up not only reinventing the wheel, but hyping it up like itʼs the first time anyone ever thought of whatever it is theyʼre all excited about.
Timesharing → Thin clients → Web apps
Hypercard → Web sites
Brittanica → Encarta → Wikipedia
Q-Link → IRC → Second Life → Virtual reality
Rabbitjackʼs Casino → BetMGM
Also not new: Cloud computing. Check out the highlights from this 1979 advertisement for MicroNET:
MicroNET allows the personal computer user access to… large computers, software and disc storage
You can use our powerful processors
Operating time [is] billed in minutes to your VISA or MasterCharge card
You can even sell software via MicroNET.
MicroNET was a way for CompuServe to allow people to use spare capacity on its big iron computers. People could upload their personal projects, conduct business, and even develop software using the might of dozens of machines thousands of times more powerful than what they could afford in their own homes. Maintenance, backups, power supply, networking, and other infrastructure details were abstracted away from the end user so the user could concentrate on the task at hand.
Sound familiar, Google Cloud Platform, Microsoft Azure, Amazon Web Services, and a thousand other virtual machine companies?
I got a new Atari cart yesterday. Itʼs BASIC Programming.
While the word “BASIC” in the title is properly capitalized because it is an initialism for Beginners All-purpose Symbolic Instruction Code, the title would also work in sentence case as “Basic Programming,” because this is truly basic programming.
Lots of modern-day reviewers on the internet who are more interested in outrage clicks than thoughtful conversation deride this program as a farce or even a toy. I have the unpopular view that BASIC Programming is really quite good, both as a technical achievement and as a cultural change agent. It achieves a number of important goals:
Provided ordinary people with an introduction to programming
Provides a subset of the BASIC programming language
Has the ability to play musical notes
Has the ability to display rudimentary graphics
This is all elementary school stuff today. But when this cartridge came out in 1979, it was absolutely revolutionary. For $50, an Atari owner could get a taste of what it was like to actually program a computer. And while computers were starting to occasionally appear in well-to-do homes, they were still staggeringly uncommon, and cost about the same as a new car.
Joysticks and buttons in arcades gave wider society its first opportunity to command an electronic machine to do things. BASIC Programming gave Atari owners the ability to give an electronic machine sequences of commands, and to act on them. Moving a dot around a screen with a joystick had been done long ago through various electromechanical methods. But this was the first chance for ordinary people to actually command a machine to do more than just react to stimulus.
BASIC Programming has a limited feature set, but itʼs still an integrated development environment, not fundamentally different from what computer programmers use today. One significant difference is that BASIC Programming managed to present a fully functional I.D.E. in a minuscule 2K of memory. Thatʼs about one sixth of the words in this article.
By comparison, the current version of Microsoftʼs I.D.E. starts at 274,000 times the size of BASIC Programming, and increases rapidly from there, depending on what language you write in.
Atariʼs BASIC Programming crosses the same ocean as Microsoftʼs VS Code, but does it with a styrofoam pool noodle instead of the Queen Mary.
In addition, BASIC Programming is user-friendly in one specific way that few computers are today. Like me, it had Sister Maria for third grade Arithmetic class, where she preached, “Anything divided by zero is zero.” Try to divide something by zero in Atariʼs basic BASIC, and it politely gives you zero. Unlike modern computer systems that fall on the floor, curl up in a ball, and start quietly sobbing to themselves when asked the same question.
The one popular modern-day gripe I agree with is that the input method is cumbersome. Itʼs a pair of keypads, one plugged into each joystick port, and then locked together. I understand why it was done this way, but that doesnʼt make it easy to use.
Still, the single keypad pair is pulling more than its weight, even for the era. It is used for:
The entire common English-language alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
The numbers: 1234567890
A space character
Punctuation ., ,, ʼ, and ＂
A set of basic BASIC keywords
Mathematical and assignment operators
Cursor controls Backward and Forward
A Newline character
IDE controls for:
Just looking at the command set, thereʼs a lot of interesting points.
It has an else command. There are modern-day computer languages that donʼt even have this feature.
It has a goto command. Only recently has goto come in from the cold, and is slowly being embraced by a new generation of programmers decades after being banished to the Gulag of Oldthink.
Its keyboard has Control, Meta, Super, and Hyper modifiers, just like keyboards of today. On a modern-day keyboard you may know these as Control, Command, Option, and Hyper. On the Atari keypad, theyʼre color coded White, Red, Blue, and Green.
It has a function to slow down the execution of programs so that the programmer can understand whatʼs happening.
Imagine being someone in 1979, who has lived his entire life with paper and pencils — someone who has never seen a computer in person before — coming to the realization that the simple little program he punched in on his Atari is running so fast that he canʼt keep up with it. This was an epiphanal moment. An awakening. A sense that the cyber-commander art work on the box wasnʼt just fantasy, but an expression of the type of power being brought to ordinary people in their dens.
In addition, when you run a program, the systemʼs cursor moves through the program during execution, allowing you to follow along with whatʼs happening. This kind of functionality is an add-on in modern systems.
On a personal note, I love the idea that it has a Halt command. It brings a lot of nostalgic feelings to my tummy. Back when computers were commanded to run and then halt because of their military origins. A time when you couldnʼt start a computer without a key. When computers had mechanical odometers behind a panel so that the IBM service guy from New Paltz could write down for how many hours you used the machine, to let Big Blueʼs billing department know.
Yesterday was a quiet Saturday, so I sat down with BASIC Programming and approached it with my programmerʼs analytical mind, and without the biases of modern-day development. My conclusion is that this is really quite fun.
I started by typing in all six of the programs I could find on the internet. Unlike the days of typing in program from the backs of magazines, these all worked the first time, with moving dots and pinging sounds. Then I started to experiment on my own.
The dialect of BASIC that this cartridge uses is very much of its era. Variable assignment is done with ←, instead of =, just like in 1960ʼs and 1970ʼs computing languages like AP/L. Goto is your friend, not your enemy. And the notion of whitespace for readability goes right out the window. This will be a show-stopper for anyone used to cruising Appleʼs internal codebase.
Iʼm not musical in any way, so naturally I enjoyed stringing along rudimentary bloops and bleeps into nonsensical songs. For an afternoon, I was the e e cummings of synthpop, but I was also doing something: I was creating. This was an a-ha moment, and I felt a rainbow connection to dads of the 1970ʼs, sitting cross-legged in wood-paneled living rooms, scales drifting lazily from their eyes as the future was revealed.
If you appreciate programming elegance, the value of simplicity, or simply dig code golf, this is your course. You are forced to think about what youʼre doing. To make choices, evaluate tradeoffs, and make do with what you have. Itʼs a lot of the brain stimulus that gets some people into programming as a profession in the first place
There are a number of people who enjoy making tiny programs. Some so small that they fit into a PC-DOS boot sector. I think a few of those people might thrive within the constraints of this environment.
The biggest limitation of BASIC Programming is memory. You can only cram a few dozen symbols into the machine. Thatʼs to be expected, since the entire console only has 128 bytes of memory. Thatʼs the reality of 1979. But today, people are able to program Atari cartridges that work with comparatively massive amounts of information. One guy even sells Atari carts that are full-motion videos of popular movies. I suspect one of those clever people could find a way to make a version of this that works around the memory limitation.
The second-biggest problem is the Frankensteinian keyboard. As an input device, it was never intended for long-form content. But the cognitive overhead of shifting modes, double-checking the screen, and the constant hunt-and-peck involved make it hard to concentrate on the program, and not on the controller. Perhaps thatʼs another throwback to 1970ʼs computing, though.
Iʼm old enough to be one of those programmers who wrote their programs out on paper first (graph paper, if you were lucky), then typed it into a shared computer, and hoped that it did what was intended. Maybe if I spent more time thinking about the code beforehand, rather than writing it on-the-fly as is common today, coding in BASIC Programming wouldnʼt be so arduous.
Still, I think that with a bit of time, it would be possible to come up with a harness that links a standard Human Interface Design keyboard with the pair of Atari joystick ports to emulate the keypad. In my mind, it would take some kind of Arduino or Raspberry Pi device with a dozen I/O pins. Voltage might be an issue, but nothing insurmountable to todayʼs hobbiest.
In fact, using this method, one could actually load BASIC Programming programs stored in a host system through the Arduino-powered keypad interface. You could write a program in Microsoft VS Code, or Panicʼs Nova, and when you push to git, or the version management system of your choice, it could also be sent wirelessly to the Arduino, which then relays the keypresses into the Atari 2600.
I can finally play Zork on my TRS-80 Model 100. Sort of.
Iʼm actually using the Model 100ʼs terminal program to connect to a wifi dongle on the back of the machine which connects to my wifi router, which connects to my Mac Mini, where the game is actually running.
Some day Iʼd like to run Zork on this actual machine, but that would entail installing CP/M on the 100, which is still a very experimental process, and more complicated than I have time for.
When I want to get things off my chest, I bang the words into an old TRS-80 I keep in the closet. I do it in story form.
I’ve found that writing stories is a good way to expend excess mental energy. I’ve written hundreds of stories on that machine. Every month or so, after they’re perfected, I pull out the batteries and the stories disappear forever.
It’s like in the old days when people would write their confessions in letters and throw them in the fireplace, or deliberately mail them to undeliverable addresses.
You used to be able to buy bundles of these letters from the Post Office’s sorting facility’s Dead Letter Office. I don’t think you can anymore. Now they’re probably auctioned off in palettes with other undeliverable to big companies that throw away the letters and sell the wayward packages on Amazon.
I just came across this article about the then-new AT&T 6300 in the September, 1984 issue of Microsystems magazine.
This is the computer that West Virginia Radio Corporation made five of us share in the newsroom at WCHS/Charleston in 1995 because the company didnʼt have money for a second computer. The same machine also had to ingest the Associated Press wire feeds in the background.
This was eleven years after the computer was introduced.