Tiny Basic, Signetics 2650 and a SC/MP: HalfByte’s early days

I am sitting here, banging away on a run of the mill HP Windowsc03742269 computer. It has a decent set of specs for today, but is no match for even a low end gaming PC or a research oriented computer. For the few games I play, the Internet browsing, code writing and Microsoft Office tasks, it works well.  Compare it to the comptuers that I started out with, however, it might as well be a Cray Supercomputer. 

Indeed, this AMD based HP would be the hottest thing in 1974, the year I can remember first ‘using’ a home computer (or, actually, ANY kind of computer.)  Back then, home computers were barely out of science fiction. In fact, that first computer was the Mark 8 ‘mini’ computer first showing up on the pages of Radio-Electronics Magazine.  It was an Intel based 8008 ‘beast’.  It was something that my Dad was working on and, once it got to a bootable point, I was hooked.

mark8_re_coverIf I remember correctly, this thing was a pain in the butt to use. Just to ‘boot’ it up, you had to key in a sequence of sixteen bytes, one bit at a time, on the front panel.  Once they were keyed in, the computer would start.  My Dad had this ‘TV Typewriter’ that we used to talk to the computer. It was, in reality, a Serial based video terminal, but it was new then.  A fellow by the name Don Lancaster designed it. My Dad bought the bare board and built it himself. That’s how things were done, you did not go to a Best Buy and just buy one. No, you built it.

So, this computer couldn’t do much.  My Dad bought something called ‘SCELBI Tiny Basic’ on a paper tape.  He had scrounged (something he was very good at) a paper tape reader and we were able to load this program into the computer. He would painstakingly key in a Tiny Basic program that I could then use.  I was only nine at the time, so programming was not something I thought about, but I was intrigued.

Fast forward a year and my father built another, more powerful, cTinyTrekBasicListingomputer. This one, a sixteen bit behemoth, was based on the Signetics 2650 microprocessor.  Man, this thing was great.  Signetics made them for quite a long time and they special because of their architecture: 16 bit internal, 8 bit bus.  It was unique among a sea of ‘me too’ chips.  More importantly, there was a dynamite version of Tiny Basic for the chip. This is when I started to figure out this programming thing.  It was addictive and started purely by accident.  See, my Dad was an engineer and built a lot of things. But, he was not good at this programming thing.  He, one day, gave me a program listing, the Tiny Basic manual he had printed out and told me to figure out how to get the program listing to work with Tiny Basic.  It was a Lunar Lander game from a very famous (at the time) book: Dave Ahl’s 101 computer games in Basic. I figured out that some statements just would not work, which ones needed small changes and I even figured out how to make some work by making a ‘gosub’ function-which is what I called a subroutine then.  It took me several weeks, but i got the game to work. Then, I found out, that my Dad already had a version that worked and was specifically for that version of Tiny Basic.  At first, I was upset. All that time I wasted.  Something struck me though…I had a blast making it work.  That is what he had hoped would happen. 

It paid off too.

Now, I had the bug in me. I WANTED to figure out and learn this programming stuff.  I started making small programs…mostly code that made Tiny Basic do thing it was not supposed to do. Like string handling and ‘graphics’ by making the cursor move about the screen and ‘drawing’ with ASCII characters.

I also got my very own computer. 

That computer, based on the National Semiconductor SC/MP, had 16k of RAM (quite a bit then) and a version of Tiny Basic called NI/BL.  Nibble, as I called it, was quite sophisticated for its day. Written for control applications (the SC/MP was an industrial controller, much like the ATMEL line of microcontrollers) Nibble was able to directly talk to the hardware, had the DO-UNTIL construct for looping, direct memory addressing, direct serial line addressing and memory management.  The computer also a cursor addressable video terminal and cassette I/O, which required me to write a ‘loader’ application in Nibble.  I could save my code just by typing LIST and pressing record, but I had to write code to load it back because the cassette was too fast for the input routine of Nibble.  I had to read the tape, 128 bytes at a time, poke it into a memory page, wait 1 second, and get more code.  The cassette was controlled by a relay, so I could start and stop it as needed. A 2K program took a couple of minutes to load, but it was much faster than typing.  I eventually had a paper tape reader and punch as well.

Ferguson-BigBoard-IBy now, my Dad had a disk drive based Z80 computer and something called ‘CP/M’.  It was a computer made from the ‘furgeson big board’.  The Big Board was very close to the design of modern day motherboards: integrated memory, cpu logic, video terminal and disk controller on one board.  Prior to that, we used the ‘S-100’ bus.  In this setup, the ‘motherboard’ only contained the connectors for the bus itself and no real logic.  Some had a power supply, most did not.  Each piece of the computer was on a separate board.  The Big Board, however, had it all on the SAME board.   It was very cool and was used as the design in the first real ‘personal’ computer from Xerox: the Xerox 820.  I had one.  My dad was able to get the board and built it into a desk, along with two 8 inch disk drives, keyboard, monitor and a printer.  I was set now.  In the interim, I also bought a ZX-81 and got a TRS-80 Color Computer. But, the Xerox is what I did my ‘real’ stuff on and the others were relegated to games or collected dust. 


Before the Xerox 820, my passion was the ZX-81 because I BUILT IT.  zx81adI bought the kit with money got back on my very first income tax refund.  Yep. $99 was sent to Sinclair for the kit.  Wow, I built it and…it did not work.  In looking at my work and the schematic, my Dad figured out that I was missing a resistor…to pull the Z80 reset pin low (I think) which allowed it to start up. I may have that backward, it has been so long. Once I soldered the resistor into place (there was a spot on the board, and it was on the schematic, but it was missing from the parts list and instructions) the Zed Ex came to life. I was thrilled. My Dad, he was unimpressed.  Not sure why, but he always hated Sinclair and anything Uncle Clive ever did. That little computer was awesome. To this day, I wish I still had the six or so that I had (I collected them for a bit, was going to make something great…never did.)  This thing introduced me to wanting to get into electronics more, but that waited until recently with my Arduino stuff.

