 Aplwrks Reset                 27 Oct 87
 
 This is an update for ProDOS 8, versions 1.2, 1.3, 1.4. This modification
 uses the last byte of the DEVICE LIST in the ProDOS global page. If you
 use more than 13 disk drives (including RAM drive, hard disc, etc.) then do
 not use this patch.
 
 APLWRKS.RESET is a RESET vector version of Michael Wilks' (Applied Eng) short
 procedure to get back into APPLEWORKS after the program hangs. After
 downloading this doc be sure to download and read RESCUE.TXT in DL4 for
 more information and CAUTIONS.
 
 This is a BASIC program that modifies the file, APLWORKS.SYSTEM, on the
 STARTUP disc. After modification, if you bomb out, hitting CONTROL-RESET
 should return you to AppleWorks, hopefully, intact. Do not take any chances.
 Save the file you are working on and reboot AppleWorks before going on.
 
 CAUTION! Before going any further make a copy of the AppleWorks STARTUP
 disk and use the copy.
 
 Instructions:
 1. Isolate the program at the end of this doc and save to disk as AW.R.
 2. Exec AW.R. This gives you a BASIC program called APLWRKS.RESET.
 3. If you have an extended memory board such as Ramworks II, configure
 Appleworks to your liking. (With Ramworks, use the Super Appleworks
 Desktop Expander.)
 4. RUN APLWRKS.RESET and insert the STARTUP disk in Drive 1 as instructed.
 5. When instructed enter the name APLWORKS.SYSTEM. If you have renamed this
 file enter the new name.
 6. If you wish to use MACROWORKS, first configure with MACROWORKS as
 indicated in the MACROWORKS manual. The APLWORKS.SYSTEM file will be renamed
 APLWORKS.SYS. Modify MACRO.SYSTEM instead of APLWORKS.SYSTEM with
 APLWRKS.RESET. When instructed to enter the name of the file containing
 APLWORKS.SYSTEM, enter MACRO.SYSTEM and its length as indicated. The short
 reset subroutine will be appended to MACRO.SYSTEM.
 
 The addition of the RESET vector is particularly useful for those of you who
 have a Grappler +. If you want to cancel out the printer buffer, you now can
 hit CONTROL-RESET and be returned to Appleworks intact. So far I have not had
 any problem simply going ahead and using Appleworks without re-booting.
 There are no guarantees, however. Proceed at your own risk.
 
 
 NEW
  10  PRINT  CHR$ (4)"PR#3": PRINT
  20  VTAB 10: HTAB 28: PRINT "APPLEWORKS CONTROL-RESET": PRINT : PRINT
  25  HTAB 32: PRINT "by Harold Portnoy"
  30  FOR N = 1 TO 1000: NEXT
  40  HOME : PRINT "Insert AppleWorks STARTUP disc in Drive 1,"
  45  PRINT "then press any key. ";: GET A$
  50  PRINT  CHR$ (4)"PREFIX,D1";V$
  60  PRINT  CHR$ (4)"CATALOG"
  70 INPUT "Enter name of Appleworks System file (e.g. APLWORKS.SYSTEM). ";AW$
  80  PRINT  CHR$ (4)"BLOAD";V$;AW$;",TSYS,A$2000"
  90  L = PEEK (48858) * 256 + PEEK (48857) + 1: REM FILE LENGTH
  100  BA = 8192: REM  BOOT ADDRESS AT $2000
  110  GOSUB 1000: REM  ADD RESET SUBROUTINE
  120  REM  ALTER SUBROUTINE TO REFLECT RELOCATION ADDRESS
  130  DEF  FN AH(ADR) =  INT (ADR / 256)
  135  DEF  FN AL(ADR) =  ADR -  FN AH(ADR) * 256
  140  POKE BA + L + 25, PEEK (BA + 1): POKE BA + L + 26, PEEK (BA + 2)
  150  ADR = BA + L:BH =  FN AH(ADR):BL =  FN AL(ADR)
  160  POKE BA + 1,BL: POKE BA + 2,BH
  170  ADR = BA + L + 27:RH =  FN AH(ADR):RL =  FN AL(ADR)
  180  POKE BA + L + 16,RL: POKE BA + L + 17,RH
  190  REM  SAVE RE-CONFIGURED APLWORKS.SYSTEM
  210  PRINT  CHR$ (4)"BSAVE";AW$;",TSYS,A$2000,L";L + 40
  220  PRINT "APPLEWORKS now configured with RESET vector."
  230  PRINT "If AppleWorks hangs, hit CONTROL-RESET to recover.": END
  1000  FOR N = 0 TO 38: READ P: POKE BA + L + N,P: NEXT: RETURN
  1010  DATA 162,63,160,191,142,242,3,140,243,3,32,111,251,160,11,185,0,0,153
  1020  DATA 63,191,136,16,247,76,0,0,32,0,195,44,131,192,44,131,192,76,51,16
 SAVE APLWRKS.RESET
