BASIC Stamp, VB.NET and LED’s=a great Starship Simulation

sttrk2While taking a break from my XGS PIC Tiny Basic project, I’ve been experimenting with my Basic Stamp Homework board.  While playing around with the seven segment LED counting circuit, I realized that I had a pretty nifty little computer that could interact with software on my Windows computer while also making something happen on it, something that interacts with the physical world. Like lighting up an LED or moving a servo.  That got me thinking about interactive smart games.

While pondering this, I was also looking for a small, Star Trek game that I could adapt as an example game for my XGS PIC Tiny Basic project.  Suddenly, I remembered an article in an old Interface Age magazine that outlined a very complex starship simulation. In the article, the author wrote about networking several microcomputers (it was a late ‘70s magazine) that would each run part of the simulation and one ‘central’ micro would bring it all together. Hmm…Star Trek, BASIC Stamp, Windows…

So, I whipped up a two LED circuit (ok, I ‘built’ it from the book) with a red and a green LED.  I wrote some simple code to:

  • light up the appropriate LED based on the ‘ship condition’
  • search for the nasty Borg (I updated the game)
  • alert the Windows computer when a Borg cube was ‘found’
  • the Windows computer displays the Borg threat on an Next Generation style screen
  • do not much else at the moment.

Now, when I’m done with the Tiny Basic project, I’m going to explore this game a bit further. Imagine having several of these Basic Stamps connected, each running, say, a borg simulation, the ships computer or even another alien species hunting both down. You could get quite elaborate and since each Basic Stamp would be dedicated to a specific function, you only need to worry about communicating with the Windows computer and that is something that the Basic Stamp does very well.

An enterprising soul (hmm) could build a Next Gen looking housing and mount switches, LED’s, etc. for an even more engrossing game.  The possibilities are endless.


From patch cords and punch cards to GUI’s and Mice: how programming evolved

Software development has come a very long way since the early days of 1946 when Eniac was programmed via patch cords.  When more modern computers, such as Univac, hit the market, programming them was better, but still required skills that were just impossible to come by. The problem was so bad, that it nearly derailed the whole industry before it really got going.

IBM704That changed, though, in 1954 when John Backus of IBM developed the FORTRAN language.  Considered the first successful high level language, FORTRAN, short for FORmula TRANslator, was, initially, greeted with a bit of skepticism, but that was satiated with the optimizing compiler. There was a fear that the code it generated would not be as tight as the previously hand assembled code, so the optimizing compiler was developed to quell those fears.

The first FORTRAN was released in 1957, followed up the next year with FORTRAN II, which contained enhancements including the addition of procedural programming. Functions and subroutines allow the developer to create their own functions for the first time.

FORTRAN was a big step forward, but it had its limitations. Primarily, it was not very good with business uses. The solution would come from a committee that formed in 1959.  The committee was formed by people from the government and private industry.

FLOW-MATIC, a language developed by Grace Hopper, was used as the foundation for COBOL, or COmmon Business Oriented Language. FLOW-MATIC was drawn from more than other language specs mainly because it was the only one that had actually been deployed and used. COBOL gained wide acceptance in business and enjoyed a run that continues today, though it use has dramatically declined over the last couple of decades. 

Both FORTRAN and COBOL served both the science, research and business communities, but they were not all that easy to master. FORTRAN more than COBOL, but were still out of reach for many.  In 1962, John Kemeny and Thomas Kurtz developed the Beginners All-purpose Symbolic Instruction Code, or BASIC.  Panned by most ‘professional’ programmers and purists, BASIC, nonetheless, gained wide acceptance in the 1970’s with the advent of the microcomputer.

Initially, BASIC was both the operating system and language of many homebrew and early retail microcomputers. However, those machines were very limited in memory and power. The version of BASIC that was generally in use was called Tiny BASIC. These ‘tiny’ languages truly were tiny: most took only 2.5 to 4K of memory. They generally only handled integer numbers, limited or no string handling and only the ‘basic’ of statements (like IF-THEN, GOTO, PRINT, INPUT, etc.) were included. 

Things looked up, however, when the ALTAIR computer was introduced. Two kids decided they would supply a BASIC language for the computer. Paul Allen and Bill Gates set up shop in New Mexico and began Micro-Soft. Gates delivered the final bits of code the day they were supposed to meet with Ed Roberts, the owner of the MITS company, the producer of the Altair.  Micro-Soft Basic became the defacto ‘standard’ for microcomputer Basic for years to come. It was also one of the most pirated pieces of software.

Micro-soft, later changed to Microsoft, continually enhanced the language, adding low-res, monochrome graphics statements, then hi-res color, disk file handling and more. In 1991, the company introduced Visual Basic, a Windows based development environment. For the first time, Windows applications could be developed, quickly and without having to know ‘C’ or how the innards of Windows worked. It enabled companies, large and small, to embrace Windows without having spend lots of money developing or purchasing specialty applications. The company also continued to develop its DOS versions with the Professional Development System and a DOS version of Visual Basic called Visual Basic for DOS or VBDOS for short. I, personally, developed several applications with VBDOS and it was, by far, my favorite text based version other than NI/BL, a variation of Tiny Basic for the National Semiconductor SC/MP in the ‘70s.

Microsoft held VB in such high regard, that it became the built in scripting language of its Office Suite, a second scripting language in its browsers, and for Windows itself. VBScript, while it no longer is being developed by the company, is a highly versatile language and is under appreciated.

No discussion of programming languages would be complete without talking about C.

C was developed between 1969 and 1973 by Dennis Ritchie at Bell Labs. C is probably the most widely used language. It is used to develop everything from games to operating systems (such as Unix and Windows.) While it generally is considered a high level language, C more closely resembles cross between BASIC and Assembler. It requires knowledge of how the CPU works, things like pointers and other lower level objects than, say a BASIC or even COBOL.  It does, however, generate smaller and more efficient code.

C gained popularity in the 1980’s but it, too, had ‘Tiny’’ versions, but they did not catch on quite like Tiny Basic did. However, it did spawn a more powerful version called C++. C++ is an object oriented language that did catch on…like wildfire. C++ is a true modern language and was the inspiration for other modern languages like JAVA and C Sharp (C#).

Gone are the days of punch cards, magnetic tape and printouts. With our graphical development environments, mice, touch screens and languages like C Sharp, VB and web development technologies, programming has definitely come a long way. And, that shortage of programmers? Gone.

I must say, those days in the 1970’s and 80’s, and the underpowered computers, were a blast. For geeks like me, Tiny Basic was a godsend. I was able to learn something that, later, would provide a career. I got to experience, first hand, the birth of the modern computer era. I can remember, eagerly, getting a computer magazine and tediously entering BASIC code and then having to ‘fix’ it to work with my particular flavor of BASIC. But, I did. I got just about everything I entered to work. Yeah, I missed things like Prom and high school football, but I would not trade it for anything. I think the way I felt was pretty close to those early pioneers in the early ‘50s.  Amazing, that sums it up.