The TRS-80 Color Computer also grabbed my heart.  I had one well into the late 1990’s or early double 00’s.  I don’t remember when, but I gave it to some kid at a hamfest.  Games, peripherals, the computer, etc.  He was so excited. I hope it inspired him. At any rate, the CoCo introduced me to GUI’s too.  I wrote a couple in Extended Basic.  Went on to write one in assembler, but it sucked.

Looking back, however, I think I was happiest on that 2650 and the SC/MP. They were, comparatively speaking, so basic and so primitive and the things I could do with them. Man, that was exciting. Exciting enough to keep me interested (well, there was that time when I discovered the opposite sex, but that is something for another time…and blog) in pursuing programming as a career.

I look back with much fondness and some sadness as well.  Those were the days when I bonded with my Dad.  Learned quite a bit and was genuinely excited.  Names like Les Soloman, Don Lancaster and Dave Ahl were the ‘rock stars’ of my world.  They were among the founders of the home computer revolution that you never hear about. Sure, I saw Microsoft rise, witnessed Apple’s few innovations (Apple ][, Apple //c) and saw IBM create an entire industry (the Wintel computer) but, more importantly, that time with my Dad and a small number of class mates in high school. Neil, Patrick…you guys rock.  Sadly, though, those computers are history and my Dad…well he is too.

I miss those days.


Tiny Basic on the XGS PIC Gamestation-UPDATE

NOTE: please excuse the crudeness of the photos. I am photographing a cheap television screen with my iPhone. I promise better screen caps once I get the video grabber up on the PC I use.

IMG_2370It’s almost ready…XGS ARDBasic 1.0 is about ready to be unleashed on the public. Or, at least, anyone who owns an XGS PIC Gamestation product and would like to program on the device.

Since my last post, I’ve had a whale of a time tracking down a couple of showstopper bugs. Fortunately, I have fixed them and, while there is still a bug or two, I can run the interpreter, reliably, on the device itself.

I have also extended the tiny language to include:

  • primitive, TRS-80 like, graphics
  • sound
  • ability to utilize the SPI port
  • SD card files (Load, Save, Delete and directory listing)
  • Gamepad
  • ability to change foreground and background color for whole screen


IMG_2376So far, however, the graphics are very blocky, 20 across, by 22 down. I guess it is more like the old Vic-20 than the TRS-80.  I have a set of 13 special characters that can be set with the ‘GPRINT’ statement that mimic the character graphics of the TRS-80 Color Computer. I also plan to extend them to include things like a generic figure, plane, car, etc. I cannot go too crazy as it eats up memory.  The new screen oriented statements are:

  • SET x,y – sets a block
  • RESET x,y – turns a block ‘off’
  • LOCATE x,y – puts the next ‘print’ statement location at x and y where y is the ROW and x is COLUMN
  • GPRINT x,y,c – puts one of the 13 special characters at location x,y
  • COLOR f,b – changes the screen foreground color to f and the background to b


The XGS PIC has two gamepad ports. Both are readable via the PAD function. Each button on the gamepad returns a multiple of two, so it is easy to determine which button was pressed. For example, the SELECT button returns 32 for the value, so checking for PAD=32 will let you know if the SELECT was pressed. See the Etch-A-Sketch sample code at the end of this post.


IMG_2378Full documentation will be forthcoming, I am still deciding of a few things but should have some kind of document ready in the coming weeks.  I have added support for the XGS’ SPI port and may add support for other ports as well (like the UART.) I have also changed the RND function, so I need to re-write that part of my document as well. So, holding off on the documentation until I nail down the rest of the design seems prudent.

One thing I plan to do, again, at a later date, is to post technical details about the design and some of the issues I’ve encountered (and how they were resolved) with the XGS and the interpreter. It’s been a ton of fun and loads of learning, or, rather, re-acquainting myself with C. 

In the meantime, I present a sample demo that I threw together. It is a very, very crude Etch-A-Sketch:

100 CLS                         clear the screen
110 PRINT "GAMEPAD DEMO"        show the folks what this is
111 LOCATE 0,22                 move print position to last line
112 PRINT "RED:SET YELLOW:RSET" show what the red and yellow buttons do
120 X=1:Y=1:S=1                 set our pointers to 1
130 P=PAD(0)                    read the gamepad
131 P=PAD(0)                    do this twice to ensure you get a value
135 IF P=0 GOTO 130             if nothing is pressed, loop back
140 IF P=8 Y=Y-1                DOWN was pressed
150 IF P=4 Y=Y+1                UP
160 IF P=1 X=X+1                RIGHT
170 IF P=2 X=X-1                LEFT
180 IF X<1 X=1                  check to see if we are
185 IF X>19 X=19                out of bounds
186 IF Y<1 Y=1
187 IF Y<20 Y=20
200 IF P=64 S=1                 RED means draw
210 IF P=128 S=-1               YELLOW means don’t draw
220 IF S>0 SET X,Y              draw on RED
230 IF S<0 RESET X,Y            don’t draw on YELLOW
240 IF P=32 RUN                 SELECT means start over
250 IF P=16 STOP                START means stop
260 LOCATE 13,0                 put up the cursor location
270 PRINT X,",",Y," "
280 P=0                         reset the gamepad pointer
290 GOTO 130                    do it again

PLEASE NOTE: the comments in the listing above are for the purposes, in this blog, of explaining the code, they are not part of the code.