Printer Driver Fixes

By Bob Huelsdonk

Some protocol is a must if you use a printer with greater than 40 columns with your Apple.  This comes about because it tries to write beyond the screen area and into the variables area in Integer BASIC or into the operating system in Applesoft.  The following fix will help prevent this problem:

Start your printer driver routine with a JSR FC58.  This will home the cursor and clear the screen.  Do not return to the screen via FDF0.  You will not get any output to the CRT but this is usually alright.  Unless you have the ROM version of Applesoft, there is also a problem using a PR#0.  To solve this, use the routine given below to re-enter the CRT output with a call to 1008, if you load it at the address shown.  This also resets the window width to 40 characters.  for Driver routines that are located in memory between $0300 and $03FF, there is also a conflict with the disk operating system, which will not permit you to directly call the printer.  However, this can be overcome in most cases by addressing the printer under program control.  In printing a program listing, a line must be added to the program as follows:

10 CALL 880 : LIST 100,900 : CALL 1008 : END

03FO-    A9 FO         LDA    #$FO
03F2-    85 36           STA    $36
03F4-    A9 FD         LDA    #$FD
03F6-    85 37           STA $37
03F8-    A9 28         LDA #$28
03FA-    85 21          STA $21
03FC-    60               RTS

Please follow and like us:

About the Author


The A.P.P.L.E. Website is run by the Apple Pugetsound Program Library Exchange Users Group and is open to all Apple and Macintosh fans and their friends.