2018-02-27

How I Got Here (part 1)

I started out "programming hardware" using 7400 series TTL integrated circuits as a kid back in eastern Arkansas (in a little town you never heard of). Radio Shack was my Meca, Jerusalem, and Vatican City all rolled up into one, and my pilgrimages were many. I could do just enough math to use Ohm's Law so I didn't (usually) blow the epoxy caps off my LEDs. I didn't think of designing digital logic circuits as programming at the time, but that's exactly what I was doing, one bit at a time. Steve Ciarcia and Forrest Mimms were my mentors, thanks to the books and articles they wrote. So I breadboarded, soldered, and wire-wrapped the hours away.

No one had ever heard of a PC back then, and "IBM" was synonymous with business mainframes. (They've since retreated back to that market after getting completely pantsed by the "compatible" manufacturers.) While I'd seen articles about "home computers" in magazines. I hadn't really given them a great deal of thought. They were super expensive, and I wasn't running a business, though the games and fun (and laughably primitive) graphics looked kind of interesting.

One day at Radio Shack, having carefully exchanged my allowance for much-needed components, I was waiting for my mom to pick me up (way too young to drive). And there sat a TRS-80 with a 64x40 character monochrome screen and full-sized QWERTY keyboard ... and the user's manual. I plopped myself down and started in on the manual. The clouds parted. The angels sang. The Radio Shack guys knew me, so they let me "play." It turned out that all the wonder and majesty of boolean logic that I'd found so intriguing in the digital logic world was berried in that computer too! AND if you made a mistake, there was the most powerful thing I had yet encountered in my technical education up to that point: the backspace key. This was amazing! Boolean expressions. Conditional logic. Looping structures. They were all there! (Can you hear those angels yet?) It was awesome, and I was hooked.

Every visit to Radio Shack after that ended with another session at their demo computer. I talked to the sales people, some of whom did actually have a clue about what the computer could do. The programming language back then was BASIC, and it was wonderful. There was no operating system for the computer I was using. The BASIC interpreter was in ROM. (I hadn't heard of CP/M at that point, and DOS did not yet exist.) So any program you ran had, with the exception of handling hardware interrupts, the CPU's full attention. So I spent hours and hours making progress and mistakes and learning from both. My mom once apologized to the salesmen at Radio Shack, in case I'd been bothering them, but they assured her that I was no trouble at all and was actually taking to the computer very well. (I imagine they also had dollar signs in their eyes.)

One Christmas, my parents got me a TRS-80 Model I with Level II BASIC, and that was about all they saw of me for the next few years. I had 4K (not a typo) of RAM to play with, and play I did. I would surface for school and meals, but the computer was my life. I didn't have any auxiliary storage, so I recorded my BASIC programs on notebook paper and then typed them back in when I needed them again. (THAT will teach you desk checking.) I learned to type properly (the best course I ever had in high school), which helped, but I also saved up for a cassette recorder, which is what hobbyist used back then to store data. (See Frequency Shift Keying.)

After discovering that it was possible to construct string literals in BASIC that contained machine code and then jump to that code I was in Z80 heaven. The transition from BASIC to Z80 machine code was awesome. The speed-up from the ROM-based interpreter to code running directly in the CPU was amazing. I didn't have an assembler, so I was hand-assembling code and running that directly from the BASIC interpreter. I eventually got an assembler (on cassette tape), and things got a lot easier after than, but not before machine coding had taught me exactly how a microprocessor worked (at least from a programmer's perspective).


No comments: