Friday, September 26, 2008

Microsoft and compilers

Back in the early 1980's when I was writing inventory management software I would spend most of my time using the Applesoft BASIC interpreter for development. Periodically I would take my BASIC source code and feed it into a compiler. We liked to use Microsoft's Applesoft BASIC Compiler. At that time Microsoft was more of a programming tools vendor than an operating systems vendor (they did sell MS-DOS, but not Windows).

Microsoft really did help launch the microcomputer revolution. They provided BASIC for many computers, and without this people probably wouldn't have written so much software. People say over and over again that Visicalc was the "killer app" that make the computer market grow, but I think that BASIC really deserves that award.

Sunday, June 24, 2007

Microcomputer Trainer

I think one of the best things a budding programmer can do is program in machine code. The absolute easiest way to get your toes wet in this skill is by using a microprocessor trainer. Radio Shack used to sell the simplest trainer I've ever seen, and I even have one of these around the house somewhere. Sometimes you can still get these on ebay (in fact that's where I got mine).  
I know this looks like a toy, and it is. For a toy it's serious business. It has a very simple Texas Instruments microprocessor and you program it in machine code using the hex pad. Easy instructions are included. 
Once you've played with one of these, the next fun thing to do is to write a simulator in BASIC. Not that hard to do actually. ;-)

Monday, June 18, 2007

Electronic Flip-Flop

Early users of computers were usually also interested in electronics, and in fact I was a casual student of electronics before I knew what a computer is. So I owned a couple of electronic experimenter's labs (and I still do) that we picked up at the You-Do-It Electronics store.

Particularly interesting was the Gakken Denshi Block system, recently reintroduced to the market. This is a high quality kit with a portable radio style case. It has a transparent lid which you open to place pluggable modules.

Here is a photo of my own kit (rebranded as Skilcraft).

One of the experiments was important to my understanding of computers. It was titled Bistable Circuit with Two Lamp. This was another was of saying Flip-Flop, which is a critical building block of digital computers. Up until this point I had only an abstract concept of how a Flip-Flop actually worked.

Here is a link to an article on Wikipedia explaining what a Flip-Flop is http://en.wikipedia.org/wiki/Flip-flop_%28electronics%29

Thursday, June 14, 2007

Early networks

When I started in high school at Xavarian Brothers High School in Westwood, Mass. they had an early example of a network. It amounted to a shared hard drive between four TRS-80 Model 3 computers (or maybe they were Model 4s). There were also Epson MX-70 printers.

I didn't actually take the programming class, which was only available for juniors and seniors, but my math class was in the classroom where the computers were, and I would sometimes write little programs for them in the minutes before or after class.

I'm not sure if the hard drive was manually or automatically switched, or if these computers ran a real disk operating system. I don't remember the computers having floppy drives, and it seems unlikely that they had networking code built into the power-up ROMs; just BASIC.

Perhaps someone else would be eager to comment on this?

Monday, June 11, 2007

Floppy disks

In the early micro days we used cassette tapes and floppy disks. Floppies were better for many reasons but they were expensive. The Apple Disk II drives were $495 including the controller. Once you had one of these babies you still needed floppy disks. I remember pretty clearly in the early 80's spending $80 for a box of 10 floppy disks. These were Dysan disks, and were of very good quality.

However these disks probably exceeded the quality required. Later on some less expensive floppy disks became available from the likes of Maxell and memorably named Elephant Memory Systems. These were $2.50 or so per disk. The disk surfaces weren't as polished, and some cheap brands didn't have a reinforced mount but no matter really. The cheap disks were pretty much as reliable as far as anybody could tell.

Disk drive systems themselves were all quite different from each other. Apple's legendary Steve Wozniak had managed to create the ultimate in economy of design for a disk controller with a small card having only 5 ICs. Most other disk controllers were long circuitboards with 2 to 3 dozen chips. Monsters. ;-)

Some of these floppy drives used hard sector disks, meaning that there was an index hole in the media for each sector on the disk. So, if the disk was meant for a 16 sector drive, the disk would have 16 timing holes cut out of it evenly around the inner part of the disk. This would be read by an LED and a sensor. The Apple II used soft sector disks where there was only one hole cut in the disk, and the drive controller itself decided how many sectors to put on the disk by doing careful timing.

I remember that my father's H-89 had hard sector disks. The drives also made a strange clunking noise as they operated. The Apple II's drives made the much more familiar brrrr, brrr, mmm, mmm sound of most floppy drives and they were faster than the H-89 drives.

Thursday, June 7, 2007

Applesoft BASIC

So settling down to programming on the Apple II+, we had several books to help me with the process. Of course there was the standard green covered Applesoft book, and Mr. Alessi also has another book but I can't remember the title. I tried to find a shot of the book cover on Google but no luck.

Before we started writing inventory management software I tried my hand at creating some graphics. The Apple II had hi-res graphics (for that day), and Applesoft had high level commands for drawing so you didn't need to POKE and PEEK as much as in other BASICs. We had only a green phosphor monitor without color, but this was appropriate for business software development.

When editing a program in Applesoft BASIC, you could type some escape sequences to move the cursor around. If you moved the cursor up to the start of a line on the screen you could then reenter the line by moving the cursor to the right, and you could substitute some characters to change the line of code. This was crude compared to the way you did things on a VIC-20 where you just moved the cursor to the line you wanted to edit, changed just what was needed and hit Return.

Also, I had never written software before that used a floppy disk. This was another thing that I needed to become comfortable with. Our Apple II had 3 floppy drives, each was 143K. We also had a 16K card and a Z80 Softcard so the machine could run CP/M, but this was something we rarely did.

Monday, June 4, 2007

What's a Mark-8 Anyway?

I ran across this fun story about someone who restored an old computer he found by accident on ebay. Check it out! :-)

http://www.bytecollector.com/m8_restoration.htm

Sunday, June 3, 2007

My First Programming Job

As well as I can remember (this would have been 1981) I met Patrick A. Alessi when I was 14 years old at NEECO. He was there purchasing an Apple II+ and an Epson MX-100 printer, and he told the sales guy there he needed a programmer to work on some business software. They pointed across the store at me. He told me later that he said, "Who, him? He's just a kid!" They introduced us to each other.

Turns out I knew his son Michael from playing kickball at the park down the street. Mr. Alessi lived a mere 4 blocks away from me, which was the perfect distance. So I began visiting his place. As first we just played pool and experimented with his new Apple II+, and Mr. Alessi made no apologies about sharing his political opinions while smoking different kinds of pipe tobacco.

Since my friend Richard had an Apple II computer I got some games from him, and I made a joystick for the computer out of parts I bought at Radio Shack. I reused the case from an RC car's remote control. I cut out the steering wheel and replaced it with a dual-potentiometer joystick. It was ugly, but I saved some money. ;-)

Mr. Alessi was interested in creating some trend following inventory management software, and he talked a lot about this. Eventually we would begin to write this software, and do a lot of other things as well. This was not going to make me much money in the short run, but I couldn't have asked for a better opportunity to learn.

Saturday, June 2, 2007

Microsoft BASIC

The original story of how Bill Gates and Paul Allen created their first BASIC for the Altair microcomputer is a fascinating one, especially for me since I am also the author of a BASIC language. Here is a fun site with one take on how Microsoft got its start.

http://www.startupgallery.org/gallery/story.php?ii=20

Monday, May 28, 2007

Ohio Scientific Challenger Series

I remember once while on a family roadtrip I found a magazine in the car. It seems to me that the front and back covers of the magazine were torn off, as can happen easily when a magazine is left on the floor of a car. I think it was an issue of BYTE Magazine, but I'm not sure.

There was an article detailing a single board computer with diagrams. The computer was an Ohio Scientific computer, probably a Superboard. http://oldcomputers.net/osi-600.html

These were very cool machines, and pretty cheap. They used a 6502 processor and had BASIC and machine code monitor in ROM; sort of a poor man's Apple II. For the money it was a better machine. With better marketing and a nicer looking case perhaps they could have given Apple a run for their money.

Thursday, May 24, 2007

Summer Break - My Own Company

When I was about 14 I decided to create my own company to create video games. I didn't even own a computer, but I spent a lot of time at NEECO, and they let me use theirs. The machine I targeted was the Commodore VIC-20, and I thought I was being clever when I came up with the name VinkSoft.

