MUSIC Demo

Developer(s): Eric Boisvert
Date: 1988
Type: Program
Platform(s): TS 2068
Tags: Music

This program will play 5 tunes. Just press A–E to select the music: O Canada, Solfeggietto, Aura Lee, Hopscotch and Zig-Zag. The music is played by MUSIprint, and the program is meant to be broken into and studied: the tunes are plain LPRINT strings in lines 1000–5999. A scrolling credit line runs along the bottom of the screen while it waits for a key.

MUSIC Demo version 1.1 is credited on screen to Eric Boisvert and Kris Boisvert, ©1987 Byte Power. It was published, not copy-protected, on the February 1988 tape (Issue 9) of Byte Power as the demo for MUSIprint.

Program Analysis

Program Structure

  • Lines 10–100: title, switching on the music code with LET L=USR 64828, the menu from DATA, and the key loop
  • Lines 1000–5030: one tune per thousand, each a run of LPRINT or PRINT #3 lines followed by GO TO 40
  • Line 9998: loader, CLEAR 40000 and LOAD "MUSIC code" CODE, then RUN
  • Line 9999: save routine for the program and the code

Menu and Display

The menu sets caps lock with POKE 23658,8 so that INKEY$ returns capitals. Line 50 prints a 32-character window of the credit string in the lower screen and rotates it with B$=B$(2 TO )+B$(1); line 70 marks the chosen line with OVER 1 and jumps with GO TO 1000*(CODE K$-64). The title on line 30 is built from user-defined graphics  to .

The Code Block

MUSIC code is 684 bytes at 64828, against 540 bytes for the MUSIprint code. Its first 540 bytes match MUSIprint’s code except for six bytes; the other 144 bytes land at 65368, the UDG area, and hold the 18 graphics used for the title, so one LOAD brings in both.

Notable Techniques

  • The tunes mix LPRINT and PRINT #3, showing that both reach MUSIprint
  • Hopscotch stores its tune in M$ and plays it twice with LPRINT M$'M$
  • Solfeggietto begins "TEMPO:10 OCTAVE:2 …" where the other tunes use T and O, which suggests the code reads only the first letter of a command
  • Code and UDGs saved as one block running up to the UDG area

Potential Issues

  • Line 60 accepts keys A to F, but there are only five tunes. Pressing F jumps to line 6000, which does not exist, so the program runs on to STOP at line 9997 and ends.

Appears On

Tape-based magazine. The February 1988 issue (Issue 9) of Byte Power, the TS2068 tape magazine of Eric and Kristian Boisvert.

Related Products

Related Articles

This program will play 5 musics. Just press A-E to select the music.
This music utility will allow you to play music using the LPRINT (PRINT #3) command.

Related Content

Image Gallery

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.