!lm10
!rm70
Adding ASCII to Apple Monitor Dump....Bob Sander-Cederlof

Peter Bartlett (subscriber in Chicago, IL) sent me some source code for patches to the Apple Monitor ROM.  Of course, patching a ROM may be a little too much hardware work, but if you have a 16K RAM card you can put the revised monitor up there.  The space needed for the patch is stolen from the cassette I/O command, so if you install this patch you will lose cassette I/O.

Peter's patches add the ASCII dump to the Apple Monitor's hex dump.  That is, when I type a command like "800.87F" in the monitor, it will not only print out the hex values, but also the ASCII values of each byte.  I modified his patches a little, to shorten the code to the following:

   <code here>

These patches will work with either the old monitor ROM, or the Autostart ROM.  The JSR PATCH line goes right into the hex dump program, over the top of a JSR COUT that printed a space.  That space is normally printed right before the next byte value is printed in hex.  The address of the next byte is kept in A1L,A1H ($3C,3D).  The Y-register has 0 in it.

The main patch subroutine is stored on top of part of the cassette tape I/O, at $FC99; it begins with the JSR COUT that was covered up at $FDB8.  Lines 1150,1160 pick up the byte to be displayed and save it on the stack.  Lines 1170-1210 compute the horizontal postition for poking the byte on the screen.  The low-order three bits of the memory address determine which column will be used, from column 31 through 38.  Lines 1220,1230 retrieve the byte from the stack and store it into the screen buffer.  Lines 1240,1250 restore Y=0 and return to the hex dump subroutine.

Note that this patch does not "print" the ASCII codes on the screen; it "pokes" them.  Therefore if your printer is on, the printed copy will only contain the hex dump.  The ASCII codes will only appear on the screen.

How do you patch the RAM card version of the monitor?  Here's how I did it:

!lm15
1)  Load the language card using your DOS 3.3 Master Disk, or whatever technique you like to use.

2)  Turn on the language that is in the card (using FP or INT).

3)  BSAVE MONITOR,A$F800,L$800.

4)  BRUN ASMDISK 4.0

5)  BLOAD MONITOR,A$800

6)  Enter the source code for the patches and assemble them with the ASM command.  This will patch the monitor copy which you loaded at A$800 in step 5.

7)  Type "$C081 C081" to write enable the language card.

8)  Type "$F800<800.FFFM" to move the patched monitor into the real monitor space.

9)  Type "BSAVE <your file name>,A$D000,L$3000" to save the combined language and monitor for later loading into the language card.

!lm10
If you really do want to burn a new monitor ROM, follow the instructions with your ROM Burner.