The game I created was a simple simulation of flying through an asteroid field. You needed to shoot the asteroids to destroy them or else they would hit your ship. It probably took a couple of dozen hours to create this game. The graphics on the VIC-20 were all done by creating custom graphics characters. Sound was pretty easy with the computer's built-in 3 voice tone generator and white noise generator. The actual BASIC code for the program wasn't very big because it all had to fit in 3.5K of RAM. The game was fast enough in BASIC that it didn't need any machine code routines.

My plan was to sell the software at NEECO, and the sales guys there agreed to do it. The software would be in a ziplock bag with some artwork and a cassette tape. A lot of software was sold this way back then. My father helped me with the artwork. He's pretty good at drawing sharp graphics, which makes sense because he spent thousands of hours drawing things at a drafting table.

So the sales guys at NEECO put the software on the wall (2 copies) with all the rest of the stuff there. Within a couple of days they had sold one! Unfortunately the owner of the company had not cleared this clandestine operation and when he found out he had my remaining copy pulled. I don't think they even gave it back to me.

The things we kids did during summer break. ;-)

Monday, May 21, 2007

The Peacock Feather and Sinclair

I met the owner of the Peacock Feather (a gift shop in Needham, Mass that still exists today) at his store, but I don't recall his name. He was from India, and I remember getting into a discussion with him about computers. He said he had one of the new Sinclair ZX-80 http://oldcomputers.net/zx80.html computers based on the Zilog Z80.

He seemed interested that I was about his son's age and that I knew something about programming. He told me that his son played soccer, and I guess he thought that I could befriend his son and teach him about BASIC.

