01.03.2014 Views

Section 2 - Commodore Computers

Section 2 - Commodore Computers

Section 2 - Commodore Computers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

132 COMPUTEI COMPUTE! May. 1982, I:>sue Issue 24<br />

fl is not im.mediatel)1 obvious, but if you know macll.1:ne<br />

// is not immediately obvious, but if you know machine<br />

language {/.'lui and waul, want to change some aspeci aspect of your yow' ROM,<br />

yO1/. you could move II/ove the Ih e code down ;nto into RAM and adJusl<br />

adjust<br />

the} JSR's.fMP's, 's, } M elc. etc. 10 to refleci reflect the new 10ca.I;om. locations. Then,<br />

you can modify the previously IJrev;ously ROM-frozen frown program IJrogram ail all<br />

you want. Here, H the Apple 11 II Plus Plu.s Monitor Manila,· is augmenled<br />

augmented<br />

by adding Slep Step and Trace functions funcliom afler after moving il it<br />

into RAM.<br />

into RAM.<br />

Softmon:<br />

Restoring Trace<br />

Restoring Trace<br />

And Step To<br />

The Apple II<br />

Plus Monitor<br />

Plus Monitor<br />

R. Hiatt<br />

R. Hiatt<br />

Brock University<br />

St. Catharines, Canada<br />

Sf Catha rines, Canada<br />

A monitor trace is a useful tool for debugging<br />

machine code programs, in the same way that<br />

TRACE works for BASIC. In addition, it is invalu<br />

luable<br />

for deciphering commercial binary routines<br />

which tend to be convoluted and to rewrite parts of<br />

themselves so that a disassembled listing taken at<br />

one point of a run will differ from that taken at<br />

another poin t.<br />

another point.<br />

The old Apple II had monitor trace, and the<br />

Apple II Handbook gives a disassembled listing of<br />

. Steve Wozniak's monitor, resident at $F800-$FFFF,<br />

$F800-5FFFF,<br />

(as is the monitor of the current I I Plu s) . Compari­<br />

(as is the monitor of the current II Plus). Compari<br />

son of the new with old monitor shows relatively<br />

few differences, onlyy 200 or so bytes of code. In<br />

particular, the subroutine STEP ($FA43-FAD6,<br />

($FA43-FAD6?<br />

$FAFD-FBID) SFAFD-FBID) has been changed so that keyboard<br />

entry of'AdrT' or 'AdrS' simply does an RTS.<br />

entry of 'AdrT' or 'AdrS' simply does an RTS.<br />

The 11 II -Plus- Pi 11 s monitor, being g in ROM, , can't be<br />

changed, of course, (a nd perhaps that's just as<br />

changed, of course, (and perhaps that's just as<br />

well). But it cann be copied. In fact, it will obligingly<br />

copy itself. The procedure is as follows:<br />

copy itself. The procedure is as fo llows:<br />

Key in:<br />

1. CALL-151 lS I (puts you into monitor)<br />

2. 4800

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!