By the end of 1987, most of the cool programs in the Rainbow were for the Color Computer 3. The CoCo 3 was a giant leap forward, both in its innate capabilities—better graphics, better text manipulation on graphics displays, better text output if you had a good monitor—and in the software available for it. OS-9 Level 2 was a phenomenal operating system. All for only $129.95!1
But there was still life left in the old system, too, as John Mosley showed us in “Do You Hear What I Hear?” in the December 1987 issue of The Rainbow. What we heard was some of the best music to come out of the Color Computer 1 and 2. “Your ears do not deceive—it’s CoCo singing in four voices!”
That music didn’t come without some work on the part of the reader. If you didn’t subscribe to the tape or disk version of the magazine, you had to first type in a program that asked you for a starting memory address to POKE the code into, and then the program asked you, one `INPUT` at a time, for the hexadecimal values of the code:
Enter Listing 3 one hexadecimal value at a time… When you are through entering Listing 3, or when you have to stop entering, type S and press ENTER… If you are just stopping temporarily and plan to resume entering later, write down the number to the left of the ‘S’ you typed before you press ENTER… When you are ready to resume entering, use that number as your start address. You will have to load the old file you saved before you can resume entering Listing 3.
He doesn’t mention what to do if the music doesn’t play—if you made a mistake entering those four thousand hexadecimal values. I probably would have provided another short program to PEEK the values in memory, displaying them twelve to a line for verification against the printed text. But perhaps it was assumed that people would know how to do this. I’ll show how I entered those hex values in a week or two.
Long-time readers of this blog will not be surprised to learn that I did not type them in to an `INPUT` prompt one at a time.
Like Eugene Vasconi’s Holiday Hearth, Mosley’s program uses multiple files. In his case, however, one file is the combined machine language program/musical notes and the other is a simple 42-line BASIC program to wish us Merry Christmas while the music plays. The relevant code for that loop is:
- 350 EXEC&H3F00
- 360 FORT=1TO3000:NEXTT:GOTO350
These two lines come after the code for drawing the Christmas greeting, and before the very few subroutines that the program uses. Line 350 executes the machine language code at memory location (in hexadecimal) 3F00. That’s 16,128 in decimal, which means that this program require 32 kilobytes. It looks to me like the BASIC program and the machine language program/data ought to be able to fit into 16k, but the addition of a single screen of PMODE 4 graphics adds 6 kilobytes to the memory needed. Add in the 4 kilobytes of machine language code and data, and that’s going to start cutting it close.
Line 360 pauses for approximately six and a half seconds before going back to line 350 to play the music again. This one line of code was very common back then, and is the strangest thing to see today. It puts the computer into a loop of wasted CPU time in order to do nothing! This was possible then because the computer wasn’t doing anything else. Nowadays, two things would happen if a programmer tried to use loops to create pauses. First, it wouldn’t work, because the duration of a loop would not be predictable. The computer is doing other things, and those other things will put varying demands on the computer, making the loop have varying durations. And second, depending on the code used for the loop, every other app on the computer would slow down, possibly even appearing to lock up.
But when this program was running, it was the only program running. So its loops had predictable durations, and there was nothing else to complain about wasting processing power.
By 1987, even on the Color Computer, there were alternatives to this. The OS-9 operating system that could be purchased for the Color Computer had, even as far back as 1980, a sleep command that, like the sleep command on modern Unix-like OSes, put the current process to sleep for a specified number of seconds. But of course OS-9 was a multi-process and even multi-user operating system, so CPU time mattered outside of the current process. On Extended Color BASIC, it, for all practical purposes, didn’t.2
This was the official means of pausing for x seconds; it’s on page 35 of the Getting Started with Extended Color BASIC manual.
Along with using PMODE 4 graphics, it also uses the NTSC artifacts trick to display more colors; this means having to verify that the computer hit the correct “rising or falling edge of the clock” when it was turned on, and resetting it if it did not. You can see this in the video; the program displays an ostensibly blue block, and then asks the user to verify the block’s color. If the block is not blue, the user is asked to reset their computer to get it blue. I had to reset my computer seven times to get that block to display blue when testing this program.
You might notice that the question and the block are not on the screen at the same time. One of the greatest features of the new Color Computer 3 was the ability to display text on its graphics screens. The Color Computer 1 and 2 could not do so—text and graphics were completely different modes. That’s the reason that programs such as Joseph Kohn’s greeting card used graphics commands to draw letters.
Have yourself a merry little Christmas!
In response to 8 (bit) Days of Christmas: Eight holiday images created on the TRS-80 Color Computer, from the early to mid eighties.
The CoCo 3 with OS-9 was the computer I used from about 1987 to sometime in the mid-nineties; I don’t remember exactly why I stopped using it, but it probably had to do with not working well on the Internet and when interacting with the computers I used at work. But I continued to miss its functionality and the speed of doing multiple things at once until the Unix-like OS/9 came out on the Macintosh.
↑If the computer had a print spooler, or it was running a disk OS, then it might be possible that there would be one process other than the BASIC program to complain. But disk operations would be unlikely to be running during a BASIC loop.
↑
- 8 (bit) Days of Christmas: Day 100 (Hearth)
- Lower resolution graphics were more appropriate for animation, because you could page through up to eight screens like a flip book. This is Eugene Vasconi’s Holiday Hearth from December 1986.
- 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.
- 8 (bit) Days of Christmas: Day 111 (Dual Greeting Card)
- Day 111 of the 8 (bit) days of Christmas is Joseph Kohn’s dual greeting card, from December 1984. How do you create text on a graphics screen that doesn’t accept the PRINT statement?
- Create Color Computer binaries from hex values
- Take a text file filled with hexadecimal numbers and create a TRS-80 Color Computer BIN file.
- Merry CoCo Christmas at Mimsy@YouTube
- “From the December 1987 Rainbow, John Mosley’s ‘Do You Hear What I Hear’ features ‘four voice music’.”
More Christmas music
- Light a candle for Christmas hymns
- While the holidays brought more examples of bowdlerized lyrics they also brought, at least to our church, a lit candle for the darkness, in the form of a new hymnal that retains sound Catholic theology.
- The Soul Felt It’s Worth
- “A thrill of hope, the weary world rejoices…” What is a soul worth? For God, a soul is worth his son.
- Have yourself a musical command line…
- …Make your scripting gay. From now on your errors will be miles away!
- O Little Town of Bethlehem
- How still we see thee lie. Play this song on your Mac’s command line with the piano script.
- Tidings of Comfort and Joy
- One of my favorite Christmas songs. Save us all from Satan’s power, and tidings of comfort and joy.
- Two more pages with the topic Christmas music, and other related pages
More Color Computer
- Simple game menu for the Color Computer 2 with CoCoSDC
- This simple menu provides one screen for cartridges saved in the CoCoSDC’s flash ROM, and any number of screens for your favorite games for your friends to play.
- Rainbow Magazine preflight tool enhanced
- I’ve added several features to the Rainbow Magazine preflight tool, including a check for references to line numbers that don’t exist.
- CoCoFest! 2021
- Forty years later, I finally make it to CoCoFest!
- BASIC tokenization examined
- Why do old BASIC programs have strange characters in their .BAS files? Why do they look like they’re compiled code?
- What are the 8 bits in 8-bit computing?
- Retro computing is often called 8-bit computing. This is because the bytes that these computers use are composed of eight bits, and much of what the computer does is operating on these individual bits, not on the byte as a whole.
- 19 more pages with the topic Color Computer, and other related pages
More The Rainbow magazine
- Rainbow Magazine preflight tool enhanced
- I’ve added several features to the Rainbow Magazine preflight tool, including a check for references to line numbers that don’t exist.
- 8 (bit) Days of Christmas: Day 10 (Up on the Rooftop)
- In the December 1986 Rainbow, J. D. German presented us with this game, involving flying and landing Santa to deliver presents!
- 8 (bit) Days of Christmas: Day 11 (O Christmas Tree)
- Day 11 of the 8 (bit) days of Christmas is the graphic accompaniment to “O Tannenbaum” from Robert T. Rogers “Holly Jolly Holidays”, from December 1984.
- 8 (bit) Days of Christmas: Day 100 (Hearth)
- Lower resolution graphics were more appropriate for animation, because you could page through up to eight screens like a flip book. This is Eugene Vasconi’s Holiday Hearth from December 1986.
- 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.
- Five more pages with the topic The Rainbow magazine, and other related pages