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