!pr1
Multiple Column Dis-Assembly.......................Adam Levin

When I'm writing and debugging a program, I always use a lot of printer paper as I list and re-list version after version of my creation.  Using the Apple monitor's 'L' command wastes a lot of that paper, too.  Since each disassembled line takes at most 36 characters, I end up wasting half of each page!.  I know I could feed the paper through a second time with the right hand side now on the left, but the left hand listing isn't always the same length as the right, so I end up with listings that span several separate lengths of paper.  I've written a program to solve this dilemma (as if you hadn't guessed!), and I call it PolyCol.

PolyCol will be of use no matter what type of printer you have: daisywheel printer and 80-column video card owners will get two columns per page (screen), 80-column dot matrix owners can get up to four columns per page by using compressed printing, and those with wider carriages can get even more!  In addition, by compressing the print size vertically as well, it is possible to get a disassembly of all the ROMs in the Apple onto only 16 pages! (It's also possible to go blind trying to read it!)

Note that rather than creating all the text in memory, and then dumping an entire page at once,  PolyCol calculates which opcode to disassemble where, 'on-the-fly'.  You might think that this would slow things down appreciably; but in fact unless you require tens of columns, the listing is done relatively quickly.

As you will see from the listing, seven zero-page locations are used to hold the parameters which the user must specify.  You must store the starting and ending addresses of the area to be dis-assembled into locations $00-03.  Locations $04-07 control the number of lines per page and columns per line, as well as several other features.  Here are some examples to show what you can do with different parameter settings:

     $04  $05  $06
     ---  ---  ---

     $01  $14  $FE  - Standard monitor 'L' listing.
                      Press any key to see the next page.

     $02  $36  $FF  - Two column, 54 line page with a form feed
                      in between pages

     $04  $4C  $0C  - Four column, 76 line page with 12 spaces
                      between pages.  Don't forget to set
                      elite typeface and compressed print.

     $04  $70  $FF  - Four column, 112 lines per page!
                      To do this I had to use compressed
                      elite super- script, with a line
                      spacing of 1/12th in.

You can add just a little code to POLYCOL to set it up as a control-Y command.  Then you could set the starting and ending addresses as in normal monitor commands.  The other four parameters could also be specified in the control-Y command format, if you really get serious about modifications.