So we agreed that I would come to his house to see this ZX-80. I remember that his home was absolutely filled with the smell of curry (in fact he smelled like curry even when he wasn't at home). I also remember that his son wasn't there when I visited. So much for me and his son developing a friendship.

I didn't have much time to play with his computer. It was much smaller than it looked in the ads. The keyboard was completely flat, and you just touched each "key" lightly to activate it. Each key had a letter, a graphic character, and a BASIC keyword on it. Since you couldn't touch type, the way that you would type a whole keyword in with a single keystroke help speed things up. The computer was plugged into the television set (as so many home computers did), and its plain black and white output would blank briefly between some keypresses. If your program did any computation in loops it would also blank then since the display was driven completely in software by the single Z80 processor.

It was a fun little machine to play with, but I wasn't interested in owning one after I saw it. Later on Sinclair would produce the ZX-81, a much more expandable machine. I actually recently bought a kit version of this machine unassembled which I hope to assemble at some point.

Sunday, May 20, 2007

The Coleco Telstar

When I was a kid the only video game console I can remember having in the house was mine. It was a Coleco Telstar Arcade console. I bought it used from a listing in the Want Advertiser classifieds magazine (a publication native to New England).

http://www.pong-story.com/coleco_arcade.htm

This was a rather strange console, with very limited game options. Unfortunately I got bored of playing with it rather quickly.

Nowadays we have three consoles in my house.
  • An Atari 7800 console
  • A Nintendo 64
  • A Nintendo Gamecube

The Atari console is the one we play most. I bought it used years ago with about 30 cartridges. I think I paid about $50 for the lot. Most of the games are Atari 2600 (they work on the 7800) but we have some 7800 cartridges too. We play Ms. Pac-Man, Donkey Kong Jr, and Space Invaders most.

Thursday, May 17, 2007

The Home Computer Era

In the early 1980s there were so many kinds of computers before IBM killed off all the diversity with their IBM PC. This was a shame, especially since the microcomputer industry was only 5 years old and there wasn't a rich computer culture yet. The PC stopped the innovation in its tracks. Before the IBM PC small computers were usually called home computers.

It was wonderful that you could usually buy a 250 page book for the computer of your choice. That book would tell you everything... EVERYTHING about the innards of the machine. You could bend the computer to your will. These days you have no idea what's going on in the machine. As a programmer you deal with the Windows API, or with the Java SDK platform.

Sometimes I wonder how hard it would be to create a new computer simple enough to master it all the way down to the bits. The operating system would be very small and simple, and the machine could be programmed in BASIC, Forth, and assembly language. The code for the whole thing could be open sourced. Perhaps there wouldn't be a way to make money with such a product, but it would be fun. :-)

To get a feel for what this time was like, watch this YouTube video of Steve Wozniak relating his experiences growing up and designing the Apple computer. Great stuff! http://www.youtube.com/watch?v=ctGch5ejjT4

Tuesday, May 15, 2007

Easy A Grades

In my seventh and eighth grade years we were required to produce reports for our math class. I can't say for certain what sort of material filled the reports of other students. Since it was pretty unusual for a middle school student to know how to program computers back in 1981 I had no difficulty getting my teacher's permission to write both my 7th and 8th grade reports on programming.

For 7th grade I wrote a report that explained programming on the TI-57 calculator. I hand typed the report on a manual typewriter. I remember being up all night before it was due (I had a bad habit of doing that).

For 8th grade I wrote a report introducing the BASIC programming language. The teacher decided that I should use the blackboard to explain to the class how it all worked. If memory serves, I remember that the presentation was also attended by a trained programmer, who happened to be the father of one of my fellow students.

I knew more than the teacher about this subject, so these were easy A's. :-)

Saturday, May 12, 2007

Soldering and machine code

I should probably interject here that a year or so before I really got into programming my brother Neil bought me a kit radio for my birthday. It was a small battery powered AM radio, which did not look like a kit at all when completed. It could easily have passed for a commercial offering you would buy at a department store.

This kit was great fun to put together, and it helped me learn how to solder. I would use this skill as I got older for many purposes, some of them computer related.

I wish there was more of a kit culture today. While you can build robots with Lego Mindstorms and similar systems, it makes sense to learn things as fundamentally as possible.

In a similar way people studying computers should consider learning at least a simple machine code. For example before I had any opportunity to program in machine code I read a book on Z80 machine code. Eventually I had some chance to write 6502 assembly. I never mastered assembly language but it was valuable experience. I suspect that many young people studying computer science today are not exposed to the bare hardware of the machine these days. Universities should be held to account for this IMHO.

Thursday, May 10, 2007

Bad Cable

One day while I was hanging around at NEECO a man came in who needed a custom video cable for his VIC-20. The exact specification escapes me now, but the store didn't have what he needed. I volunteered to run down the street to You-Do-It Electronics and buy what we needed to make the cable. When I got back we tried to put the cable together, but no matter what we did the results were terrible. Creating video cables is not as simple as it would seem.

Tuesday, May 8, 2007

Star Trek, BASIC and Arrays

I think most of all my early programming ideas were advanced by writing games. When I was still a beginner I decided to create my own version of the classic Super Star Trek game that I played on the Babson College minicomputer on a dialup connection from the Needham Public Library.

I grabbed a yellow lined notepad and started writing code in BASIC. After a half page of code I began to write lots of IF THEN statements, one almost exactly the same as the next. I realized after a bit of this that my program was going to be gigantic!

So while I was walking to the library with my brother Ernie I told him what I ran into while trying to write the program. He explained to me that I needed to learn to use arrays (he called them subscripted variables). I really had no idea what he meant. I can't remember clearly how I learned about arrays, except that Ernie must have shown me how to use them. Along with arrays it was great to learn about nested loops.

With his help I was able to write a version of Star Trek in BASIC for my father's Heathkit H-89. Later I wrote a version for the VIC-20 as well.

So this was a breakthrough moment for me. Arrays make many kinds of game programming practical, and I made good use of them. It was easy to for me to see that to create a game is to craft a simulation (even if for an imagined reality). This insight served me well as I wrote more and more software.

Sunday, May 6, 2007

Teletypes and paper tape

At the Pollard Middle School in Needham, Mass they used to have a couple of old teletypes that connected by modem to the Needham High School where they had a DEC PDP-11/40. http://en.wikipedia.org/wiki/PDP11

The teletypes looked like this:

I didn't actually attend Pollard Middle School, but my brother Ernie did and he took me with him a couple of times to use these. The teletypes are pretty darn ugly (I think). They are also ridiculously slow and noisy. The only nice thing about them is that you can punch your BASIC program out on paper tape and take it home with you. Later you can come back and read it back into the PDP-11 and work on it.


I really preferred using a CRT terminal.

Saturday, May 5, 2007

The VIC-20

In 1980 Commodore introduced a new 6502 based $299 home computer called the VIC-20. http://oldcomputers.net/vic20.html

It was essentially a version of the Commodore PET that plugged into a TV set. For the price there was nothing like it. It had Commodore BASIC built-in, color and sound, a joystick port, and a cartridge expansion slot. It didn't have graphical sprites, but it was still capable of video games and it cost about half the price of an Atari 400.

I wrote a lot of software for this machine at NEECO where I hung out. It didn't have full screen graphics, but you could program the graphics characters on the fly. It did have a very low screen resolution (22x23 text mode, 176x184 graphics mode) and it only came with 3.5K of available RAM out of the box, but we were very used to limited memory back then.

Compute! magazine had some really great software listings for this machine, like a graphics character editor for example and a machine code monitor. Just type it in and go. :-)

