home *** CD-ROM | disk | FTP | other *** search
/ Nibble Magazine / nib39b.dsk / MACRO.INIT.bas < prev    next >
BASIC Source File  |  2023-02-26  |  3KB  |  66 lines

  1. 10  REM  *******************************   
  2. 20  REM  *          AppleMate          *  
  3. 30  REM  *   The Complete Keyboard     * 
  4. 40  REM  *        Macro System         *
  5. 50  REM  *                             * 
  6. 60  REM  *     By  Chris Chapman       * 
  7. 70  REM  *     Copyright 1990 by       * 
  8. 80  REM  *    MindCraft Publ. Corp.    *  
  9. 90  REM  ******************************* 
  10. 120  REM ------- Set-Up Section
  11. 150  HOME : ONERR  GOTO 860
  12. 160 D$ =  CHR$(4):LA = 16384: REM  $4000
  13. 170  FOR L = 1 TO 27: READ D: POKE 767 +L,D: NEXT 
  14. 180  DATA  169,4,32,245,190,133,7,96,162,2,160,0,177,8,145,6,200,208,249,230,9,230,7,202,16,242,96
  15. 190  IF  PEEK(64435) < >6  THEN 890: REM  ][+
  16. 200  IF  PEEK(977)  THEN 390: REM  DOS 3.3
  17. 230  REM ------- Installer for ProDOS
  18. 260  REM  Make sure prefix is the same as the one where MACRO.INIT lives.
  19. 270  IF  PEEK(640)  THEN  FOR I = 1 TO  PEEK(640):P$ = P$ + CHR$( PEEK(640 +I)): NEXT : FOR N = I TO 2  STEP  -1: IF  MID$ (P$,N,1) < >"/"  THEN  NEXT 
  20. 280  IF  PEEK(640)  AND N >3  THEN P$ =  LEFT$(P$,N -1): PRINT D$"PREFIX"P$
  21. 290  GOSUB 610: REM  BLOAD AppleMate
  22. 300  CALL 768:BF =  PEEK(7): REM  Allocate buffer
  23. 310  GOSUB 690: REM  Poke in Ampersand vectors
  24. 320  GOSUB 710: REM  Poke in relocated address
  25. 330  GOSUB 720: CALL 776: REM  Set up for relocate, do it
  26. 340  GOSUB 670: REM  BLOAD Macro Table
  27. 350  GOSUB 720: POKE 7,BF +1: CALL 776: REM  Relocate table
  28. 360  GOTO 790: REM  All set; exit
  29. 390  REM ------- Installer for DOS 3.3
  30. 420  IF  PEEK(40193) < >149  THEN  PRINT : PRINT  CHR$(4)"MAXFILES4": POKE 40192,218: POKE 40193,149: PRINT : PRINT  CHR$(4)"MAXFILES3"
  31. 430 D$ =  CHR$(13) + CHR$(4):LA = 16384:BF = 150: POKE 7,BF
  32. 440  GOSUB 610: REM  BLOAD AppleMate
  33. 450  GOSUB 690: REM  Poke in Ampersand vectors
  34. 460  GOSUB 710: REM  Poke in relocated address
  35. 470  REM  Patch for DOS 3.3
  36. 480  POKE LA +55,85: POKE LA +56,170: POKE LA +71,85: POKE LA +72,170
  37. 490  POKE LA +77,86: POKE LA +78,170: POKE LA +84,56: POKE LA +85,0
  38. 500  POKE LA +89,57: POKE LA +90,0
  39. 510  POKE LA +98,32: POKE LA +99,234: POKE LA +100,3
  40. 520  GOSUB 720: CALL 776: REM  Set up for relocate, do it
  41. 530  GOSUB 670: REM  BLOAD Macro Table
  42. 540  GOSUB 720: POKE 7,BF +1: CALL 776: REM  Relocate table
  43. 550  GOTO 790: REM  All set; exit
  44. 580  REM ------- Subroutines
  45. 610  PRINT D$"BLOAD APPLEMATE,A"LA: RETURN 
  46. 620  REM  Replace F$ below
  47. 630  REM  with the name of the
  48. 640  REM  file you wish to load
  49. 650  REM  when MACRO.INIT is run.
  50. 660  REM 
  51. 670 F$ = "DEMO.MACROS"
  52. 680  PRINT D$"BLOAD "F$",A"LA: RETURN 
  53. 690  POKE LA +48, PEEK(1014): POKE LA +49, PEEK(1015)
  54. 700  POKE 1014,0: POKE 1015,BF: RETURN 
  55. 710  POKE LA +51,BF: RETURN 
  56. 720  POKE 9,LA/256: POKE 8,LA -( PEEK(9) *256): POKE 6,0: RETURN 
  57. 760  REM ------- Exit Routine
  58. 790  & MAC
  59. 800  HOME : PRINT "AppleMate Installed": PRINT : PRINT "By Chris Chapman"
  60. 810  PRINT "Copyright (c) 1990 MindCraft Publ. Corp."
  61. 820  PRINT "Concord, MA 01742": NEW 
  62. 830  REM ------- Error Trap routine
  63. 860  VTAB 15: PRINT "Error in setup section.  Check to see"
  64. 870  PRINT "That all files have been correctly"
  65. 880  PRINT "saved and all lines correctly keyed in.": END 
  66. 890  VTAB 15: POKE 36,13: PRINT "HARDWARE ERROR": POKE 36,3: PRINT "THIS COMPUTER WILL NOT RUN APPLEMATE": END