42 Astoundingly Useful Scripts and Automations for the Macintosh

8 (bit) Days of Christmas: Day 101 (Rudolph)

An early form of musical ebook, without scenes illustrating the progress of the song—in this case, Rudolph the Red-Nosed Reindeer. Along with the secret world of POKE.

Jerry Stratton, December 19, 2020

In December 1985, George and Ellen Aftamonow’s “Rudolph the Red-Nosed Reindeer” article gave us an illustrated Christmas carol.

Your computer’s screen will present a series of graphics illustrations, which match the song’s lyrics, while playing the famous holiday tune. Rudolph the Red-Nosed Reindeer takes advantage of the POKE 178 command, which allows a brilliantly colored screen that otherwise would not be possible.

The infamous POKE 178 was related to artifact colors. Like Arron Branigan’s snowman, the Aftamonows’ story-telling graphics and music program uses artifact colors.

When the program first starts, you will see a large dot on your screen. This dot should be red. If not, press Reset and RUN until you get a red dot, or instead you’ll have “Rudolph the Blue-Nosed Reindeer.”

The POKE command allowed you to change values in your computer’s memory. This included the parts of your computer’s memory that controlled hardware and that were the operating system. Modern computers won’t generally let you do this, for the obvious reason that you can really screw things up, as well as the less obvious reason that in a world of networked computers it’s a gigantic security risk. If you’ve ever seen a program crash with a segmentation fault, that program was likely trying to do something with or to memory it shouldn’t have been.

What POKE 178, X did was change the value of memory at location 178. By default it was three. This value controlled the color that commands such as LINE or CIRCLE drew.

Most of the time, their program poked a low value in location 178, such as 1:

  • 670 DRAW"BM24,34"+SA$:POKE178,1:PAINT(32,38),,1:POKE178,3

This changed the solid color pattern to another solid color pattern, depending on the random startup of the video display generator; did the paint, and then went back to the default value.

But larger numbers produced multi-colored stripes.

  • 420 POKE178,155:PAINT(52,146),,1:PAINT(100,148),,1:POKE178,3

This was one way that more than two colors could be displayed on the TRS-80 Color Computer’s two-color graphics mode. If you have a Color Computer, or an emulator such as xroar, you can play around with them using this program:

  • 9 REM GET INITIAL X
  • 10 INPUT "VALUE FOR 178";X
  • 11 IF X > 255 THEN SOUND 55,1:GOTO 10
  • 19 REM PREPARE GRAPHICS SCREEN
  • 20 PMODE4,1
  • 21 PCLS
  • 22 SCREEN1,1
  • 49 REM DRAW GRAPHICS
  • 50 PCLS
  • 51 CIRCLE(60,60),56
  • 52 POKE 178,X
  • 53 LINE(128,96)-(230,190),PSET,BF
  • 54 PAINT(60,60),,1
  • 59 REM RESTORE VALUES
  • 60 POKE 178,3
  • 61 X=0
  • 99 REM GET NEW NUMBER
  • 100 A$=INKEY$
  • 101 IF A$="" THEN 100
  • 102 IF ASC(A$)=13 THEN 50
  • 103 IF ASC(A$) < ASC("0") OR ASC(A$) > ASC("9") THEN 10
  • 104 IF X*10+VAL(A$) > 255 THEN SOUND 55,1 ELSE X=X*10+VAL(A$)
  • 105 GOTO 100

I expanded this code from Kishore M. Santwani’s 500 Pokes Peeks ’n Execs for the TRS-80 Color Computer. There were many memory locations that did strange things, and knowing what to poke where was like knowing magical spells.1

The program does not reproduce the song’s lyrics. You and your family are expected to sing along with the computer program. The program has four images. The first three are the splash screen, the infamous reindeer games, Santa noticing Rudolph’s bright nose. This is the fourth image, from the end of the song when Rudolph (spoiler) saves Christmas and goes down in history by leading Santa’s team of reindeer on Christmas Eve.

Aftamonow’s Rudolph: From the Rainbow, December 1985, “Rudolph the Red-Nosed Reindeer”, Rudolph leading Santa’s sleigh by George and Ellen Aftamonow.; Christmas music; Christmas carols; Color Computer; CoCo, TRS-80 Color Computer; computer history

Rudolph’s red nose saves the day! As do artifact colors and POKEing into memory. This is PMODE 4 high resolution graphics for the Color Computer, with ostensibly two colors.

In response to 8 (bit) Days of Christmas: Eight holiday images created on the TRS-80 Color Computer, from the early to mid eighties.

  1. The PEEK function allowed you to see what was at a memory location, and the EXEC command allowed you to run the program located at a particular memory location. If you attempted to execute a memory location that was not in fact a program you were likely to freeze your computer and have to reset or restart.

  1. <- Day 110 Snowman
  2. Day 100 Hearth ->