!pr2
!lm12
!rm75
Bringing Some Patches Together.....................Jim Wetzel

Earlier this year I decided to break down and finally buy an 80-column card for my Apple II+.  After all, it's cheaper than a IIe.  I was just about to type in the Videx patches from AAL Volume 2, No.11, when Bob announced Version 1.1.  Well with the Videx patches and all the new features I just couldn't pass up his offer.  After a call to Bob and a three day wait I had version 1.1 of the S-C Macro Assembler.

While testing out the new version I soon discovered most of the patches I had applied to version 1.0 would not work properly.  The addresses of the routines/tables had all moved.  After a few hours work and a lot of dis-assembling I would like to share the new locations with AAL readers and bring some of the patches together.

First I will describe the new addresses and then show how I used them.

The Escape Function Table is now located at $14AB-$14C6 <ESC-@ thru ESC-M>.  This is a group of two-byte addresses (minus 1, because they are of the PHA-PHA-RTS variety) of the routines to handle the escape functions.

The Edit Function Table is now located at $1CB4-$1CE3 <ctrl-@ thru ctrl-X>.  This table is somewhat different.  Each entry is three bytes long and it contains the control character and the address-minus-1 of the routine to handle the function.

Location $14D3 contains the dash count <$26> for the ESC-L function.

Location $13FF contains a JSR to the monitor Bell routine.  This is the end of the input checker, the JSR BELL is executed when an invalid character is entered, and a good place to put a JSR to an extended input processor.

These locations are valid for the regular version and the Videx version which load at $1000.  For language card users just add $C000 to the address.  My hat is off to Bob for adding all the features of Videx and still keeping the assembler looking the same.  I have not checked the STB or the IIe versions for compatibility but, with a little bit of work and knowing what to look for it should be an easy process.

Now, what can you do with this information?  I have modified Bob's language card loader to show you (figure 1).  With the exception of the REM statements, lines 1000-1140 of the file are as Bob supplied; after that the changes begin.   I will not spend a lot of time explaining the routines themselves because they are all well documented in the referenced AAL articles.

The first thing I do is load in my extended input processor (figure 2) at $F600.  There appears to be about two free pages after the assembler and before monitor in the language card version.  For standard version users just move the symbol table up as described AAL Vol. 2, No. 9.  My input processor is a combination of Auto Catalog (AAL 2.9) and Toggling Upper/Lower Case (AAL 3.3).  Next I modify the JSR BELL to JSR CONTROL.A.

Once you have control you can add any routines you wish (such as R. F. O'Brien's Auto/Manual Toggle AAL 2.11).  For now I am only interested in an upper/lower case toggle.

Line 1170 modifies the ESC-C function to JSR to my routine for auto Catalog.  Remember this should be the address of the routine - 1.  Lines 1180-1190 change the cursor to a blinking underline (as described in AAL 3.5) along with line 1200 which changes the number of "-"'s from 38 to 64 (I found 68 to be too many).

Last but not least is an answer to Steve Mann's request for a upper/lower case toggle in EDIT mode.  In version 1.1 Bob changed the ctrl-I key function in EDIT mode and added a ctrl-A key function in its place.  He did it so that the //e TAB key, which generates control-I, would really mean TAB.

Well Bob, I like mnemonic commands (like ctrl-I for Insert), and think the older Apples should still take precedence.  Line 1210 changes the ctrl-A key to branch to my upper/lower case toggle routine, just past the character check, and line 1220 changes the ctrl-I routine back to its proper function (this was the address found in the ctrl-A area).

 I hope these patches will be useful to other AAL readers not only for what they do, but for how they do it.
