You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
May. May, 1982, Issue 24 2.::1 COMPUTE! COMPUTEI 133<br />
contents of the A, X, Y, Sand P registers, and most<br />
importantly, perform pelf arm the instruction, so that<br />
branches are followed properl y and new code is<br />
branches are followed properly and new code is<br />
created.<br />
.<br />
A certain amount of discretion is involved with<br />
A certain amount of discretion is involved with<br />
these. Trace scrolls the information up the CRT<br />
about twice as fast t as a BASIC LIST. To see what<br />
it's doing in detail really y requires a printer, and<br />
even then it's very easy to go through a ream of<br />
paper needlessly if trace encounters loops of any<br />
length. I'd be inclined to say the best use of trace<br />
would be in debugging your own programs on<br />
CRT only, to the extent of insuring that there are<br />
no infinite nite loops, and that the final al RTS is correct.<br />
Step has much more potential, the pace is user<br />
Step has much more potential, the pace is usercontrolled.<br />
If trapped in a long loop, one can simply<br />
step out by keying a step to the alternate branch.<br />
step out by keying a step to the alternate branch.<br />
Better yet, rather than stepping out explicitly,<br />
monitor in the information that will cause the<br />
desired branch and then step the location again.<br />
ThisT will ensure that subsequent step-traces will be<br />
getting correct code.<br />
A cautionary note: since trace and step do<br />
perform rm the instructions, the same caution has to<br />
be observed as with any POKE or user-written<br />
machine code routine. Switches will be set or reset,<br />
no permanent damage can be done, but the system<br />
can be crashed or DOS can n be disabled.<br />
10 REM MAKE SOFTMON SoFTMoN<br />
20 D$ 0$ ■= CHR$ (13) ( + CHR* CHR$ (4)<br />
)<br />
30 DEF FN LB(D> LB (0) D0 - 256 * INT (D (0 / 256)<br />
)<br />
40 DEF FN HB(D) HB (0 ) INT (D (0 / 256)<br />
)<br />
50 DEF FN DC (I) = PEEK (I) (Il + 256 * PEEK (I( I + 1)<br />
60 REM PAGE ADDRESSES IN *4B00-4FFF $4800-4FFF BY HEX X DIBIT DIGIT<br />
70 S8 = 18432:S9 = 18688:SA = 18944:SB = 19200:SC =<br />
19968:SF : SF = 20224:SG = 20480<br />
70 S8 = 18432:S9 = 18688:SA ■ 18944:SB ■ 19200:SC = 19456:SD = 19712:SE =<br />
80 REM A1,A2,A4 Al,A2 , A4 HIGH 8c & LOW BYTES<br />
90 LI Ll = 60:HI 60:Hl = 6i:L2 61 :L2 = 62:H2 = 63:L4 = 66:H4 : H4 = 67<br />
100 MS = 63488:ME : = 65535<br />
110 PRINT "COPYING MONITOR INTO $4800-$4FFF"<br />
110 PRINT "COPYING MONITOR INTO *4800-*4FFF"<br />
120 POKE LI, Ll, FN LB(MS): ) : POKE HI, Hl, FN HB(MS): ) : POKE UL2, FN LB(ME): ) : POKE H2,<br />
FN HB(ME): ) : POKE L4, FN LB(S8): LB (S8 ) : POKE H4, FN HB(S8) HB (S8 )<br />
130 CALL 65068<br />
140 PRINT "CHANGING ADDRESSES FOR JSR'S 'S AND JMP'S" 'S"<br />
150 PRINT "CHANGED ADDRESSES ARE LISTED"<br />
150 PRINT "CHANGED ADDRESSES ARE LISTED"<br />
160 FOR I = S8 TO SG - 1: 1:P P = PEEK (Il: (I): IF P < > 32 AND P < > 76 THEN<br />
190<br />
170 P = PEEK (I (1+2): + : IF P < 248 THEN 190<br />
180 POKE I + 2, P - 176: PRINT I<br />
180 POKE I + 2,P - 176: PRINT I<br />
190 NEXTNE XT<br />
230 PRINT "READING NEW DATA AND POKING"<br />
240 FOR I = SA + 64 TO SA + 214: READ P: POKE I I,P: , NEXT<br />
XT<br />
19456:SD = 19712:SE =<br />
200 PRINT "MAKING A FEW OTHER ADDRESS CHANGES"<br />
210 POKE SA + 235,74: POKE SE + 168,77: : POKE SF + 127,79: POKE SF + 191,<br />
78: POKE SF + 195,79: POKE SF + 207,237<br />
220 POKE SF + 210,236: 236: POKE SF + 233,195: POKE SF + 253,79: POKE SF + 25<br />
5, 5,74: 74: POKE SF + 106,163<br />
230 PR I NT "READ I NG NEill DATA AND PoK I NG"<br />
250 FOR I = SA + 253 TO SB + 29: READ P: POKE I , P: NEXT<br />
250 FOR I<br />
SA + 253 TO SB + 9: READ P: POKE I,P: NEXT<br />
260 FOR I = SE + 194 TO SE + 201: READ P: Pi POKE I I,P: NEXT<br />
270 PRINT "NEWMON IS NOW READY": : PRINT: : PRINT "TO ENTER IT, CALL 20329"<br />
: PRINT "OF:" "OR"<br />
280 !80 PRINT "ENTER MONITOR WITH CALL -151": PRINT "AND THEN KEY ''4F69S'"<br />
4F69G ' "<br />
290 !90 INPUT "SAVE SoFTMON SOFTMON ? ";Q$: IF Q$ > = "Y" THEN PRINT "SAVING SoFTM<br />
SOFTM<br />
ON,A$4800,L$800": 0N,A*4B00,L$800": PRINT D$"BSAVE SoFTMoN,A$4800,L$800"<br />
SOFTMON,A$4800,L*BOOl<br />
300 END<br />
310 DATA 255,255,255, 5,2! 32, >2,208,72,104,133,44,104,133,45,162,8,189,16<br />
208,72, 16