Since my Tandy 1000SX had high resolution graphics (if you could call monochrome CGA 640x200 high resolution) we thought it made sense to get a mouse and learn to program with it. Then we might be able to write even better software for the engineers to use when setting up each circuitboard for production. We had a crude graphical CNC simulator that ran on the Kaypro machines, so this could be a step forward for us with more detailed graphics and a mouse for a pointing device.
We bought the mouse at Radio Shack. It was a pretty nice little mouse, and it came with its own interface card like most mice did back then. I'm guessing that this mouse was made by the same people who made the the famous Microsoft Mouse. It was very similar. All the mice at that time had a ball for tracking movement, and this one was a metal ball with a rubber coating.
I believe that my first experiments with the mouse were in Turbo BASIC. There were no built in commands for the mouse. I don't remember exactly how the mouse was read either, but I remember there was documentation. Playing around with some code for drawing on the screen with the mouse inspired me to write an experimental character recognizer. I would draw letters on the screen and the program would attempt to convert them to ASCII characters. It really wasn't that hard to do, but prototypes don't have to be practical. It was fun.
Thursday, March 18, 2010
Mousing Around
Labels:
ascii,
CGA graphics,
circuitboard,
cnc,
kaypro,
microsoft mouse,
mouse,
radio shack,
tandy 1000sx,
turbo basic
The Epson QX-10
Somewhere we had acquired an Epson QX-10. This was a Z80 powered machine running CP/M, but it wasn't originally conceived as such. Epson had written a CP/M compatible operating system called TPM, and they had some lofty ideas about how a computer should interact with people. They chose Forth as the language to deliver their ideas. So there were some applications which were seamlessly integrated together, but this didn't wind up being a successful product.
So instead we treated this machine like it was another Kaypro. Bob asked me to write a program that would optimize the use of the fiberglass panels we made our circuitboards from. The panels were 24 by 36 inches (I think). For some order we might need a panel that was 8 by 10 inches. How should we cut the panel to reduce waste?
So I wrote a program in Microsoft BASIC for the QX-10. The user would enter the desired size of the material, and it would draw a rough image of the panel as it should be cut with instructions something like:
Insert the long way and cut 10 inches for 3 panels 10 by 24 inches.
Take each of those panels and cut 8 inches for 3 panels 8 by 10 inches each.
Total yield 9 panels 8 by 10.
Waste 1 panel 6 by 24 inches.
We used the computer for this purpose for several years. Hopefully the computer paid for itself in this role. :-)
So instead we treated this machine like it was another Kaypro. Bob asked me to write a program that would optimize the use of the fiberglass panels we made our circuitboards from. The panels were 24 by 36 inches (I think). For some order we might need a panel that was 8 by 10 inches. How should we cut the panel to reduce waste?
So I wrote a program in Microsoft BASIC for the QX-10. The user would enter the desired size of the material, and it would draw a rough image of the panel as it should be cut with instructions something like:
Insert the long way and cut 10 inches for 3 panels 10 by 24 inches.
Take each of those panels and cut 8 inches for 3 panels 8 by 10 inches each.
Total yield 9 panels 8 by 10.
Waste 1 panel 6 by 24 inches.
We used the computer for this purpose for several years. Hopefully the computer paid for itself in this role. :-)
Labels:
circuitboard,
cp/m,
epson qx-10,
fiberglass,
forth,
kaypro,
microsoft basic,
tpm,
valdocs
Monday, March 15, 2010
Wendin DOS and C
One of Bob's ideas about improving our shop floor tracking system was to purchase a bunch of very simple wall terminals and control them from a single computer. This was meant to be a very economical solution. Workers in each department would type in the job numbers and quantities and so no one would need to run around collecting data with a bar code wand. I thought this was a great idea, and I figured I could write something like this in C.
To make this work I would need to write a service routine to monitor the serial ports, and the application would need to essentially multitask. I used C structs to manage related bits of information and created routines to read and write data to disk files. The program would present a simple prompt for logging in, specifying a department and entering a job information.
This was all fine, but it was hard to add new functionality to the system, and I was finding it frustrating dealing with memory bugs and pointer related bugs.
I decided that I needed a multiuser system. If I took the multitasking out of my C code then my programs would be simpler. I noticed an ad in a magazine for a multitasking version of DOS called Wendin DOS. This version of DOS was based on a VMS architecture, and it was very inexpensive. I approached Bob and he bought a copy.
On my Tandy 1000SX Wendin DOS was sluggish. I hoped that this wouldn't matter much because if I could create a working system then we could buy a more powerful 80286 computer to run it on. I was able to create multiple sessions and run my C tracking system in them. Each of them ran in its own text window. This was amazing to me!
Now the bad news. Wendin DOS would crash without warning. The whole screen would suddenly clear and display a "guru" error message. Guru error number such and such. This was really weird. What was a guru, and why was it in my computer?
Some of the error messages were explained in the manual, but some weren't. It became clear to me that there was nothing I was doing to make this happen. I contacted the people at Wendin and even got a response, but they didn't fix anything.
Ultimately I had to give up on Wendin DOS and look for another solution.
To make this work I would need to write a service routine to monitor the serial ports, and the application would need to essentially multitask. I used C structs to manage related bits of information and created routines to read and write data to disk files. The program would present a simple prompt for logging in, specifying a department and entering a job information.
This was all fine, but it was hard to add new functionality to the system, and I was finding it frustrating dealing with memory bugs and pointer related bugs.
I decided that I needed a multiuser system. If I took the multitasking out of my C code then my programs would be simpler. I noticed an ad in a magazine for a multitasking version of DOS called Wendin DOS. This version of DOS was based on a VMS architecture, and it was very inexpensive. I approached Bob and he bought a copy.
On my Tandy 1000SX Wendin DOS was sluggish. I hoped that this wouldn't matter much because if I could create a working system then we could buy a more powerful 80286 computer to run it on. I was able to create multiple sessions and run my C tracking system in them. Each of them ran in its own text window. This was amazing to me!
Now the bad news. Wendin DOS would crash without warning. The whole screen would suddenly clear and display a "guru" error message. Guru error number such and such. This was really weird. What was a guru, and why was it in my computer?
Some of the error messages were explained in the manual, but some weren't. It became clear to me that there was nothing I was doing to make this happen. I contacted the people at Wendin and even got a response, but they didn't fix anything.
Ultimately I had to give up on Wendin DOS and look for another solution.
Friday, March 12, 2010
Watch City
C.F.C. needed a bigger place to make its product, so we decided to move to 179 Bear Hill Road in Waltham, Massachusetts right on Route 128 and across from a Polaroid plant. 3Com was in the building next to us. This facility was huge compared to the building it occupied in Newtonville. I got my own office, as did a lot of other people. This was an interesting turn in my own life just because my mother grew up in Waltham and I was born there.
Waltham is often billed as "the birthplace of the American industrial revolution" and is famous for being the home of the Boston Manufacturing Company. It was also home to the Waltham Watch Company, and so Waltham is known as Watch City. As of the time of this writing I live in Ashland, Massachusetts which is the birthplace of the electric clock. An interesting coincidence.
C.F.C. was growing fast and a lot of interesting things were about to happen.
Waltham is often billed as "the birthplace of the American industrial revolution" and is famous for being the home of the Boston Manufacturing Company. It was also home to the Waltham Watch Company, and so Waltham is known as Watch City. As of the time of this writing I live in Ashland, Massachusetts which is the birthplace of the electric clock. An interesting coincidence.
C.F.C. was growing fast and a lot of interesting things were about to happen.
Labels:
3Com,
ashland,
electric clock,
polaroid,
waltham,
watch city
Monday, March 8, 2010
All Night Long
About this time I got a phone call from the video rental store in Somerville which was using the software that I wrote when working for Patrick Alessi. They were having a problem with their hard drive. They were using an IBM PC/XT with a 10MB hard drive. They were backing up their hard drive onto about 30 floppy disks but for some reason their restore wasn't working correctly. They asked if I could help.
I drove to Somerville and took their computer home with me. I used a disk editor application to examine the disk. I needed to look at each sector on the disk and manually reconstruct their database. I was up all night long working on this. Thankfully I did manage to make their system work again. I took their computer back to the store and gave them the bill. $115. I was surprised to see the owner thought this was too much, but I thought it was actually a good deal given the heroic effort I put in. I didn't lower my price.
I was really, really tired and when I got home there was a church meeting going in our living room, so I sat down. My eyelids were very heavy, and I could barely stay awake. When the meeting was over I'll never forget that Joe Silipo, the one doing most of the speaking, came up to me. I thought he was going to scold me but he just smiled and said, "Brother, get some sleep."
I drove to Somerville and took their computer home with me. I used a disk editor application to examine the disk. I needed to look at each sector on the disk and manually reconstruct their database. I was up all night long working on this. Thankfully I did manage to make their system work again. I took their computer back to the store and gave them the bill. $115. I was surprised to see the owner thought this was too much, but I thought it was actually a good deal given the heroic effort I put in. I didn't lower my price.
I was really, really tired and when I got home there was a church meeting going in our living room, so I sat down. My eyelids were very heavy, and I could barely stay awake. When the meeting was over I'll never forget that Joe Silipo, the one doing most of the speaking, came up to me. I thought he was going to scold me but he just smiled and said, "Brother, get some sleep."
Labels:
all nighter,
backup,
disk editor,
hard drive,
ibm xt,
sleep,
somervillle,
video rental
MIX C
Unlike today, in the 1980s most computer magazines like BYTE, Compute!, and PC Magazine had lots of articles about programming and programming languages. BASIC, Pascal, Prolog, Lisp, Forth, assembly language; you name it. In 1987 C was a very popular language and a good C programmer made good money so I decided that I should learn it.
I found an magazine ad for MIX C headlined "C for yourself". They had a very special deal called MIX C Works and this included the compiler, a split screen code editor, and a source level debugger for only $89.90. The ad claimed that the included book would make learning C easy. I paid for this software myself, and it was so exciting to open the package when it arrived in the mail. Nice new crisp books and disks. It all felt very professionally done. It was a great investment.
It was very exciting to dig into the C tutorial and use the editor and the source level debugger. This was really well written software and book was as good as the ad promised. C is a nice, small language and well written C is actually quite pretty to look at with those curly braces.
We had some simple applications in engineering that were perfect for learning a new language. Open a file, translate the information in some way and write it back out to a new file.
I found an magazine ad for MIX C headlined "C for yourself". They had a very special deal called MIX C Works and this included the compiler, a split screen code editor, and a source level debugger for only $89.90. The ad claimed that the included book would make learning C easy. I paid for this software myself, and it was so exciting to open the package when it arrived in the mail. Nice new crisp books and disks. It all felt very professionally done. It was a great investment.
It was very exciting to dig into the C tutorial and use the editor and the source level debugger. This was really well written software and book was as good as the ad promised. C is a nice, small language and well written C is actually quite pretty to look at with those curly braces.
We had some simple applications in engineering that were perfect for learning a new language. Open a file, translate the information in some way and write it back out to a new file.
Labels:
assembly language,
basic,
byte magazine,
c,
compute magazine,
debugger,
forth,
learning C,
Lisp,
MIX C,
Pascal,
pc magazine,
Prolog
VP Planner application development
Accounting wanted an application using a spreadsheet like Lotus 1-2-3. We did a little research and decided to try VP-Planner which was an inexpensive Lotus 1-2-3 clone. One of the nice features of VP-Planner was that it had a macro recorder. Instead of just creating a spreadsheet using a completely unrestricted form, it was possible to create a more shrinkwrapped type of application that limited which fields could be entered and to perform validation and such. I had never used this sort of development tool before so I had to learn everything fro scratch.
In retrospect I probably would have been able to produce what they needed faster in BASIC, and I certainly would have had more control over the result but this was a useful experience. Spreadsheets can be a good tool for people who don't want to learn a real programming language.
In retrospect I probably would have been able to produce what they needed faster in BASIC, and I certainly would have had more control over the result but this was a useful experience. Spreadsheets can be a good tool for people who don't want to learn a real programming language.
Tuesday, March 2, 2010
Enter the Robots, or... Old Apple IIs Don't Die, They Just Walk Away
Bob had made an arrangement with an entrepreneur (I wish I could remember his name.. Steve, maybe?) who was developing robots. The idea was that a robot could be developed that could tour a factory or other business and move materials automatically from one place to another. I don't know the details of their agreement, but it was probably that Bob would get one of these robots on the cheap or for free for providing the developer with space to work and for providing a real world factory for the robot to be tested in.
The entrepreneur was also the engineer developing the robot technology. I had a few good conversations with this guy because I shared an office with him briefly. He explained to me that the robot had two computers. One was an IBM PC compatible motherboard and the other one was an Apple II+ motherboard. The Apple II+ motherboard would later be replaced with a more generic 6502 card later on. One computer controlled the movement of the robot and read sensors, and it was programmed in C. The other computer had a goal seeking program written a language called Arity Prolog, and this computer controlled the other one.
The robot itself looked kind of like a big R2D2 with a flat top for placing materials to be transported. It had small sonar detectors like you would see on early Polaroid instant cameras, and on the top it had a small dome with a rotating infrared sensor. The robot was taught the layout of the factory, and it would continually adjust its course based on what it knew, what it sensed with sonar, and also by using the rotating sensor to look for infrared senders located in different locations in the factory.
The entrepreneur was also the engineer developing the robot technology. I had a few good conversations with this guy because I shared an office with him briefly. He explained to me that the robot had two computers. One was an IBM PC compatible motherboard and the other one was an Apple II+ motherboard. The Apple II+ motherboard would later be replaced with a more generic 6502 card later on. One computer controlled the movement of the robot and read sensors, and it was programmed in C. The other computer had a goal seeking program written a language called Arity Prolog, and this computer controlled the other one.
The robot itself looked kind of like a big R2D2 with a flat top for placing materials to be transported. It had small sonar detectors like you would see on early Polaroid instant cameras, and on the top it had a small dome with a rotating infrared sensor. The robot was taught the layout of the factory, and it would continually adjust its course based on what it knew, what it sensed with sonar, and also by using the rotating sensor to look for infrared senders located in different locations in the factory.
Labels:
apple II+,
arity prolog,
c,
ibm pc,
infrared sensor,
polariod,
robot,
sonar
Trouble with the Floppies
In my first years of computing my experience with floppy drives was pretty good. I had used several computers for thousands of hours total, and had seen hardly a hiccup reading and writing floppy disks.
The computers I had experience with floppies included:
Apple II+
IBM PC
Heathkit H-89
These used brands like Shugart and Tandem for their floppy drives.
Working with Patrick Alessi there was little trouble. He did smoke a pipe constantly around the equipment but this didn't seem to cause any problems.
At C.F.C. it seemed like floppy disks were more temperamental. Not that they weren't reliable enough for day to day use but they would cause problems just enough to be annoying. Maybe it was the industrial environment, or maybe the quality level for drives and floppy disks was falling. I dunno. Some of our disks came from customers and were formatted by their computers, so maybe that also had something to do with it. Floppy disks had become cheap and didn't have the same quality they did a couple of years earlier.
Some floppy drives could be calibrated using software and a screwdriver. I did try some of that, but I can't say I remember it being very successful.
The computers I had experience with floppies included:
Apple II+
IBM PC
Heathkit H-89
These used brands like Shugart and Tandem for their floppy drives.
Working with Patrick Alessi there was little trouble. He did smoke a pipe constantly around the equipment but this didn't seem to cause any problems.
At C.F.C. it seemed like floppy disks were more temperamental. Not that they weren't reliable enough for day to day use but they would cause problems just enough to be annoying. Maybe it was the industrial environment, or maybe the quality level for drives and floppy disks was falling. I dunno. Some of our disks came from customers and were formatted by their computers, so maybe that also had something to do with it. Floppy disks had become cheap and didn't have the same quality they did a couple of years earlier.
Some floppy drives could be calibrated using software and a screwdriver. I did try some of that, but I can't say I remember it being very successful.
Labels:
apple II+,
calibration,
floppy disk,
floppy drive,
heathkit,
ibm pc,
shugart,
tandem
Monday, March 1, 2010
Bombs away!
If a customer sent us a disk with drilling hole data this made our job easy, but many times they only sent us artwork on film, or worse. In this case it was up to Daniel Donoso (a very nice guy from Chile) to digitize all the drilling locations for a board. You take a different color permanent magic marker for each hole size, and then you connect the dots making a track that leads through all the drilling positions.
Then you place the artwork on a large digitizing machine called an OPIC II made by Excellon. This had a large polished granite platform, and on top rested a platform on top of felt pads. The artwork is placed on the table, and then using two control wheels the table is moved with several decimal places of precision through the course laid out in marker. Daniel would sit and peer into a "bombsight" down at the table and drop imaginary bombs on each position with a foot pedal. Each time he did this the X and Y position of the table was recorded to paper tape. This could take a while to do, and it took practice.
One really cool thing about the OPIC II was the digital display for showing the X, Y coordinates. It didn't have an LED display. Instead each digit position had one of those little vacuum tubes that had incandescent filaments shaped like each digit. I guess this might have been a plasma display, and not incandescent, I'm not sure. If you looked carefully you saw that the different digits were not all the same exact distance from your eyes because they were all packed into the tube in a row, one behind the other.
The OPIC II could not be called a computer, but later on we would find a way to use a computer with this machine.
Then you place the artwork on a large digitizing machine called an OPIC II made by Excellon. This had a large polished granite platform, and on top rested a platform on top of felt pads. The artwork is placed on the table, and then using two control wheels the table is moved with several decimal places of precision through the course laid out in marker. Daniel would sit and peer into a "bombsight" down at the table and drop imaginary bombs on each position with a foot pedal. Each time he did this the X and Y position of the table was recorded to paper tape. This could take a while to do, and it took practice.
One really cool thing about the OPIC II was the digital display for showing the X, Y coordinates. It didn't have an LED display. Instead each digit position had one of those little vacuum tubes that had incandescent filaments shaped like each digit. I guess this might have been a plasma display, and not incandescent, I'm not sure. If you looked carefully you saw that the different digits were not all the same exact distance from your eyes because they were all packed into the tube in a row, one behind the other.
The OPIC II could not be called a computer, but later on we would find a way to use a computer with this machine.
Labels:
bombsighting,
digitizing,
excellon,
opic ii,
paper tape,
plasma display
The TRS-80 Gets a New Home, Briefly
After we built the new tracking system using one of the the Kaypro II machines, the TRS-80 was re-purposed by the drilling crew. A fellow by the name of Robert Doulbakian was in charge of that group. He wanted to use the TRS-80 to manage inventory for the drill and rout tool bits. I was very familiar with inventory management, having worked with Mr. Alessi on a couple such systems and Robert's requirements were very simple. I pulled something together for him quickly in Level II BASIC.
It seems to me that this particular computer was beginning to reach the end of its useful life. The keys were beginning to be sticky (and I think one of the keycaps had fallen off). In addition the machine was exposed to a more corrosive environment out in the factory, and these TRS-80 Model I computers had only silver and tin solder for contacts between the main unit and the expansion box. The computer would hang or reboot frequently.
It seems to me that this particular computer was beginning to reach the end of its useful life. The keys were beginning to be sticky (and I think one of the keycaps had fallen off). In addition the machine was exposed to a more corrosive environment out in the factory, and these TRS-80 Model I computers had only silver and tin solder for contacts between the main unit and the expansion box. The computer would hang or reboot frequently.
Labels:
inventory,
kaypro,
level ii basic,
trs-80,
unreliable
Thursday, February 25, 2010
The Job Tracking System in BASIC
It was time to put my new SBASIC tool to good use. Bob wanted a new tracking system to replace the old TRS-80 one. We decided to use one of the Kaypro II machines for this. I'm a little fuzzy on whether Bob started this one and handed it off to me, or if I was the developer from the get-go. Regardless, this project was a showcase for what could be done with the BASIC programming language.
This was a pretty easy application to build. There were a dozen or so departments on the factory floor. Each time a new job was ordered there were some essentials entered like job #, customer name, board type, due date, etc. and these were just stored in a simple random access file. Several times a day a young lady from Brazil named Danusa would make rounds collecting information about jobs and where they were in factory. Then she would come back and enter this information. Status reports would get printed out.
C.F.C. specialized in quick turnaround orders. Anything we could do to improve information about important rush orders was critical. A more timely tracking system was in our sights. We took one of the Tandy Model 100 portables and bought a barcode wand for it. A data collection program for it was written in BASIC. This would be used to collect the locations of all the jobs. I wrote a program in the tracking application for printing 3 of 9 bar code on label stock using an Epson compatible dot matrix printer. These had job numbers on them and we stuck them on the job bill of materials sheets that went with each order. Then we printed large bar codes for each department.
So now all Danusa had to do was go to a department, scan the bar code on the department sign, and then go to each bill of materials sheet and scan in the job number bar code. Then she would repeat this with each department. When this was done (and it was a lot faster than using a pen and clipboard) all she had to do was come back and we would read the information into the Kaypro II using an RS-232 cable and we would just suck that information into the tracking system and print the reports.
It really stands out to me that this sort of very useful application programming was easily achievable by a high school graduate with a knowledge of BASIC. For a good while we used this system to expedite manufacturing. End users used to do this kind of thing a lot more back then and I'm sure that Bob could easily have written this himself if he were so inclined and it he weren't so busy running the company. People should take more interest in programming because it's fun, it teaches important thinking skills and even untrained programmers can accomplish real productivity enhancements.
This was a pretty easy application to build. There were a dozen or so departments on the factory floor. Each time a new job was ordered there were some essentials entered like job #, customer name, board type, due date, etc. and these were just stored in a simple random access file. Several times a day a young lady from Brazil named Danusa would make rounds collecting information about jobs and where they were in factory. Then she would come back and enter this information. Status reports would get printed out.
C.F.C. specialized in quick turnaround orders. Anything we could do to improve information about important rush orders was critical. A more timely tracking system was in our sights. We took one of the Tandy Model 100 portables and bought a barcode wand for it. A data collection program for it was written in BASIC. This would be used to collect the locations of all the jobs. I wrote a program in the tracking application for printing 3 of 9 bar code on label stock using an Epson compatible dot matrix printer. These had job numbers on them and we stuck them on the job bill of materials sheets that went with each order. Then we printed large bar codes for each department.
So now all Danusa had to do was go to a department, scan the bar code on the department sign, and then go to each bill of materials sheet and scan in the job number bar code. Then she would repeat this with each department. When this was done (and it was a lot faster than using a pen and clipboard) all she had to do was come back and we would read the information into the Kaypro II using an RS-232 cable and we would just suck that information into the tracking system and print the reports.
It really stands out to me that this sort of very useful application programming was easily achievable by a high school graduate with a knowledge of BASIC. For a good while we used this system to expedite manufacturing. End users used to do this kind of thing a lot more back then and I'm sure that Bob could easily have written this himself if he were so inclined and it he weren't so busy running the company. People should take more interest in programming because it's fun, it teaches important thinking skills and even untrained programmers can accomplish real productivity enhancements.
Labels:
3 of 9 barcode,
dot matrix printer,
epson,
factory,
job,
kaypro,
rs-232,
sbasic,
tandy model 100,
trs-80
The SBASIC Preprocessor
I had become familiar with structured programming ideas from my casual experimentation with Forth. I wanted to do something to improve the quality of my Microsoft BASIC programming. I realized that I could write a program that would take BASIC source code without line numbers, and adding in named labels for the GOTO and GOSUB targets and output line numbered BASIC. Then I could run this code in an interpreter or compile it. This was a cool idea for me. After having done the CNC simulator this lit up a part of my brain that brought me closer to realizing that a compiler is just another kind computer program that treats source code as data.
I wasn't familiar with QuickBASIC at that time, so I didn't use Microsoft's syntax for this. Instead I used square brackets for branch labels like so:
Liberty BASIC programmers will recognize this syntax. I called this preprocessor SBASIC for Structured BASIC.
Here's what it looks like in QuickBASIC:
I think that my syntax is better. It certainly is more consistent because in QuickBASIC the branch label will either be quit or quit: but in SBASIC it is always [quit].
So here we see a direct precursor to Liberty BASIC. At this time I did not have plans to create my own BASIC. That wouldn't come for four more years.
I wasn't familiar with QuickBASIC at that time, so I didn't use Microsoft's syntax for this. Instead I used square brackets for branch labels like so:
[loopHere]
a = a + 1
print a
if a = 10 then [quit]
goto [loopHere]
[quit]
print "done."
end
Liberty BASIC programmers will recognize this syntax. I called this preprocessor SBASIC for Structured BASIC.
Here's what it looks like in QuickBASIC:
loopHere:
a = a + 1
print a
if a = 10 then quit
goto loopHere
quit:
print "done."
end
I think that my syntax is better. It certainly is more consistent because in QuickBASIC the branch label will either be quit or quit: but in SBASIC it is always [quit].
So here we see a direct precursor to Liberty BASIC. At this time I did not have plans to create my own BASIC. That wouldn't come for four more years.
Labels:
forth,
gosub,
goto,
liberty basic,
quickbasic,
sbasic,
structured programming
Monday, February 22, 2010
The Job Does Has Its Perks
When I got promoted to computer programmer they moved me out of the engineering area and into the room next to it. They also gave me a desk and bought me a computer. This was a Tandy 1000SX, sporting a 7.16MHz 8088 processor, 384K bytes of RAM, two floppy drives and a 20MB hard card (a hard drive that is mounted on a frame in line with the controller card).
This was a slightly quirky machine. Tandy was used to producing their own designs, and their IBM PC clones up to this point were attempts at going their own way. As every computer manufacturer was learning it really didn't work to make an almost IBM compatible computer. The 1000 series was their first really compatible line. Even so they stubbornly kept their own keyboard layout from the Tandy 2000. I even needed to draw some missing symbols on keys with a permanent marker. The printer port was just circuitboard fingers on the motherboard instead of the popular Centronics printer connector.
The machine had CGA graphics and a green screen monitor. This would prove to be very important to software I would write but I couldn't imagine at this time where this would lead.
This was a slightly quirky machine. Tandy was used to producing their own designs, and their IBM PC clones up to this point were attempts at going their own way. As every computer manufacturer was learning it really didn't work to make an almost IBM compatible computer. The 1000 series was their first really compatible line. Even so they stubbornly kept their own keyboard layout from the Tandy 2000. I even needed to draw some missing symbols on keys with a permanent marker. The printer port was just circuitboard fingers on the motherboard instead of the popular Centronics printer connector.
The machine had CGA graphics and a green screen monitor. This would prove to be very important to software I would write but I couldn't imagine at this time where this would lead.
Labels:
8088 processor,
centronics,
CGA graphics,
hard card,
tandy 1000sx,
tandy 2000
101 Things You Can Do With a Floppy Disk
C.F.C. hired a college student for the summer of 1987 to operate their TRS-80 system which had three 5.25 inch floppy drives. The young student (he might have been older than me) would sometimes come to me when he had computer questions or if the machine wasn't working perfectly.
So, one day he comes to me and says that he's getting errors from the floppy drive. Okay, I followed him over to the computer. He reaches over and perfectly naturally reaches down, opens the drive and pulls out the disk... backwards! The disk was in the drive backwards, and his fingers were touching the magnetic disk through the access hole. I wasn't ready for that, and I don't think he was ready for my surprised outcry!
The good news? Even with fingerprints on the disk surface the data was still intact. The disk read fine when it was reinserted correctly.
So, one day he comes to me and says that he's getting errors from the floppy drive. Okay, I followed him over to the computer. He reaches over and perfectly naturally reaches down, opens the drive and pulls out the disk... backwards! The disk was in the drive backwards, and his fingers were touching the magnetic disk through the access hole. I wasn't ready for that, and I don't think he was ready for my surprised outcry!
The good news? Even with fingerprints on the disk surface the data was still intact. The disk read fine when it was reinserted correctly.
Sunday, February 21, 2010
CNC Machine Simulator
The two Osborne 1 computers we were using in engineering were getting a bit worn, so Bob sprung for some Kaypro computers. I don't think they appeared all at once but soon enough we had two Kaypro II machines and one Kaypro 10. The Kaypro II's were similar to the Osbornes but with bigger screens. Now we had 80 columns of bright green text. The Kaypro 10 also had a built in 10MB hard drive.
One really important difference with these new machines is that they had block graphics characters, and you could plot lines and points. This wasn't high resolution but it was good enough to inspire me to write a simple interpreter for the CNC programming language. Remember how I tried to write a programmable calculator program for my VIC-20 but never finished it? This interpreter was the realization of ideas that I'd been kicking around for a while. I wrote this as an extension of the machining text editor in MBASIC.
Now we could run a rough simulation of how a routing or drilling program would work and see the result on the screen. There was no fine detail, but it was easy to see if we accidentally drilled outside the board, or if a panel would be ruined by an accidentally placed cut. This certainly saved time and money because we were able now to make fewer first pieces so the single head Excellon machine and it's operator were more efficient.
One really important difference with these new machines is that they had block graphics characters, and you could plot lines and points. This wasn't high resolution but it was good enough to inspire me to write a simple interpreter for the CNC programming language. Remember how I tried to write a programmable calculator program for my VIC-20 but never finished it? This interpreter was the realization of ideas that I'd been kicking around for a while. I wrote this as an extension of the machining text editor in MBASIC.
Now we could run a rough simulation of how a routing or drilling program would work and see the result on the screen. There was no fine detail, but it was easy to see if we accidentally drilled outside the board, or if a panel would be ruined by an accidentally placed cut. This certainly saved time and money because we were able now to make fewer first pieces so the single head Excellon machine and it's operator were more efficient.
Labels:
excellon,
first piece,
graphics,
hard drive,
interpreter,
kaypro,
mbasic,
osborne 1,
simulator,
vic-20
Friday, February 19, 2010
Moving Up
A few months into my new job at C.F.C. I wrote an application for Tina in accounting. She had the only computer in the building that had a hard drive. It was an Epson Equity which is an IBM XT clone with a monochrome green screen and a 20MB hard drive running MS-DOS 2.11. I'm guessing a heard Tina and Simone (who is Bob's wife and VP of the company) talking about a need, and I must have offered to craft a solution for them. Simone probably asked me with surprise, "Can you do that?" I was eager to jump right in. I'm pretty sure that GW-BASIC was already installed on the computer. :-)
Up to this point my programming work for engineering and accounting was done on my own initiative. I wasn't trying to attract attention, but Bob noticed my enthusiasm for software development. He is an open minded person, and his whole business was personal and informal so he must have found it easy to promote me out of engineering. I became the company's in-house computer programmer. That was quick! I didn't get a pay raise but how could I complain? This was exactly what I wanted and it was an opportunity for him too.
This is the sort of business that just begs to be automated. Bob certainly knew this. One programmer could keep himself busy with interesting work for many years and I was the lucky fellow.
Up to this point my programming work for engineering and accounting was done on my own initiative. I wasn't trying to attract attention, but Bob noticed my enthusiasm for software development. He is an open minded person, and his whole business was personal and informal so he must have found it easy to promote me out of engineering. I became the company's in-house computer programmer. That was quick! I didn't get a pay raise but how could I complain? This was exactly what I wanted and it was an opportunity for him too.
This is the sort of business that just begs to be automated. Bob certainly knew this. One programmer could keep himself busy with interesting work for many years and I was the lucky fellow.
Labels:
epson equity,
gw-basic,
ibm xt,
initiative,
ms-dos,
promotion
Thursday, February 18, 2010
My First Text Editor
Using a word processor to edit CNC programs didn't seem quite right to me, so I decided to write a text editor especially for editing drilling and routing programs. I had never written a text editor before, but I had a pretty good idea how to go about it. The Osborne 1 had a terminal style display, so there were control and escape sequences for inserting and deleting lines and characters which makes it pretty easy to write a screen editor.
One thing that motivated me to write this editor was to save time. Sometimes it was really useful to be able to mark of bunch of drilling coordinates and move them or make copies at an offset. My editor made this easy to do.
I wrote the editor in MBASIC. I'm pretty sure it was also compiled to a standalone application using BASCOM. This was in a before IDEs, and programs needed to be compiled and linked.
One thing that motivated me to write this editor was to save time. Sometimes it was really useful to be able to mark of bunch of drilling coordinates and move them or make copies at an offset. My editor made this easy to do.
I wrote the editor in MBASIC. I'm pretty sure it was also compiled to a standalone application using BASCOM. This was in a before IDEs, and programs needed to be compiled and linked.
The Osborne 1
The Osborne 1 was a portable CP/M computer with a Z-80 processor. It looked like a portable sewing machine. You tip it on its side and undo the latches and the end would come off revealing a keyboard which was attached to the rest of the machine by a wide ribbon cable. Removing the keyboard revealed two large floppy drives, a tiny 5 inch screen, cubbies for floppy disks, and a bunch of ports. We would plug the RS-232 cable from the paper punch into one of the ports.
The 5 inch screen could only display 52 characters wide, but it could scroll. You had to have a tolerance for reading very small type to use this machine. I was okay with it, but today I probably wouldn't enjoy it.
Aside from editing CNC programs, we also had MBASIC on these machines and so we could do a little programming to help us with our work. Bob knew how to write in BASIC and he had written a few things. For example there was a program for spitting out a simple routing program for a rectangular board. You just punch in the size of the board and it would generate a file. Anything more complex than that required manual coding.
One problem we had with the Osborne 1 machines we had was that the keyboard bezel was metal and it wasn't grounded well. If you walked up to the computer and touched the keyboard it wasn't unusual to discharge some static electricity and reset the computer, losing whatever work you were doing.
The 5 inch screen could only display 52 characters wide, but it could scroll. You had to have a tolerance for reading very small type to use this machine. I was okay with it, but today I probably wouldn't enjoy it.
Aside from editing CNC programs, we also had MBASIC on these machines and so we could do a little programming to help us with our work. Bob knew how to write in BASIC and he had written a few things. For example there was a program for spitting out a simple routing program for a rectangular board. You just punch in the size of the board and it would generate a file. Anything more complex than that required manual coding.
One problem we had with the Osborne 1 machines we had was that the keyboard bezel was metal and it wasn't grounded well. If you walked up to the computer and touched the keyboard it wasn't unusual to discharge some static electricity and reset the computer, losing whatever work you were doing.
Labels:
applesoft basic,
cnc,
cp/m,
floppy drive,
mbasic,
osborne 1,
routing,
rs-232,
static discharge,
z-80
Wednesday, February 17, 2010
Paper Tape
When there was a mistake in a long CNC program, sometimes it was easy to tell that it was a mistake at the beginning of the program. Rather than read the whole thing in, edit it in WordStar and then punch a whole new tape, sometimes it was easier to repair the paper tape itself.
Usually you could just create a new section of paper tape, and then you unroll the tape to the section you are looking for and splice in the change. With some practice it wasn't too hard to read the binary numbers by eye. Instead of ASCII values, CNC programs were punched to tape using EIA (Electronic Industries Association) codes.
In some instances if you didn't need to change the number of characters, but just which values (change some digits for example), you could just cover the holes with tape and punch new holes. I think I did that at least a couple of times.
So, this all seems very archaic right? On the plus side you really had control over the stored data. Today if your disk drive or your flash memory loses a bit you can't even see it let alone fix it. ;-)
Usually you could just create a new section of paper tape, and then you unroll the tape to the section you are looking for and splice in the change. With some practice it wasn't too hard to read the binary numbers by eye. Instead of ASCII values, CNC programs were punched to tape using EIA (Electronic Industries Association) codes.
In some instances if you didn't need to change the number of characters, but just which values (change some digits for example), you could just cover the holes with tape and punch new holes. I think I did that at least a couple of times.
So, this all seems very archaic right? On the plus side you really had control over the stored data. Today if your disk drive or your flash memory loses a bit you can't even see it let alone fix it. ;-)
Labels:
ascii,
binary,
cnc machine,
eia,
paper tape,
punch,
splice
Tuesday, February 16, 2010
Welcome to the Machine
Or welcome to the machines as it were. I think there were four Excellon drilling and routing machines at C.F.C. One of them had just a single head and was used for making first pieces to test for errors in the drilling and routing programs.
So my first job was to learn the programming language for these machines. Bob Spain and a young lady named Kristen Van der Laan were my teachers. This is no high level programming language, but more like a machine code of sorts. Circuitboards are still drilled and routed this way today more than 20 years later.
Here is an example of a very short Excellon drilling program. The actual language for CNC machining is based on commands used to control Gerber Scientific plotters:
M48
T1C0.028
T2C0.032
%
M48
G05
M60
T1
X2.550Y1.550
T2
X2.600Y1.650
X2.600Y1.750
M30
That drills just three holes of two different sizes. Writing programs to drill holes wasn't really the engineer's job. We mostly wrote programs to cut the boards out. Most of these were simple rectangles, and the program for this wasn't much longer than the example above. Sometimes boards would be circular, or have odd shapes. Some would have chamfers, fingers, slots, large inner cutouts. There was great variety. Sometimes we would make palletized panels which have more than one circuitboard. The routing was designed to leave only small perforated spots to hold it all together, and the boards would be removed from the panel either by hand or by machine.
We would write a program for routing using WordStar and then save it to a floppy disk. Then we would send the program out to the paper tape punch machine. The tape was usually gray, blue or pink. There were little tiny round pieces of colored paper all over the place.
A finished program would go out for a first piece to make sure it was correct. If you left just one digit out of a routing program the machine could destroy the panel, cutting straight through the middle of it.
So my first job was to learn the programming language for these machines. Bob Spain and a young lady named Kristen Van der Laan were my teachers. This is no high level programming language, but more like a machine code of sorts. Circuitboards are still drilled and routed this way today more than 20 years later.
Here is an example of a very short Excellon drilling program. The actual language for CNC machining is based on commands used to control Gerber Scientific plotters:
M48
T1C0.028
T2C0.032
%
M48
G05
M60
T1
X2.550Y1.550
T2
X2.600Y1.650
X2.600Y1.750
M30
That drills just three holes of two different sizes. Writing programs to drill holes wasn't really the engineer's job. We mostly wrote programs to cut the boards out. Most of these were simple rectangles, and the program for this wasn't much longer than the example above. Sometimes boards would be circular, or have odd shapes. Some would have chamfers, fingers, slots, large inner cutouts. There was great variety. Sometimes we would make palletized panels which have more than one circuitboard. The routing was designed to leave only small perforated spots to hold it all together, and the boards would be removed from the panel either by hand or by machine.
We would write a program for routing using WordStar and then save it to a floppy disk. Then we would send the program out to the paper tape punch machine. The tape was usually gray, blue or pink. There were little tiny round pieces of colored paper all over the place.
A finished program would go out for a first piece to make sure it was correct. If you left just one digit out of a routing program the machine could destroy the panel, cutting straight through the middle of it.
Labels:
circuitboard,
excellon,
gerber plotters,
paper tape,
programming,
wordstar
Saturday, February 13, 2010
A Cornucopia of Computers
So I joined the engineering group at C.F.C. Our job was to write and debug CNC programs for the Excellon drilling and routing machines. Most of the programs were written using WordStar on Osborne-1 and Kaypro CP/M machines. We did not use hard drives to do this work, and the final medium of storage was punched paper tape. Yes, really! That was the format the machines used, and we had a storage library for keeping the tapes.
There was one Macintosh in engineering for special purposes, but here again I never used it.
There was a TRS-80 used for managing job tracking in the factory. It had the standard silver expansion box and three floppy drives.
Accounting had an Epson PC clone (or was it a Leading Edge Model D?), and there were a couple of Tandy Model 100 laptops that look like Alan Kay's Dynabook prototype.
Things were about to get interesting.
There was one Macintosh in engineering for special purposes, but here again I never used it.
There was a TRS-80 used for managing job tracking in the factory. It had the standard silver expansion box and three floppy drives.
Accounting had an Epson PC clone (or was it a Leading Edge Model D?), and there were a couple of Tandy Model 100 laptops that look like Alan Kay's Dynabook prototype.
Things were about to get interesting.
Labels:
alan kay,
cnc machine,
cp/m,
dynabook,
epson,
excellon,
kaypro,
leading edge,
macintosh,
osborne,
paper tape,
programming,
tandy model 100,
trs-80,
wordstar
Friday, February 12, 2010
A Fortunate Series of Events
In the spring of 1986 I discovered something that would change the direction of my life completely. I had been reading the Bible a lot in my teen years, but I didn't have a church community that fit what I understood from my studies until I found the Boston Church of Christ.
Late that year I decided to move in with some other young fellows from the church in Newton, but in order to do this I needed to find more regular paying work. I continued to work with Mr. Alessi but I began to look for a job. For some reason in the cold early spring of 1987 I worked for a few weeks at McDonalds and then suddenly I found an ad in the local paper. I remember the ad was titled "Programmer Trainee".
I went in for an interview. The company was called Circuitboard Fabrication Company, or C.F.C. It was hidden neatly in a neighborhood right next to a grade school in Newtonville. The president of C.F.C. was Bob Spain. He explained that this was a job programming CNC drilling and routing machines which are used to cut circuitboards out of fiberglass sheets. I told him that I was interested in developing computer programs and he responded that I may have an opportunity to do some of that at C.F.C. Small business owners like Bob Spain and Patrick Alessi are so openminded. :-) He offered me $5.50 an hour, and I accepted the job.
I began my new job taking the bus from Needham center to Newtonville because my car had broken down. Then after a few weeks I moved in with the guys from church. I only took with me what would fit in one carload. My new home just happened to be walking distance from C.F.C. It was very easy for me to see the hand of God in this arrangement.
I was surprised to learn soon after starting my new job that Mr. Alessi had used C.F.C.'s services to produce the circuitboards I had been assembling for two years. I had notice the marking CFC-1 on the boards and now I understood what it meant.
Late that year I decided to move in with some other young fellows from the church in Newton, but in order to do this I needed to find more regular paying work. I continued to work with Mr. Alessi but I began to look for a job. For some reason in the cold early spring of 1987 I worked for a few weeks at McDonalds and then suddenly I found an ad in the local paper. I remember the ad was titled "Programmer Trainee".
I went in for an interview. The company was called Circuitboard Fabrication Company, or C.F.C. It was hidden neatly in a neighborhood right next to a grade school in Newtonville. The president of C.F.C. was Bob Spain. He explained that this was a job programming CNC drilling and routing machines which are used to cut circuitboards out of fiberglass sheets. I told him that I was interested in developing computer programs and he responded that I may have an opportunity to do some of that at C.F.C. Small business owners like Bob Spain and Patrick Alessi are so openminded. :-) He offered me $5.50 an hour, and I accepted the job.
I began my new job taking the bus from Needham center to Newtonville because my car had broken down. Then after a few weeks I moved in with the guys from church. I only took with me what would fit in one carload. My new home just happened to be walking distance from C.F.C. It was very easy for me to see the hand of God in this arrangement.
I was surprised to learn soon after starting my new job that Mr. Alessi had used C.F.C.'s services to produce the circuitboards I had been assembling for two years. I had notice the marking CFC-1 on the boards and now I understood what it meant.
Labels:
bible,
church,
circuitboard,
cnc machine,
god,
programming
How I met the transistor
When I was perhaps 11 years old my father brought me home a book, and what a book it was! It was a red covered paperback titled Transistors, and I think it was published by Tab. The book was a perfect introduction to semiconductors for the neophyte. It was peppered with cartoon characters and helpful diagrams. The wonders of doped germanium and silicon were laid bare. PN, NPN and PNP junctions, holes, valence electrons and more all demystified. I already had a basic understand of what a transistor was, but until I read this book I really had no idea how they worked. The book blew the door wide open!
This was obviously a well written book to be suitable for an 11 year old to grasp and the information has stuck with me even after all these years. Thanks Dad! Now where did I leave that book?
This was obviously a well written book to be suitable for an 11 year old to grasp and the information has stuck with me even after all these years. Thanks Dad! Now where did I leave that book?
Labels:
book,
dad,
germanium,
semiconductor,
silicon,
transistor,
valence electron
Thursday, February 11, 2010
VIC-20 Blues
Here's an embarrassing story. One day I got the bright idea to put my VIC-20 on my lap and then I put my nearly new black and white television on a milk crate on the floor in front of me. I sat on a chair in front of it and wrote code. This would have been awkward I suppose if not for the fact that the VIC-20 had only 23 rows of 22 characters. The letters on the screen were huge, so the screen could be rather far away and I was comfortable.
Alas, I put my foot on the corner of the milk crate. At some point I shifted my weight to get comfortable and unwittingly kicked the television over backwards. It fell only about a foot to the floor. The back of the plastic case was so close to the back of the cathode ray tube that the case only needed to deform slightly to press against the tube. The back of the tube snapped off and it was ruined. The phosphor on the front of the screen was removed by the action of the gasses rushing in and you could see inside. What a disappointment, but it was a good lesson for me.
I never found an opportunity to replace the TV, and I never used my VIC-20 again and all these years later I don't remember what happened to it.
Alas, I put my foot on the corner of the milk crate. At some point I shifted my weight to get comfortable and unwittingly kicked the television over backwards. It fell only about a foot to the floor. The back of the plastic case was so close to the back of the cathode ray tube that the case only needed to deform slightly to press against the tube. The back of the tube snapped off and it was ruined. The phosphor on the front of the screen was removed by the action of the gasses rushing in and you could see inside. What a disappointment, but it was a good lesson for me.
I never found an opportunity to replace the TV, and I never used my VIC-20 again and all these years later I don't remember what happened to it.
Subscribe to:
Posts (Atom)