Classic Computer Magazine Archive COMPUTE! ISSUE 10 / MARCH 1981 / PAGE 92


Key print Revisited

Eric Brandon Islington, Ontario Canada

When I first saw KEYPRINT by Charles Brannon in the NOV/DEC 1980 issue of COMPUTE! I thought my printer problems were over. Not so! As I read on, I discovered that KEYPRINT was only for the new upgrade ROMs, and I had the old original ROMs. Furthermore, I knew no machine or assembly language. I could:

  1. Get new ROMs (and give up half my program library).
  2. Learn assembly language and modify KEYPRINT for the old PETs.
  3. Give up.

I chose solution b. I purchased books, assemblers, disassembler, and all the paraphenalia associated with assembly language programming. Here is the result of my efforts: KEYPRINT for old ROM PETs.

.;  C6ED  00  38 00 32 FE
.   M 033A   03CF
           0   1  2  3  4  5  6  7
.:  033A  78  A9 03 8D 1A 02 A9 47
.:  0342  8D  19 02 58 60 AD 03 02
.:  034A  C9  45 D0 03 20 54 03 4C
.:  0352  85  E6 A9 80 85 20 A9 00
.:  035A  85  1F A9 04 8D 64 02 85
.:  0362  F1  20 BA F0 20 32 F1 A9
.:  036A  19  85 22 A9 0D 85 21 20
.:  0372  D2  FF A9 11 AE 4C E8 E0
.:  037A  0C  D0 02 A9 91 20 D2 FF
.:  0382  A0  00 B1 1F 29 7F AA B1
.:  038A  1F  45 21 10 0B B1 1F 85
.:  0392  21  29 80 49 92 20 D2 FF
.:  039A  8A  C9 20 B0 04 09 40 D0
.:  03A2  0E  C9 40 90 0A C9 60 B0
.:  03AA  04  09 80 D0 02 49 C0 20
.:  03B2  D2  FF C8 C0 28 90 CB A5
.:  03BA  1F  69 27 85 1F 90 02 E6
.:  03C2  20  C6 22 D0 A6 A9 0D 20
.:  03CA  D2  FF 4C CC FF 67 54 00

First, type in the hexadecimal (base 16) code with your monitor. If you don't know how to do this, consult your (or anyone else's PET manual.

Once you have entered it, type:

M 033A 03CF

and compare what you see with what is on this page. If they don't correspond exactly, either fill in what doesn't match (remember to hit RETURN at the end of each line), or start over.

When KEYPRINT is in memory correctly, type:

S 01, KEYPRINT, 033A, 03CF

to save it on tape.

An 'X' command will get you out of the monitor. Type:

SYS 826

to initialize KEYPRINT. The cursor should reappear almost instantly. If it doesn't, you have made a mistake in the first 12 bytes (numbers). LOAD it, and check again.

Hopefully, your cursor came back. If it did, hit the ‘\’ key and your screen should be dumped on the printer. If it doesn't, you have made one of the following mistakes:

  1. Typing error.

    SOLUTION: Start again.

  2. Your printer has a secondary address other than 4. SOLUTION: POKE 861, SA
  3. You forgot to initialize.

    SOLUTION: SYS 826 and hit the key again.

  4. You hit the wront key.

    SOLUTION: Hit the key to the right of the ampersand.

  5. You tried this program on something other than an old ROM PET.

    SOLUTION: Move on to the next article.

You can also make KEYPRINT work without hitting a key (it doesn't even have to be initialized) with an SYS 852.

When KEYPRINT is active (hitting ‘ ’ will make it work), the PET will neither LOAD nor SAVE properly. There are two ways of deactivating KEYPRINT:

  1. POKE 537, 133 : POKE 538, 230
  2. Typing LOAD or ←SHIFT→ RUN/STOP, pushing PLAY, FAST FORWARD, or REWIND on the cassette and BREAKing it with the stop key. If the cassette motor doesn't run before you BREAK the LOAD, KEYPRINT will not be deactivated.

KEYPRINT can always be revived with an SYS 826.

Finally, memory location 843 contains the number representing the key that must be hit to dump the screen. To change the key, Type:

FOR T = 1 TO 1E6 : PRINT PEEK(515) : NEXT T

You will see a column of 255s going up the screen. Hit the key you wish to assign as THE key. The 255s will change into another number, Remember that number. BREAK the loop with the STOP key, and POKE 843, n where n is the number you saw when you hit the key.

I hope you find the program useful. I would like to thank Jim Butterfield for sharing some memory locations with me.