home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol139 / un-prot.bas < prev    next >
Encoding:
BASIC Source File  |  1984-04-29  |  1.4 KB  |  46 lines

  1. 1000 REM Written July 22, 1983 by B.Norris
  2.  
  3.          To use this program, first get
  4.  
  5.          UN.COM installed, load this program,
  6.  
  7.          save it (protected - with another
  8.  
  9.          name), load the protected version,
  10.  
  11.      and finally - run it.
  12.  
  13. 1001 REM UN.COM is available in both the
  14.  
  15.      SIG/M and CPMUG libraries.
  16.  
  17.      ( SIG/M Volume 52, CPMUG Volume ??? )
  18.  
  19. 1002 REM Questions?  Call (212) 881-4898
  20.  
  21. 1010 FOR I=1 TO 10: PRINT: NEXT I:
  22.  
  23.      PRINT "        Fixup for ** UN.COM **":
  24.  
  25.      PRINT "        For MBASIC 5.2 (Apple)":
  26.  
  27.      PRINT: PRINT
  28. 1020 PRINT "    0 - Exit this program.":
  29.  
  30.      PRINT
  31. 1030 PRINT "    1 - CP/MUG Version of UN.COM":
  32.  
  33.      PRINT "       (for versions up to 5.20 )":
  34.  
  35.      PRINT
  36. 1040 PRINT "    2 - SIG/M  Version of UN.COM":
  37.  
  38.      PRINT "       (FOR VERSIONS UP TO 5.21)":
  39.  
  40.      PRINT: PRINT
  41. 1050 PRINT "Select the appropriate number:";
  42. 1060 X$=INPUT$(1): X=ASC(X$):
  43.  
  44.      IF X>96 AND X<123 THEN X=X-32
  45. 1070 X$=CHR$(X): IF X$<"0" OR X$>"2" THEN
  46.  
  47.      FOR I=1 TO 15: PRINT: NEXT I: GOTO 1010
  48. 1080 PRINT X$: IF X$="0" THEN STOP
  49. 1090 IF X$="1" THEN A=33 ELSE A=29
  50. 1100 IF PEEK(A)<>15 OR PEEK(A+1)<>12 THEN
  51.  
  52.      PRINT "UN.COM not installed, already":
  53.  
  54.      PRINT "patched, or wrong version.":
  55.  
  56.      STOP
  57.  
  58. 1110 C=12: D=188: B=256*C+D:
  59.  
  60.      IF PEEK(B)=254 AND NOT PEEK(B+1) THEN 1130
  61. 1120 PRINT "Wrong version of MBASIC, or":
  62.  
  63.      PRINT "this program is not protected.":
  64.  
  65.      STOP
  66.  
  67. 1130 POKE A,D: POKE A+1,C:
  68.  
  69.      PRINT "Done."
  70.