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:
- The program has been relocated to the top of memory to leave the cassette buffer available for machine language program development.
- Calls to BASIC routines are revised for use with 4.0 ROMs.
- 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:
- Converting decimal numbers to hex and vice versa.
- Moving programs to and from the first partition.
This is necessary to avoid having to use machine language SAVEs or awkward loading procedures.
- 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:
- Load and run QuadraPET.
- Choose PET #1.
- POKE 53, 127 to temporarily remove the partition.
- Type NEW.
- Load and run "Supermon."
- POKE 53,35 to restore the partition.
- 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:
- Load "Supermon."
- Relocate it to 7933 hex using its transfer function.
- Load QuadraPET and run it choosing PET#1.
- 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.