Classic Computer Magazine Archive COMPUTE! ISSUE 26 / JULY 1982 / PAGE 116

Super QuadraPET

David Sale
Acton, Ontario

QuadraPET (COMPUTE!, June 1981, #13) is a machine language program that lets you "partition" the memory of a 32K PET with Upgrade BASIC into four, 8K areas. A BASIC program can reside in each partition. Each program can be run independently. It's like having four computers in one.

Super QuadraPET converts QuadraPET to run on 4.0 machines (4032 and 8032) with 32K. Also included is a handy utility program that makes QuadraPET easy to use. It can even relocate itself into one of the partitions — ready to go, but out of the way.

To use QuadraPET 4.0, type in and save Program 1. It places the machine language program in upper memory. Program 1 must be RUN before you load and RUN Program 2.

Several articles have appeared in COMPUTE! dealing with memory partition for the PET computer. I could see the value of this procedure for program development, especially since "Dungeon" could be neatly tucked away in one of the partitions to keep my son happy when I took a break.

Unfortunately, the very useful program by Charles Brannon (COMPUTE!, June 1981, #13, p. 102) was written for Upgrade ROMs and will not operate on 4.0 machines. In revising his program, I made several changes:

  1. The program has been relocated to the top of memory to leave the cassette buffer available for machine language program development.
  2. Calls to BASIC routines are revised for use with 4.0 ROMs.
  3. Memory partitions have been changed to make areas more nearly equal in size rather than having the first partition (the most easily accessible) be the smallest.

To create the partitions, load Program 1 and type RUN. Four 8K partitions will be created. By choosing PET # 1, you can then load the utility program (Program 2) that will simplify many tasks involved in program development and in "Quadra-PETting." I use the utility program to relocate itself into partition four where it is available when needed to perform the following tasks:

  1. Converting decimal numbers to hex and vice versa.
  2. Moving programs to and from the first partition.

    This is necessary to avoid having to use machine language SAVEs or awkward loading procedures.

  3. Printing a directory to show which areas are available for use to avoid accidentally destroying a program.

Moving Around In The Partitions

In relocating programs, the program to be moved is duplicated in the desired partition with all pointers reset to enable it to operate correctly. It is not erased from the original area. This makes it possible to revise a program in one area and then compare the results with the original in another.

If you are working in the partition that contains the utility program you can move to another area easily using its routine #6. If you are in another area, you can move using SYS 32513. Once you have moved to a new area, the program contained in it will operate normally. To erase the program or enter a new one, simply type NEW.

One word of caution: the relocation routines will move only BASIC programs. Programs containing machine language must be left in partition one or relocated using "Supermon" (COMPUTE!, Dec. 1981, #19, p. 134). If you want to pack "Supermon" into the top of partition four follow this procedure:

  1. Load and run QuadraPET.
  2. Choose PET #1.
  3. POKE 53, 127 to temporarily remove the partition.
  4. Type NEW.
  5. Load and run "Supermon."
  6. POKE 53,35 to restore the partition.
  7. POKE 32627, 121 to protect "Supermon."

If you have saved "Supermon" at the top of memory rather than at 0600 you will need to follow a slightly different procedure:

  1. Load "Supermon."
  2. Relocate it to 7933 hex using its transfer function.
  3. Load QuadraPET and run it choosing PET#1.
  4. POKE 32627, 121 to protect "Supermon."

"Supermon" is now safely tucked away at the top of memory under the QuadraPET program ready for use with SYS 31027.

No doubt you will discover more uses for these programs once you begin to explore their possibilities.


Brannon, Charles, "QuadraPET: Multitasking On Your PET?," COMPUTE!, June 1981, #13, p. 102.

Butterfield, Jim, et al, "Supermon: A Primary Tool For Machine Language Programming," COMPUTE!, Dec. 1981, #19, p. 134.