Jump to content

Lessons from the past


Recommended Posts

  • Member

It is often said about history that those who don't know their history are doomed to repeat it.

In the attached image are two old computers, The one on the right is an 8-bit Apple 2e.  The one on the left is a 16-bit Apple 2gs.  Both of these machines should still work but they are currently buried in a closet.  The game being played is a math drill and these sorts of machines and programs were a common sight in the 1980's.  The Apple 2e was purchased by my parents in 1982 and was our second home computer.  The Apple 2gs was purchased by ME as my second home computer in 1990 and I took it to university.  I bring these machines up because programming on a desktop PC in those days was very similar to programming an embedded machine today.

In those computers, the operating system was called a disk operating system and simply provided the functions required to copy a program from a floppy disk into memory and start it running.  When you wanted to run a different program, you often would replace the floppy disk and reset the computer.  While the program was running it has 100% freedom to access any aspect of the computer that it needed.  There was no protected memory, supervisory mode access, sandboxes, etc.  There were no device drivers either.  interacting with the hardware meant opening up a programmers reference manual and learning about the special memory locations.  In the Apple 2e, the keyboard interface was 7-bit ASCII codes accessed at two locations ($C000 and $C010).  Bit 7 (the MSB) was the "any-key-down" flag which indicated that the remaining 7-bits had a valid keypress.  Accessing $C010 cleared the "any-key-down" flag.  In essence, every program written for these machines was "bare-metal" with size, and speed constraints more restrictive than our our modern embedded systems.

The interesting lessons come from understanding that the "forefathers" of computer science such as Donald Knuth and Edsger Dijkstra were developing computer science techniques that were good because of science.  They used old computers (perhaps not 6502 based) with similar restrictions as these old home computers.  If they teach that linked lists are a good way to solve certain problems, that should not be understood to mean "if your computer is a 32-bit modern machine", but rather, "If you are using a computer". Every solution has tradeoff's and there are many problems that will not fit in an 8-bit system.  But MOST problems that we see can be solved or even HAVE BEEN solved in computers MUCH smaller than most modern engineers realize.

Before you throw more computing resources at a problem, study your solution and try to determine if you are on the right path.  Is there a better algorithm or approach besides the brute force.  Is there a similar historical solution that can be studied

Good Luck



2007-08-29 at 16-20-10.jpg

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.


  • Create New...