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