!pr1
Generating Cross Reference Text File with DISASM...Bob Kovacs

I received a phone call from Don Lancaster the other day.  He had been using DISASM to probe the mysteries of AppleWriter, and was now preparing to document his findings.  Although he liked the way DISASM generated a triple cross reference table, he preferred to have it in a form that could be used by his word processor (that is, on a text file).  The cross reference table generated by DISASM is normally output to either the screen or a printer, so Don's only alternative was to manually type it into his word processor.  There were hundreds of labels....

It turned out that a simple patch to DISASM will do the trick.  All that is necessary is to change the JSR PASS2 which normally generates the source code listing to JSR XREF.

The following patch outputs the cross reference table to your file after responding "Y" to the prompt "GENERATE TEXT FILE?":

       $09A1:20 F1 0A

Back in the April issue of AAL, I described a method of using EXEC files with DISASM.  A patch was required to the "YES/NO" routine to input the response via KEYIN rather than directly from the keyboard.  Although the patch I gave in April works, KEYIN uses the Y-register as an index to the screen.  My patch did not always wind up in the right place.  So I have expanded the patch as follows:

       $0C57:EA A4 24 20 18 FD 09 80

I hope that this has not caused any inconvenience.
