Classic Computer Magazine Archive COMPUTE! ISSUE 90 / NOVEMBER 1987 / PAGE 95

Twin Pack For The Commodore 64

Steve Feinstein

This handy pair of utilities gives BASIC programmers the ability to delete multiple program lines and, with a single-character command, to list selected lines.


"Twin Pack" adds two useful programming utilities to your 64: Erase, and a LIST command with a memory. The Erase command deletes several program lines at once. Twin Pack's List command lists program lines and remembers these lines for later use.

Both commands are called by entering a period (.) followed by the appropriate single character: Erase and List are called by typing .E and .L, respectively.

Using The Program

Because Twin Pack is written in machine language, it must be typed in with "MLX," the machine language entry program found elsewhere in this issue. When you run MLX, you'll be asked for a starting address and an ending address for the data you'll be entering. For Twin Pack, respond with the following values:

Starting address: C000
Ending address: C127

After you've entered all the data, be sure to save a copy before leaving MLX.

To use Twin Pack, load it with a statement of the form

LOAD "TWINPACK", 8, 1

(Tape users should replace the, 8, 1 with, 1, 1.) After the loading is completed, activate the program with the command SYS 49152. When the READY prompt returns, Twin Pack is ready for use.

The Erase command is called by entering

.E starting line-ending line

where starting line is the number of the first line to be erased and ending line is the number of the last line. So, the command

.E10-100

erases lines 10 through 100, inclusively. Lines deleted with the Erase command cannot be recovered. If you accidently erase any important program lines, you will have to retype them.

Twin Pack's List command is called by entering

.L starting line-ending line

where, again, starting line and ending line specify the range of line numbers to list. To list a single line, you must supply the same number for both starting line and ending line.

What makes this command different than BASIC's list command is that Twin Pack remembers which lines were last listed. So, to see the program lines that were previously listed, all you have to do is enter a period (.) and press RETURN. This single-character List command can come in handy when you are working on a particular section of your program.

Twin Pack

Please refer to the "MLX" article in this issue before entering the following program.

C000 : A9 4C 85 7C A9 0D 85 7D EB
C008 : A9 C0 85 7E 60 C9 2E D0 7E
C010 : 08 48 A5 7A C9 00 F0 09 3D
C018 : 68 C9 3A 90 01 60 4C 80 33
C020 : 00 68 20 73 00 D0 03 4C 8C
C028 : AB C0 C9 4C D0 03 4C AB 84
C030 : C0 C9 45 D0 E6 20 73 00 D8
C038 : 20 6B A9 20 13 A6 A5 5F B9
C040 : 85 FB A5 60 85 FC 20 73 12
C048 : 00 20 6B A9 20 13 A6 A0 15
C050 : 00 38 B1 5F 85 FD E5 FB F7
C058 : 8D A7 02 C8 Bl 5F 85 FE 6C
C060 : E5 FC 8D A8 02 A2 00 A0 8B
C068 : 00 84 02 Bl FD F0 04 86 A8
C070 : 02 D0 09 E6 02 A5 02 C9 2B
C078 : 03 F0 0C 8A 91 FB C8 D0 C0
C080 : EA E6 FC E6 FE D0 E4 A9 ED
C088 : 00 91 FB 38 A5 2D ED A7 D6
C090 : 02 85 2D 85 2F 85 31 A5 0A
C098 : 2E ED A8 02 85 2E 85 30 02
C0A0 : 85 32 20 D7 AA 20 33 A5 D4
C0A8 : 4C 74 A4 C9 4C F0 10 AD 92
C0B0 : 1F C1 D0 08 AD 20 C1 D0 0F
COB8 : 03 4C A2 C0 4C DF C0 20 B2
C0C0 : 73 00 20 6B A9 A5 14 8D 50
C0C8 : 1F C1 A5 15 8D 20 Cl 20 E0
C0D0 : 73 00 20 6B A9 A5 14 8D 60
C0D8 : 21 C1 A5 15 8D 22 Cl AD 87
C0E0 : 00 03 8D 23 C1 AD 01 03 D0
COE8 : 8D 24 C1 A9 0F 8D 00 03 BE
C0F0 : A9 Cl 8D 01 03 AD lF Cl 48
C0F8 : 85 14 AD 20 C1 85 15 20 68
C100 : 13 A6 AD 21 C1 85 14 AD 78
C108 : 22 C1 85 15 20 BD A6 AD 02
C110 : 23 C1 8D 00 03 AD 24 Cl 20
C118 : 8D 01 03 6C 00 03 00 00 D5
C120 : 00 00 00 00 00 00 00 00 A3