Classic Computer Magazine Archive COMPUTE! ISSUE 25 / JUNE 1982 / PAGE 88

Bits And Pieces

Elizabeth Deal
Malvern, PA

Ms. Deal has been working with Commodore machines for several years. Many of the tidbits below represent questions people have asked her. You're bound to learn something you didn't know.

Existing program files can be loaded into a partition using "Toolkit" 's APPEND command (tape only). Existing programs in ASCII format can be so loaded via the XEC command of "Power" (tape and disk).

Saving programs from a partition has to be done by the Monitor's .S command in case of the Toolkit. In Power, saving a program as an ASCII file (relocateable, by definition) does the job automatically.

For many applications a method described in COMPUTE!, November, 1981, #18, "Inverse Partitioning" should simplify the task.

While Wedge is loading itself it uses some screen area for working storage (evidenced by a quick flash on the screen). This can be deadly if you plan to put Wedge below some existing code, as the code will turn to mush. There are several ways around it: use the old DOS-Support program which doesn't jump its boundaries, or load the Wedge first to a lower location, followed by the desired program, or load the Wedge next to the screen and move it.

A cross-reference program is a good thing to use, for instance Cursor (tape-magazine) published Jim Butterfield's fast, machine code Cross-ref routine for disk users (only, I think). It lists variables (in alphabetical order) and lines (in numeric order) indicating places where those variables or numbers are used.

Here is a halfway approach I sometimes use. It's good for tape people. And it can, of course, be used with Cross-reference for a complete picture.

Devoting some space at the end of a program to housekeeping, I can list all subroutine entry points and all GOTO references, like this:

2000  <S> : ON S GOSUB 450, 500, 510, 320, 620, 800
2001  <G> : ON G GOTO 60, 100, 150, 250, 455

The syntax in <S> and <G> guarantees against those lines ever executing, even if I were to lose control of the program, since a SYNTAX ERROR would result. ON X GO X, however, is seen by me, Cross-reference, Toolkit and Power as a perfectly valid list of addresses. They get renumbered correctly and, if I keep them clean and up to date, I stand a better chance of knowing how the program is built. It's primitive, but it works.