Sunday, April 29, 2007

Heathkit H-89

Finally in 1980 my father was awarded a generous bonus for his role in the creation of special radio equipment for use on aircraft carriers. He used this bonus to buy an H-89 kit for Heathkit. http://www.old-computers.com/museum/computer.asp?c=135

We finally had a real computer in the house! It ran CP/M and H-DOS (we use mostly this OS) and we had a couple of different versions of BASIC for it. We had something called Benton Harbor BASIC. The computer had no graphics modes, but it had graphics characters and I remember my brother Ernie was working on a version of Galaxians for it. We wrote a bunch of games. I remember my father also did some assembly language programming for it (or perhaps he just typed in straight machine code).

One thing I remember about the machine was that it used hard sector diskettes, and the floppy drive was loud. It would make clunking sounds. Ka-chunk, ka-chunk!

Thursday, April 26, 2007

Artificial Intelligence and BASIC

When I was 13 or so years old I bought a book at You-Do-It Electronics titled Experiments in Artificial Intelligence for Small Computers, authored by John Krutch. This book influenced me in important ways. It teaches the essentials of AI so anyone could understand it. Examples are presented in the BASIC programming language. One of the examples presented is of the classic Eliza sort of conversational system. Not cutting edge research, but as a starter it gets the job done.

I was able to use the techniques in the book to create demos for the computers at NEECO. The customer would ask the computer about itself, and the computer would try and respond appropriately with a demonstration of features.

The book can still be purchased used on Amazon.

Wednesday, April 25, 2007

Looking for a Computer

Computers were very expensive back in 1980. My father worked for GTE at that time and he was offered a deal on the Rockell AIM-65 computer http://oldcomputers.net/AIM-65.html since GTE and Rockwell had some sort of relationship. It was a nice 6502-based computer and ran BASIC. It was small, had a single line display, and a built-in thermal printer.

Obviously a computer with a full size display screen (though one could be added) would have been preferable but we were excited at the prospect of having a computer in the house! Ultimately the AIM-65 was not our fate because my father decided that the nature of the deal amounted to a conflict of interest.

Tuesday, April 24, 2007

Heathkit

Since our father is an electrical engineer he would sometimes build electronic devices. He had built a very nice stereo receiver from a kit he bought at Heathkit. My brothers and I enjoyed reading through the Heathkit catalogs that would arrive in the mail.

There were many different kinds of computers that could be bought from Heathkit at that time including the H-8, the H-11 and the microprocessor trainer ET-3400 which had a breadboarding area, could be programmed in machine code and could also be expanded to drive a terminal and be programmed in BASIC.

We spent a lot of time fantasizing about these and other machines, but we never got to see one in person. Computers were too expensive for kids with paper routes. Of course that would all change very soon.

Monday, April 23, 2007

Apple Hacker Extraordinaire

In my early teen years I met a fellow a couple of years older than me at NEECO. His name is Richard Stoddart. We hit it off pretty well and I began visiting him at home every couple of weeks. He had an Apple II+ in his basement and he was always doing something interesting with it.

Richard was smart, and he was always very nice to me and this mattered quite a lot since I wasn't exactly a popular kid. Richard taught me a lot about Apple computers, and we had a lot of fun playing games. He was also very active in his Boy Scout troop and was working on Eagle Scout. My mother called his mother and they became friends.

One interesting thing about Richard also was that he was into electronics and was the sort of person who wasn't afraid to modify his computer.

After I hadn't seen Richard for some years I tracked him down after I got married. I was glad to see he was doing well, but now I don't know where he is. I hope you're doing fine Richard wherever you are!