home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol130 / config.bas < prev    next >
Encoding:
BASIC Source File  |  1984-04-29  |  20.3 KB  |  630 lines

  1. 1 ' signon subsystem -- Subsystem Configurator
  2. 5 '    by dick lieber
  3. 7 DIM ACLARRAY%(6,11)
  4. 8 DIM TEXTFILE$(8)
  5. 9 %include CONFIG.CMN
  6. 30 VERSION$="1.4 {10/14/82}"    'initial release was 1.01
  7. 31 PWDFILE$="pwds"
  8. 32 BSTRING$=CHR$(8)+" "+CHR$(8)
  9. 33 DEFDRIVE$="A:"
  10. 34 POSYSFILE$="POSYS"
  11. 69 '
  12. 72 '
  13. 74 DIM PARAPROMPT$(6)
  14. 75 '
  15. 77 ON ERROR GOTO 1000
  16. 79 IF PWDSOPEN% <> 0 THEN GOTO 128
  17. 80 '    defaults - do not change here (see SIGNON.DOC)
  18. 81 '
  19. 82 PWD1$="PASS1"
  20. 84 PWD2$="PASS2"
  21. 86 PWD3$="PASS3"
  22. 88 BULLFILE$="BULLETIN"
  23. 89 INSTRFILE$="INSTRUCT"
  24. 90 SUCESSFILE$="SUCESS"
  25. 91 SPECIALFILE$="SPECIAL"
  26. 92 OPTIONFILE$="OPTION"
  27. 93 EXITFILE$="BYEBYE"
  28. 94 SIGNONMESS$="RCPM Signon Subsystem by Dick Lieber"
  29. 95 NEWCOMFILE$="NEWCOM"
  30. 96 OPTIONMESS$="Want information on new system features"
  31. 97 NOACCESSFILE$="NOACC"
  32. 98 ALLOWNEW%=1
  33. 99 PWDACL%=1
  34. 100 MAXPW%=3
  35. 101 SYSOPSLVL%=10
  36. 102 USERNUMBER%=1
  37. 103 DENIEDCOMMENT%=1
  38. 104 CLEARSCR$=CHR$(4)
  39. 105 MUSTQUALIFY%=1
  40. 106 QUALQUESTION$="What is the name of Digital Research's standard debugger"
  41. 107 QUALANSWER1$="DDT"
  42. 108 QUALANSWER2$="SID"
  43. 109 SKIPFILES%=0
  44. 110 RAMPOKE%=1
  45. 111 RAMPOKEADDRESS%=&H3F
  46. 112 QUALNONPWD%=1
  47. 113 NOCLOCK%=1
  48. 114 TESTADDRESS = &HF000
  49. 115 MGRDRIVE$="A:"
  50. 116 BYEPROG$="BYE81"
  51. 118 SPECIALEVEL%=4
  52. 119 BYEPOKE%=0: BYEPARAMS%=3
  53. 120 STATUSLINE%=0
  54. 121 WHEELOPTION%=0: WHEEL%=&H3E: RESTRICT%=123: UNRESTRICT%=0
  55. 122 MODEMCTLOPT%=1: MODEMPORT%=&HC3: DISCONNECT%=37
  56. 123 PAGESIZE%=24
  57. 124 FINISHFILE$="FINISH"
  58. 128 '
  59. 129 CRLF$=CHR$(&HA)+CHR$(&HD)
  60. 130 '    on-off function
  61. 131 DIM ONOFF$(1)
  62. 132 ONOFF$(0)="Off"
  63. 133 ONOFF$(1)="On "    '    #
  64. 134 DEF FNONOFF$(ONOFF%)=ONOFF$(ONOFF%)
  65. 135 DEF FNLINES$(NLINES%)=STRING$(NLINES%,CRLF$)
  66. 136 DEF FNMAKEHEX$(S$,POINTER%,SIZE%)=
  67.     RIGHT$("0000"+HEX$(ASC(MID$(S$,POINTER%))), SIZE%)+"H "
  68. 137 DEF FNDISPHEX$(X%)=RIGHT$("00"+HEX$(X%),2)+"H "
  69. 399 GOTO 10000
  70. 400 %INCLUDE 400500.SSB
  71. 600 '
  72. 604 ' password code entry
  73. 608 ' get string (echo random Xes)
  74. 612 '1.5    special version for config
  75. 616 PWDSTRING$="!1QAZ@2WSX#3EDC$$RFV%5TGB^6YHN&7UJ"
  76. 620 PWDSTRING$=PWDSTRING$+"M*8IK,<(9OL.>)0P:;?/_-[=']+~`|\}{"
  77. 624 'GOSUB 1600
  78. 628 RANDOMIZE(VAL(RIGHT$(TIME$,1)))
  79. 632 MAX%=13
  80. 636 ANSWER$=""
  81. 640 KEY$="*"
  82. 644 NKEY%=0
  83. 648 WHILE NKEY% <= MAX%
  84. 652    KEY$=INPUT$(1)
  85. 656    PRINT STRING$(INT(RND(2) * 30 / 10)+1,88);
  86. 660    KEY%=ASC(KEY$)
  87. 664    IF KEY%=13 THEN RETURN
  88. 668    NKEY%=NKEY%+1
  89. 672    IF KEY% >= 97 AND KEY% <=122 THEN KEY%=KEY%-32
  90. 676    IF KEY% >=0 AND KEY% <=31 THEN KEY%=KEY%+64
  91. 680    KEY%=INSTR(PWDSTRING$,CHR$(KEY%))+&H20
  92. 684    ANSWER$=ANSWER$+CHR$(KEY%)
  93. 688 WEND
  94. 692 RETURN
  95. 700 '
  96. 705 '    get string into ANSWER$ then CRLF
  97. 710 '
  98. 715 GOSUB 500: PRINT: RETURN
  99. 1000 '
  100. 1005 '    Error handler
  101. 1010 ' 1.5
  102. 1015 A$="Error Trap":CR%=2: GOSUB 400
  103. 1031 IF ERR=53 THEN NOFILE%=1:RESUME NEXT
  104. 1032 IF ERR=62 THEN RESUME NEXT
  105. 1040 ON ERROR GOTO 0
  106. 1100 %INCLUDE 1100.SSB
  107. 1800 '
  108. 1804 '    choose a password
  109. 1808 '
  110. 1811 OLDPWD$=PWD$
  111. 1812 PRINT
  112. 1816 A$="Choose a password.   It may be any":CR%=2:GOSUB 400
  113. 1820 A$="combination of characters, except RETURN and may":GOSUB 400
  114. 1824 A$="be up to 13 characters in length.":GOSUB 400
  115. 1828 A$="Press RETURN after typing your password.":GOSUB 400
  116. 1832 PRINT
  117. 1836 A$="    > ":CR%=12: GOSUB 400
  118. 1840 MAX%=13
  119. 1844 GOSUB 600
  120. 1845 IF NKEY%=0 THEN PWD$=OLDPWD$: RETURN
  121. 1848 PWD$=ANSWER$
  122. 1852 PRINT
  123. 1856 IF PWD$=STRING$(13,42) THEN A$="Sorry that password isn't allowed.":
  124.             CR%=2:GOSUB 400: GOTO 1812
  125. 1860 A$="To make sure, type it again.":CR%=2:GOSUB 400
  126. 1864 A$="    > ":CR%=1:GOSUB 400
  127. 1868 GOSUB 600
  128. 1872 PRINT
  129. 1876 IF PWD$<>ANSWER$ THEN A$="They don't match.": GOSUB 400: GOTO 1812
  130. 1880 PRINT
  131. 1884 A$="        ok":CR%=2:GOSUB 400
  132. 1886 CHANGED%=1
  133. 1888 RETURN
  134. 2300 %INCLUDE 2300.SSB
  135. 3000 '
  136. 3007 '    convert hex or decimal string to single variable
  137. 3014 '    ANSWER$ => ANSWER (0-0FFFFH)
  138. 3021 ' 1.1    #
  139. 3028 ANSWER=0
  140. 3035 IF RIGHT$(ANSWER$,1)<>"H" THEN ANSWER=VAL(ANSWER$): GOTO 3091
  141. 3042 ANSWER$=LEFT$(ANSWER$,LEN(ANSWER$)-1)
  142. 3049 FOR INDEX%=1 TO LEN(ANSWER$)
  143. 3056    PIXIE$=MID$(ANSWER$,(LEN(ANSWER$)-INDEX%+1),1)
  144. 3063    IF PIXIE$ => "A" THEN PIXIE$="1"+CHR$(&H30+(ASC(PIXIE$)-&H41))
  145. 3070    NUMBER=VAL(PIXIE$) * 16 ^ (INDEX%-1)
  146. 3077    ANSWER=ANSWER+NUMBER
  147. 3084 NEXT INDEX%
  148. 3091 IF ANSWER > 65535! THEN ANSWER=0
  149. 3092 IF ANSWER > 32768! THEN ANSWER = ANSWER - 65536!
  150. 3098 RETURN
  151. 3100 '
  152. 3105 '    clear screen
  153. 3110 '
  154. 3115 A$=CLEARSCR$:CR%=1:GOSUB 400: RETURN
  155. 3300 '
  156. 3305 '    get a single letter -- change to selection # fo menus etc.
  157. 3310 '
  158. 3315 MAX%=0:GOSUB 500
  159. 3320 IF ANSWER$="" THEN SELECTION%=0: RETURN
  160. 3325 SELECTION%=ASC(ANSWER$)-64
  161. 3327 IF SELECTION% < 0 THEN SELECTION%=0
  162. 3330 RETURN
  163. 3400 '
  164. 3402 '    edit authoriziation array
  165. 3404 ' 1.3    #
  166. 3406 DATA "Maximum User",
  167.       "Maximum Drive #",
  168.       "Total time",
  169.       "future opt 1",
  170.       "future opt 2",
  171.       "user 15 access"
  172. 3408 RESTORE 3406
  173. 3410 FOR INDEX%=0 TO 5
  174. 3412    READ PARAPROMPT$(INDEX%)
  175. 3414 NEXT INDEX%
  176. 3416 GOSUB 3100
  177. 3418 PRINT TAB(25);"Authorization Table Editor"
  178. 3420 PRINT
  179. 3422 PRINT
  180. 3424 PRINT " access level ===>";
  181. 3426 FOR INDEX%=0 TO 10
  182. 3428    PRINT USING "  ## ";INDEX%;
  183. 3430 NEXT INDEX%
  184. 3432 PRINT:PRINT TAB(20);"+"+STRING$(55,"-")+"+"
  185. 3434 FOR INDEX%=0 TO 5
  186. 3436    OVER%=18-LEN(PARAPROMPT$(INDEX%)):
  187.         PRINT CHR$(INDEX%+97);TAB(OVER%); PARAPROMPT$(INDEX%);": |";
  188. 3438    FOR I%=0 TO 10
  189. 3440        IF INDEX% < 5 THEN
  190.         PRINT USING "###  ";ACLARRAY%(INDEX%,I%);
  191.         ELSE PRINT " ";FNONOFF$(ACLARRAY%(INDEX%,I%));" ";
  192. 3442    NEXT I%
  193. 3444    PRINT TAB(76);"|": IF INDEX% < 5 THEN PRINT TAB(20);"|";TAB(76);"|"
  194. 3446 NEXT INDEX%
  195. 3447 PRINT TAB(20); "+"+STRING$(55,"-")+"+"
  196. 3448 PRINT:PRINT TAB(20);"Type letter > ";
  197. 3450 GOSUB 3300
  198. 3452 IF SELECTION%=0 THEN RETURN
  199. 3454 IF SELECTION% > 6 THEN GOTO 3448 ELSE SELECTION%=SELECTION%-1
  200. 3456 PRINT TAB(20);"Access level > ";
  201. 3458 MAX%=2: GOSUB 500
  202. 3460 IF NKEY%=0 THEN GOTO 3448
  203. 3462 IF ANSWER$="ALL" THEN BULKLOAD%=1 
  204.     ELSE
  205.         BULKLOAD%=0:
  206.         ACLVL%=VAL(ANSWER$)
  207. 3464 IF ACLVL% > 10 THEN 3456
  208. 3466 PRINT TAB(20);PARAPROMPT$(SELECTION%);" for ";
  209. 3468 IF BULKLOAD%=1 THEN PRINT "all ";
  210. 3470 PRINT "access level";
  211. 3472 IF BULKLOAD%=0 THEN PRINT ACLVL%;
  212.     ELSE
  213.     PRINT "s ";
  214. 3473 IF SELECTION% < 5 THEN PRINT "> ";
  215.     ELSE
  216.     PRINT "(y or n) > ";
  217. 3474 GOSUB 500
  218. 3476 IF NKEY%=0 THEN GOTO 3416
  219. 3477 VALUE%=0
  220. 3478 IF SELECTION% < 5 THEN VALUE%=VAL(ANSWER$)
  221. 3479 IF SELECTION% => 5 THEN IF ANSWER$="Y" THEN VALUE%=1
  222. 3480 IF VALUE% > 255 THEN 
  223.     PRINT TAB(20);"Value must be in the range of 0 - 255.": GOTO 3466
  224. 3482 IF BULKLOAD%=0 THEN
  225.     ACLARRAY%(SELECTION%,ACLVL%)=VALUE%
  226.     ELSE
  227.         FOR INDEX%=0 TO 10:
  228.             ACLARRAY%(SELECTION%,INDEX%)=VALUE%:
  229.         NEXT INDEX%
  230. 3484 CHANGED%=1
  231. 3486 GOTO 3416
  232. 3700 '
  233. 3702 '    SYSOP password editor
  234. 3704 '1.2
  235. 3706 GOSUB 3100
  236. 3708 PRINT TAB(30); "SYSOP Password Editor"
  237. 3710 PRINT FNLINES$(3)
  238. 3712 PRINT: PRINT TAB(20);"a    SYSOP First Name: "; PWD1$
  239. 3714 PRINT: PRINT TAB(20);"b     SYSOP Last Name: "; PWD2$
  240. 3716 PRINT: PRINT TAB(20);"c            Password: "; STRING$(13,42)
  241. 3740 PRINT FNLINES$(3); TAB(16); "Enter selection or press RETURN if done > ";
  242. 3744 GOSUB 3300 ' selection
  243. 3748 IF SELECTION%=0 THEN RETURN
  244. 3760 ON SELECTION% GOSUB 3768,3772,3776
  245. 3764 GOTO 3706
  246. 3768 PRINT FNLINES$(2); TAB(20);"Enter First Name for SYSOP > ";: MAX%=20:
  247.     GOSUB 500: IF NKEY%=0 THEN RETURN ELSE
  248.     PWD1$=ANSWER$: CHANGED%=1: RETURN
  249. 3772 PRINT FNLINES$(2); TAB(20); "Enter Last Name for SYSOP > ";: MAX%=20:
  250.     GOSUB 500: IF NKEY%=0 THEN RETURN ELSE
  251.     PWD2$=ANSWER$: CHANGED%=1:RETURN
  252. 3776 GOSUB 3100: GOSUB 1800: PWD3$=ANSWER$: CHANGED%=1: RETURN
  253. 4700 '
  254. 4705 '    pause 
  255. 4710 '
  256. 4715 PRINT TAB(25);
  257. 4720 LINE INPUT "Press RETURN to continue."; A$
  258. 4725 RETURN
  259. 5000 '
  260. 5005 '    test that user is the SYSOP
  261. 5010 '1.1
  262. 5015 OPEN "I", #1, DEFDRIVE$+"LASTCALR"
  263. 5017    IF NOFILE%= 1 THEN CLOSE #1:RETURN
  264. 5020    INPUT #1, FRNAME$,LNAME$,ACLVL%
  265. 5025 CLOSE #1
  266. 5030 IF FRNAME$+LANME$ = "SYSOP" AND ACLVL% => 9 THEN
  267.     SYSOP%=1 ELSE SYSOP%=0
  268. 5035 RETURN
  269. 5100 '
  270. 5105 '    Subsystem Configurator - Main menu
  271. 5110 ' 1.3
  272. 5115 GOSUB 3100    'clear
  273. 5120 PRINT
  274. 5125 PRINT TAB(30);"Signon Subsystem Configurator"
  275. 5130 PRINT TAB(30);"<version ";VERSION$;">"
  276. 5135 PRINT
  277. 5140 PRINT TAB(20);"a    SYSOP Passwords"
  278. 5145 PRINT TAB(20);"b    Qualification options"
  279. 5150 PRINT TAB(20);"c    File names"
  280. 5155 PRINT TAB(20);"d    Authorization Editor"
  281. 5160 PRINT TAB(20);"e    Set Subsystem parameters"
  282. 5165 PRINT TAB(20);"f    Testing options"
  283. 5170 PRINT TAB(20);"g    Hardware parameters"
  284. 5180 PRINT: PRINT TAB(20);"q    Leave Configurator"
  285. 5181 PRINT TAB(20);"r    Go back to subsystem manager"
  286. 5185 PRINT:PRINT TAB(25);"Press the letter of your selection > ";
  287. 5190 GOSUB 3300    'selector
  288. 5195 RETURN
  289. 5200 '
  290. 5204 '    make textfile$ array
  291. 5208 '
  292. 5212 TEXTFILE$(1)=BULLFILE$
  293. 5216 TEXTFILE$(2)=SUCESSFILE$
  294. 5220 TEXTFILE$(3)=OPTIONFILE$
  295. 5224 TEXTFILE$(4)=INSTRFILE$
  296. 5228 TEXTFILE$(5)=NEWCOMFILE$
  297. 5232 TEXTFILE$(6)=NOACCESSFILE$
  298. 5236 TEXTFILE$(7)=EXITFILE$
  299. 5240 TEXTFILE$(8)=SPECIALFILE$
  300. 5244 RETURN
  301. 5300 '
  302. 5304 '    exit subsystem configurator
  303. 5308 ' 1.0
  304. 5312 GOSUB 5900    'put PWDFILE$
  305. 5316 END
  306. 5400 '
  307. 5402 '    edit file names
  308. 5404 ' 1.3
  309. 5406 GOSUB 3100    'clear
  310. 5408 PRINT TAB(15);"Names of various files"
  311. 5410 PRINT
  312. 5412 PRINT TAB(20);"a    This bulletin is a always     : ";TEXTFILE$(1)
  313. 5414 PRINT TAB(20);"    printed before signing on."
  314. 5416 PRINT TAB(20);"b    This message is always        : ";TEXTFILE$(2)
  315. 5418 PRINT TAB(20);"    printed after signon."
  316. 5420 PRINT TAB(20);"c    This message is printed before: ";TEXTFILE$(3)
  317. 5422 PRINT TAB(20);"    leaving if requested."
  318. 5424 PRINT TAB(20);"d    Displayed just before the     : ";TEXTFILE$(4)
  319. 5426 PRINT TAB(20);"    user enters CP/M."
  320. 5428 PRINT TAB(20);"e    This is the message given to  : ";TEXTFILE$(5)
  321. 5430 PRINT TAB(20);"    new users, on their first time."
  322. 5432 PRINT TAB(20);"f    This is the message file given: ";TEXTFILE$(6)
  323. 5434 PRINT TAB(20);"    to a non-user attempting access."
  324. 5436 PRINT TAB(20);"g    This is the message given a   : ";TEXTFILE$(7)
  325. 5438 PRINT TAB(20);"    user when leaving the system."
  326. 5440 PRINT TAB(20);"h    Message for special users     : ";TEXTFILE$(8)
  327. 5442 PRINT TAB(20);"    above access level";SPECIALEVEL%
  328. 5444 PRINT TAB(20);"i    Run name of BYEXX.ASM program : ";BYEPROG$;".COM"
  329. 5446 PRINT TAB(20);"j    Run name of FINISH program    : ";FINISHFILE$;".COM"
  330. 5448 PRINT:PRINT TAB(15);"Type letter or RETURN for main menu > ";
  331. 5450 GOSUB 3300    'selector
  332. 5452 IF SELECTION%=0 THEN RETURN
  333. 5454 IF SELECTION% = 9 THEN
  334.     PRINT FNLINES$(1);TAB(20); "BYE program name (omit .COM) > ";:
  335.     MAX%=8: GOSUB 500: IF NKEY%=0 THEN RETURN
  336.     ELSE BYEPROG$=ANSWER$: GOTO 5400
  337. 5456 IF SELECTION% = 10 THEN
  338.     PRINT FNLINES$(1);TAB(20); "Runtime name you've selected for the":
  339.     PRINT TAB(20);"SIGNON module 'FINISH' (omit .COM) > ";:
  340.     MAX%=8: GOSUB 500: IF NKEY%=0 THEN RETURN
  341.     ELSE FINISHFILE$=ANSWER$: GOTO 5400
  342. 5458 PRINT FNLINES$(1); TAB(20);"Type NONE if no file."
  343. 5460 IF SELECTION% > 9 THEN GOTO 5400
  344. 5462 MAX%=0
  345. 5464 PRINT FNLINES$(1); "New file name > ";: GOSUB 500
  346. 5466 IF NKEY%=0 THEN GOTO 5400
  347. 5468 IF ANSWER$=CHR$(&H1B) THEN
  348.     TEXTFILE$(SELECTION%)="NONE": GOSUB 3100: GOSUB 3100: GOTO 5400
  349.     ELSE FIRST$=ANSWER$
  350. 5470 MAX%=7: GOSUB 500
  351. 5472 TEXTFILE$(SELECTION%)=FIRST$+ANSWER$
  352. 5474 GOTO 5400
  353. 5900 '
  354. 5904 '    put and close PWDFILE$
  355. 5908 ' 1.11
  356. 5912 CLOSE
  357. 5916 RO%=0: FCBNAME$=PWDFILE$: GOSUB 2300
  358. 5920 OPEN "O", #1, DEFDRIVE$+PWDFILE$
  359. 5924 PRINT #1, PWD1$;",";PWD2$;",";PWD3$;",";ALLOWNEW%;SIGNONMESS$;
  360.     ",";OPTIONMESS$
  361. 5928 PRINT #1, TEXTFILE$(1);",";
  362.     TEXTFILE$(2);",";
  363.     TEXTFILE$(3);",";
  364.     TEXTFILE$(4);",";
  365.     TEXTFILE$(5);",";
  366.     TEXTFILE$(6);",";
  367.     TEXTFILE$(7);",";
  368.     TEXTFILE$(8)
  369. 5932 PRINT #1, PWDACL%; MAXPW%; SYSOPSLVL%; USERNUMBER%; DENIEDCOMMENT%
  370. 5936 PRINT #1, CLEARSCR$;",";NOCLOCK%;SPECIALEVEL%
  371. 5940 PRINT #1,MUSTQUALIFY%;",";QUALQUESTION$;",";QUALANSWER1$;",";
  372.         QUALANSWER2$;",";QUALNONPWD%;",";MGRDRIVE$
  373. 5944 PRINT #1, SKIPFILES%, RAMPOKE%, RAMPOKEADDRESS%, TESTADDRESS
  374. 5948 PRINT #1,BYEPOKE%,BYEPARAMS%;",";BYEPROG$;",";FINISHFILE$
  375. 5952 PRINT #1,SYSOPONLY%,WHEELOPTION%,WHEEL%,RESTRICT%,UNRESTRICT%,
  376.     MODEMCTLOPT%
  377. 5956 FOR INDEX%=0 TO 5
  378. 5960    FOR I%=0 TO 10
  379. 5964        PRINT #1, ACLARRAY%(INDEX%,I%)
  380. 5968    NEXT I%
  381. 5972 NEXT INDEX%
  382. 5976 PRINT #1, MODEMPORT%, DISCONNECT%, PAGESIZE%
  383. 5980 PRINT #1, STATUSLINE%;STATLEN%;",";STATINIT$;",";STATEND$;",";STATQUIT$;
  384.     ",";STATDATA%;",";STATSTATUS%;",";STATRDY%;",";STATPOLARITY%
  385. 5984 CLOSE #1
  386. 5988 RO%=1: FCBNAME$=PWDFILE$: GOSUB 2300
  387. 5992 RETURN
  388. 6900 '
  389. 6903 '    testing Subsystem options
  390. 6906 '
  391. 6909 GOSUB 3100
  392. 6912 PRINT: PRINT  TAB(20);"a    System clock available: ";
  393.     FNONOFF$(1 XOR NOCLOCK%)
  394. 6915 PRINT:PRINT TAB(20);"b    Address of DRIVER module: ";
  395.     HEX$(TESTADDRESS)+"H"
  396. 6918 PRINT:PRINT TAB(20);"c    Drive for Subsystem manager disk: "; MGRDRIVE$
  397. 6921 PRINT:PRINT TAB(20);"d    Poke parameters into BYE: ";
  398.     FNONOFF$(BYEPOKE%)
  399. 6924 GOSUB 3300
  400. 6927 IF SELECTION%=0 THEN RETURN
  401. 6930 ON SELECTION% GOSUB 6936,6942,6960,6975
  402. 6933 CHANGED%=1: GOTO 6900
  403. 6936 IF NOCLOCK%=0 THEN NOCLOCK%=1 ELSE NOCLOCK%=0
  404. 6939 RETURN
  405. 6942 PRINT:
  406.     PRINT TAB(20);"This address is where you put the assembly langauge":
  407.     PRINT TAB(20);"module DRIVER, used when testing the Subsystem":
  408.     PRINT TAB(20);"with the interpreter."
  409. 6945 PRINT:PRINT TAB(20);"Enter new adress in decimal or hex> ";:
  410.     MAX%=5: GOSUB 500
  411. 6948 IF NKEY%=0 THEN RETURN
  412. 6951 GOSUB 3000
  413. 6954 TESTADDRESS=ANSWER
  414. 6957 RETURN
  415. 6960 PRINT:PRINT TAB(20);"This is the drive where you put the Subsystem":
  416.     PRINT TAB(20);"Manager disk.  Usually B.":
  417.     PRINT:PRINT TAB(20);"Type letter of drive > ";
  418. 6963 MAX%=0: GOSUB 700
  419. 6966 IF NKEY%=0 THEN RETURN
  420. 6969 MGRDRIVE$=ANSWER$+":"
  421. 6972 RETURN
  422. 6975 '
  423. 6978 GOSUB 3100
  424. 6981 PRINT FNLINES$(3);  TAB(20);"a    Poke parameters into bye: ";
  425.     FNONOFF$(BYEPOKE%)
  426. 6984 IF BYEPOKE%<>0 THEN 
  427.     PRINT : PRINT ;TAB(20);"b    Number of parameters: ";BYEPARAMS%
  428. 6987 PRINT:PRINT TAB(20);"Type letter > ";
  429. 6990 GOSUB 3300: IF SELECTION%=0 THEN RETURN
  430. 6993 IF SELECTION%=2 THEN
  431.     PRINT TAB(20); "Number of parameters to poke > ";:
  432.     MAX%=2: GOSUB 500:
  433.     IF NKEY%=0 THEN GOTO 6900
  434.         ELSE
  435.         BYEPARAMS%=VAL(ANSWER$):
  436.         GOTO 6975
  437. 6996 IF SELECTION% <> 1 THEN 6975
  438. 6999 IF BYEPOKE%=0 THEN BYEPOKE%=1: GOTO 6975 ELSE
  439.      BYEPOKE%=0: GOTO 6975
  440. 7200 '
  441. 7205 '    jumpout to POSYS
  442. 7210 ' 1.1
  443. 7211 GOSUB 5900
  444. 7215 RUN MGRDRIVE$+POSYSFILE$
  445. 7225 RETURN
  446. 7300 '
  447. 7304 '    edit subsystem configuration parameters
  448. 7308 ' 1.4
  449. 7312 GOSUB 3100    'clear
  450. 7316 PRINT TAB(20);"Misc. Parameters Menu"
  451. 7320 PRINT FNLINES$(2)
  452.      TAB(10);"a    Allow new users:";TAB(57); FNONOFF$(ALLOWNEW%)
  453. 7324 PRINT TAB(10);"b    Maximum access level without password:";
  454.     TAB(57);PWDACL%
  455. 7328 PRINT TAB(10);"c    Access level that SYSOP gets:";
  456.     TAB(57);SYSOPSLVL%
  457. 7332 PRINT TAB(10);"d    Clear screen string:"; TAB(57);
  458. 7336 FOR INDEX%=1 TO LEN(CLEARSCR$):
  459.     PRINT FNMAKEHEX$(CLEARSCR$,INDEX%,2);:
  460.     NEXT INDEX%
  461. 7340 PRINT: PRINT TAB(10);"e    Number of tries to get password correct:";
  462.                 TAB(57);MAXPW%
  463. 7344 PRINT TAB(10);"f    User number of ancillary files:";
  464.     TAB(57);USERNUMBER%
  465. 7348 PRINT TAB(10);"g    Signon message:"
  466. 7352 PRINT TAB(24);"    ";SIGNONMESS$
  467. 7356 PRINT TAB(10);"h    Ask for optional file message:"
  468. 7360 PRINT TAB(24);"    ";OPTIONMESS$
  469. 7364 PRINT TAB(10);"i    Skip printing of message files:";
  470.     TAB(57);FNONOFF$(SKIPFILES%)
  471. 7368 PRINT TAB(10);
  472.     "j    Special users access level (minimum):";
  473.     TAB(57); SPECIALEVEL%
  474. 7369 PRINT TAB(10);"k    Allow only SYSOP to use utilities:    ";
  475.     FNONOFF$(SYSOPONLY%)
  476. 7370 PRINT TAB(10);"l        Page size for listings:        ";PAGESIZE%
  477. 7372 PRINT
  478. 7376 PRINT TAB(15);"Type letter of item to change or RETURN for main menu."
  479. 7380 GOSUB 3300    'selector
  480. 7384 IF SELECTION%=0 THEN RETURN
  481. 7388 ON SELECTION% GOSUB 7400,7405,7411,7417,7434,7441,7422,7428,7447,7449,
  482.     7455,7460
  483. 7392 CHANGED%=CHANGED%+1
  484. 7396 GOTO 7300
  485. 7400 '    
  486. 7401 '    subsystem editor handler
  487. 7402 '1.2
  488. 7403 IF ALLOWNEW%<>0 THEN ALLOWNEW%=0 ELSE ALLOWNEW%=1
  489. 7404 RETURN
  490. 7405 PRINT:PRINT TAB(20); "Users with this access level or below"
  491. 7406 PRINT TAB(20);"do not require a password to access the system."
  492. 7407 PRINT:PRINT TAB(20);"Enter new access level > ";
  493. 7408 MAX%=3: GOSUB 500
  494. 7409 IF NKEY%<>0 THEN PWDACL%=VAL(ANSWER$)
  495. 7410 RETURN
  496. 7411 PRINT:PRINT TAB(20);"The SYSOP is automatically assigned this"
  497. 7412 PRINT TAB(20);"when he signs in."
  498. 7413 PRINT:PRINT TAB(20);"Enter new SYSOP access level > ";
  499. 7414 MAX%=3:GOSUB 500
  500. 7415 IF NKEY%<>0 THEN SYSOPSLVL%=VAL(ANSWER$)
  501. 7416 RETURN
  502. 7417 PRINT:PRINT TAB(20);"Type the characters that are used to clear"
  503. 7418 PRINT TAB(20);"the screen for your terminal then press RETURN > ";
  504. 7419 MAX%=3: CTRLOK%=1: GOSUB 500
  505. 7420 IF NKEY%<>0 THEN CLEARSCR$=ANSWER$
  506. 7421 RETURN
  507. 7422 PRINT:PRINT TAB(20); "This message is printed before the signon file"
  508. 7423 PRINT TAB(20);"is printed."
  509. 7424 PRINT:PRINT TAB(15);"New Message > ";
  510. 7425 MAX%=65: KEEPLOWER%=1: GOSUB 500
  511. 7426 IF ANSWER$<>"" THEN SIGNONMESS$=ANSWER$
  512. 7427 RETURN
  513. 7428 PRINT:PRINT TAB(20);"This message is the question asked before"
  514. 7429 PRINT TAB(20);"accepting a yes/no for the optional file."
  515. 7430 PRINT:PRINT TAB(15);"New Message > ";
  516. 7431 MAX%=65: KEEPLOWER%=1: GOSUB 500
  517. 7432 IF ANSWER$<>"" THEN OPTIONMESS$=ANSWER$
  518. 7433 RETURN
  519. 7434 PRINT:PRINT TAB(20);"This is the number of tries that the user gets"
  520. 7435 PRINT TAB(20);"to guess at his password."
  521. 7437 PRINT: PRINT TAB(20);"Type new number of tires > ";
  522. 7438 MAX%=2:  GOSUB 500
  523. 7439 IF NKEY%<>0 THEN MAXPW%=VAL(ANSWER$)
  524. 7440 RETURN
  525. 7441 PRINT:PRINT TAB(20);"This is the cp/m user number for all files,"
  526. 7442 PRINT TAB(20);"except pwds, the configuration file."
  527. 7443 PRINT:PRINT TAB(20);"Type user number > ";
  528. 7444 MAX%=2: GOSUB 500
  529. 7445 IF NKEY%<>0 THEN USERNUMBER%=VAL(ANSWER$)
  530. 7446 RETURN
  531. 7447 IF SKIPFILES%=0 THEN SKIPFILES%=1 ELSE SKIPFILES%=0
  532. 7448 RETURN
  533. 7449 PRINT : PRINT TAB(20);"Minimum level of special users > ";
  534. 7450 MAX%=3
  535. 7451 GOSUB 500
  536. 7452 IF NKEY%<>0 THEN SPECIALEVEL%=VAL(ANSWER$)
  537. 7453 RETURN
  538. 7455 IF SYSOPONLY%=0 THEN SYSOPONLY%=1: RETURN ELSE SYSOPONLY%=0: RETURN
  539. 7460 PRINT:PRINT TAB(10);"Number of lines on a a screen > ";
  540. 7462 MAX%=3: GOSUB 500
  541. 7464 IF NKEY%=0 THEN RETURN
  542. 7466 PAGESIZE%=VAL(ANSWER$): RETURN
  543. 7500 '
  544. 7504 '    new users options
  545. 7508 '
  546. 7512 GOSUB 3100
  547. 7516 PRINT FNLINES$(2); TAB(20);"a    Allow any new users: ";
  548.     FNONOFF$(ALLOWNEW%)
  549. 7528 IF ALLOWNEW%=0 THEN 
  550.     PRINT FNLINES$(3);
  551.     TAB(20);"b    Let denied new users leave a message: ";
  552.     FNONOFF$(DENIEDCOMMENT%)
  553. 7536 PRINT FNLINES$(2); TAB(20);"Press letter > ";
  554. 7540 GOSUB 3300
  555. 7544 IF SELECTION%=0 THEN RETURN
  556. 7548 IF SELECTION% = 1 THEN 
  557.     IF ALLOWNEW%=0 THEN ALLOWNEW%=1 ELSE ALLOWNEW%=0
  558. 7552 IF SELECTION%=2 THEN 
  559.     IF DENIEDCOMMENT%=0 THEN DENIEDCOMMENT%=1 ELSE DENIEDCOMMENT%=0
  560. 7556 RETURN
  561. 7600 '
  562. 7604 '    qualification options
  563. 7608 '
  564. 7612 GOSUB 3100
  565. 7616 PRINT TAB(30);"Qualification Question"
  566. 7624 PRINT FNLINES$(4); TAB(20);"a    Qualification test needed: ";
  567.     FNONOFF$(MUSTQUALIFY%)
  568. 7628 IF MUSTQUALIFY%<>0 THEN GOSUB 7716
  569. 7632 PRINT:PRINT TAB(20);"Press letter or RETURN for last menu > ";
  570. 7636 GOSUB 3300
  571. 7640 IF SELECTION%=0 THEN RETURN
  572. 7644 IF SELECTION%=1 THEN 
  573.     IF MUSTQUALIFY%=0 THEN MUSTQUALIFY%=1: GOTO 7600
  574.      ELSE MUSTQUALIFY%=0 : QUALNONPWD%=0: GOTO 7600
  575. 7648 ON SELECTION% GOSUB 7656,7656,7676,7696,7750
  576. 7649 CHANGED%=1
  577. 7652 GOTO 7600
  578. 7656 PRINT:PRINT TAB(20);"This is the question asked before allowing anyone on."
  579. 7660 PRINT:PRINT TAB(5);"New question > ";
  580. 7664 MAX%=64: KEEPLOWER%=1: GOSUB 700
  581. 7668 IF NKEY%<>0 THEN QUALQUESTION$=ANSWER$
  582. 7672 RETURN
  583. 7676 PRINT:PRINT TAB(20);"This is a correct answer to the question in b above."
  584. 7680 PRINT:PRINT TAB(20);"Type new answer > ";
  585. 7684 MAX%=20: GOSUB 700
  586. 7688 IF NKEY%<>0 THEN QUALANSWER1$=ANSWER$
  587. 7692 RETURN
  588. 7696 PRINT:PRINT TAB(20);"This is an alternate correct answer."
  589. 7700 PRINT:PRINT TAB(20);"Type new alternate answer > ";
  590. 7704 MAX%=20: GOSUB 700
  591. 7708 IF NKEY%<>0 THEN QUALANSWER2$=ANSWER$
  592. 7712 RETURN
  593. 7716 '    this is the rest of the qual menu - shown if qual on
  594. 7717 PRINT:PRINT TAB(20);"b    Qualification question:"
  595. 7720 PRINT TAB(20);"    ";QUALQUESTION$+"?"
  596. 7724 PRINT:PRINT TAB(20);"c    Answer:"
  597. 7728 PRINT TAB(20);"    ";QUALANSWER1$
  598. 7732 PRINT:PRINT TAB(20);"d    Alternate answer:"
  599. 7736 PRINT TAB(20);"    ";QUALANSWER2$    
  600. 7738 PRINT: PRINT TAB(20);"e    Require all users below level ";PWDACL%+1:
  601.     PRINT TAB(20);"    to answer qualification question: ";
  602.     FNONOFF$(QUALNONPWD%)
  603. 7740 RETURN
  604. 7750 IF QUALNONPWD%=0 THEN QUALNONPWD%=1 ELSE QUALNONPWD%=0
  605. 7752 RETURN
  606. 7900 '
  607. 7901 '    hardware dependent paramaters
  608. 7905 gosub 3100
  609. 7910 PRINT fnlines$(10);tab(20);"Please Wait.";
  610. 7920 chain mgrdrive$+"CNFG1.OVR"
  611. 7930 print mgrdrive$+"CNFG1.OVR not found"
  612. 7940 gosub 4700
  613. 7950 return
  614. 10000 '
  615. 10010 '    main program starts here
  616. 10020 ' 1.0
  617. 10031 if pwdsopen% = 0 then GOSUB 1100: pwdsopen%=1 else goto 10070
  618. 10032 IF SYSOPONLY%=1 THEN GOSUB 5000: ELSE SYSOP%=1
  619. 10040 IF NOFILE%=1 THEN LINE INPUT "Password  > ";P$:
  620.     IF P$<> "SIGNON" THEN END
  621. 10050 IF SYSOP%=0 THEN PRINT "CONFIG?": END
  622. 10055 GOSUB 5200
  623. 10070 GOSUB 5100    'make menu selection
  624. 10075 IF SELECTION%=17 GOTO 5300
  625. 10076 IF SELECTION%=18 THEN GOTO 7200
  626. 10080 ON SELECTION% GOSUB 3700,7600,5400,3400,7300,6900,7900
  627. 10090 GOTO 10070
  628. 10100 RETURN
  629. 20000 ' end
  630.