!pr1
New Catalog Revisited........................Robert F. O'Brien
                                               Dublin, Ireland

In the May issue of AAL Bob S-C published my article "A New Catalog for Dos 3.3" - he failed to mention or take credit for the fact that he modified my routine and managed to leave a whopping 17 spare bytes - which is 16 more than I left.  I was happy enough to have added the new features.

At the end of that article Bob S-C set the challenge to add the Disk Volume message back.  However, I have another possible use for those 17 spare bytes - well at least 14 of them! 

How about a single-key format control feature for the Catalog command?  The user issues the CATALOG command normally; then one more keypress will select either a normal or double- barrelled Catalog display.

Once you install the following additional code, when you issue the CATALOG command the routine waits for a keypress.  If you press "D" you get a double-barrelled Catalog listing for your 80-column card or printer.  Any other keypress will result in the normal 40-column version.

The line numbers on the 14-byte routine which follows make the code fit into the listing from the May article.

               1320 CATALOG
AD98- 20 0C FD 1321        JSR MON.RDKEY     await keypress
AD9B- 49 8E    1322        EOR #$8E   "D" ($C4) eor LSR ($4A)
AD9D- C9 4A    1323        CMP #$4A   if was "D", now LSR
AD9F- F0 02    1324        BEQ .0     ...it was "D"
ADA1- A9 38    1325        LDA #$38   SEC opcode
ADA3- 8D 21 AE 1326 .0     STA DBL.SWITCH    set option
               .
               .
               .
               2010 DBL.SWITCH SEC
               .
               .
               .
               2150        .BS 3         three free bytes.


The code above is of the deadly self-modifying variety, so beware.

Note that if you have version 2.0 of the S-C Macro Assembler, you can write line 1322 as EOR #"D"^$4A if you wish.
