Commodore

CURSOR #4 – October 1978

“Texas Instruments will probably be ready about next summer. Please don't be surprised if they bring out a machine that has built-in reliable mass storage using "bubble memory". Also, expect to see both the BASIC and Pascal languages on the TI machine. Or look for an IBM personal computer (not to be confused with their 5110, which is small, but expensive. IBM might emphasize the APL language. It is not clear that anyone at IBM even knows how to spell Pascal, much less market it.”
—Excerpted from Serious Uses of Small Machines, Revisted, Issue #4

Screenshot of a wandering line turning at right angles.
Enlarged Image

COVER

Author: Glen Fisher
Original file name: COVER!
PRG file: cover04.prg

The ! on the filename indicates that this cover program has sound. Not just any old sound, either—this cover plays music. The CB2 output is capable of producing a single square wave over a range of frequencies, and the 8-bit pitch register produces notes that are surprisingly well in tune with the equal-tempered chromatic scale. The tuning gets a little wonky around F/F-sharp in the second octave, but overall, the pitch is much more accurate than, say, the tones generated on a VIC-20 or Atari 2600. (I've done some calculating: the standard tuning note at 440 Hz is bang on the money, and the worst pitches are only off by about 11 cents. I might have made some different tuning choices than the author but compromises will always have to be made when the pitch resolution is so low.)

This cover program is actually credited this month. Unsurprisingly, the author is Glen Fisher. Fisher identifies the three tunes as Wiltshire Reel, the fiddle tune Devil Dream, and a Sicilian Tarantella. Not the most precise labels but close enough. Good on Fisher for choosing three contrasting (and somewhat obscure) tunes to show off the CB2.

Pressing SPACE takes you to the table of contents for the issue.

Graphic of two hands: the left has ring, middle, and index fingers curled down; the right has middle finger, index finger, and thumb curled.
Enlarged Image

BOP

Author: Glen Fisher
Original file name: BOP
PRG file: bop.prg

BOP is a drill program to help learn Chisanbop, a Korean finger-counting system that allows you to encode numbers up to 99 on your fingers. There was a real media hype cycle around Chisanbop in the late 1970s—I can remember segments on news magazine shows where the presenters eagerly informed us that the system would revolutionize mathematics instruction. The hype died down around 1982 or so and we don't hear much about Chisanbop in North America today.

The program has several modes of operation, the most useful of which is a mode where the computer selects a random number, and the student has to arrange the fingers on two PETSCII hands to produce the corresponding Chisanbop representation. The controls feel a bit odd on a modern keyboard (although they make more sense on the PET keyboard): move left and right with less-than (<) and greater-than (>) and change the state of the fingers with RVS.

On the PET 2001-N and 2001-B, the RVS key was located above the shift lock key. On VICE 3.8 running on my Mac, the tab key maps to RVS in both positional and symbolic mapping modes.

An arbitrary decimal number pictured with its equivalent in hexadecimal.
Enlarged Image

CALC

Author: Glen Fisher
Original file name: CALC
PRG file: calc.prg

The flyer tells us that CALC is "everything you ever wanted in an $800 calculator." The joke, of course, is that the PET's introductory price was $795 USD in 1977 (equivalent to just shy of $4,000 in 2024). Joke's on you, you gormless rube, using your very expensive machine as a calculator.

The calculator has some interesting features like octal/decimal/hexadecimal conversion and the ability to treat the results of a calculation as a memory pointer and PEEK at bytes and words at the target memory location. While there are some interesting ideas here, the UX is clumsy, the feedback on screen is minimal, and the documentation is confusing. Maybe save your $800 and get one of these instead.

Screenshot of digital clock, displaying 11:59 in large, PETSCII numerals.
Enlarged Image

CLOCK!

Author: John Fox
Original file name: CLOCK!
PRG file: clock.prg

CLOCK! is "an $800 digital alarm clock". (Getting pretty good mileage for such an old joke...) The clock uses BASIC's internal timekeeping variable TI$ to keep track of the time, which is displayed in large, well-drawn PETSCII numerals. The sound (!) features consist of Reveille played at an alarm time set by the user, and Westminster Chimes played on every quarter hour (although the chimes do not follow the change patterns of the Westminster Quarters).

BASIC listing of a custom INPUT subroutine.
Enlarged Image

INP

Author: Glen Fisher
Original file name: INP
PRG file: inp.prg

The INPUT command in Commodore's version of Microsoft BASIC has several shortcomings. Users can't input commas and colons, because those characters are treated as delimiters; if the PET is not expecting multiple inputs, it'll complain with ?EXTRA IGNORED. The user has full access to the screen editor while the computer is waiting for input, so they can move the cursor around, delete parts of the display, and even clear the screen. Even worse, if the user accidentally hits return without entering any characters, the BASIC program will simply exit without any error message, leaving the user wondering what happened.

INP is a custom input routine that captures characters with BASIC's GET. The routine traps cursor control characters and allows all printable characters as input (including commas and colons). This routine is intended to be included in other BASIC programs; running it on its own leads to a ?RETURN WITHOUT GOSUB ERROR IN  60110.

Screenshot of instructions for the CED editor program.
Enlarged Image

CED

Author: Glen Fisher
Original file name: CED
PRG file: ced.prg

CED is a simple text editor that can store up to three screenfuls of text. (Disappointingly, there were no cheap jokes about "$800 typewriters" in the flyer.) The PET can use one of two character sets: the "business" set, with upper and lowercase letters; and the "graphics" set, which replaces the lowercase letters with PETSCII graphics characters. By default, the editor runs in business mode, but you can switch to graphics mode if you want to use the editor to create PETSCII screens. Assigning the π key to open the command menu is an unconventional choice by the programmer, but does make sense with the PET keyboard layout. The PET lacks the function keys found on later Commodore machines, so Fisher chooses a key that is unlikely to find much use in a text editor.

CED comes with a warning that it will only work on "old ROMs". Anyone familiar with the PET and CBM machines knows that they are part of a complicated family tree. Compatibility among the various models is always an issue. In this case, you can run the program on the 8K PET with the original ROM, but not later models with an upgraded ROM. There were several breaking changes in the new ROM. If you run CED on a 4016, you can see inverted case text owing to changes in the character ROM and some time after the initial program setup, a BRK instruction drops you into the built-in monitor.

Because CED will expect to use the datasette for its I/O, and there are newer, better text editors for the PET, I think we aren't losing much if we relegate this program to the historical archives.

« PREV   CURSOR #4 (October 1978)   NEXT »