home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol112 / rbbent27.bqs / RBBENT27.BAS
Encoding:
BASIC Source File  |  1985-02-10  |  19.8 KB  |  433 lines

  1. 5 '  ------------->> ENTERBBS V2.7 10/31/81 <<-------------
  2. 9 '
  3. 10 '         (As run on HP/RCPM  312-955-4493,)
  4. 11 '        (slightly cleaned up by Ben Bronson)
  5. 12 '
  6. 15 '   : Entry/name-logging module of RBBS version 2.2,    :
  7. 20 '   : from Howard Moulton's original SJBBS (in Xitan    :
  8. 25 '   : Basic), converted to MBASIC and called RBBS or    :
  9. 30 '   : RIBBS by Bruce Ratoff, and extensively revised/   :
  10. 35 '   : expanded by Ron Fowler to become RBBS22.          :
  11. 40 '   :---------------------------------------------------:
  12. 45 '   : The Fowler version, RBBS22, was split into 2 mod- :
  13. 50 '   : ules, ENTERBBS and MINIRBBS, by Ben Bronson.      :
  14. 55 '   :---------------------------------------------------:
  15. 60 '   : Both were revised and given RBBS-compatible ver-  :
  16. 65 '   : sion nos. in 03/81 by Tim Nicholas, to incorporate:
  17. 70 '   : updates from his version 2.4 of RBBS.             :
  18. 75 '  ------------------------------------------------------
  19. 80 '     Added test for "*" in CALLERS file (from RBBS) and
  20. 85 '     if CALLERS file finds "*" in beginning of caller's
  21. 90 '     name, it will not allow him system access, and log
  22. 95 '     him off immediately. (For those who persist in log-
  23. 100 '     ging in with fictitious names, e.g. BUG BYTE). Also
  24. 105 '     added "PWDS" file (from RBBS) for "P2$" only. So
  25. 110 '     Sysop can get msgs for "SYSOP" or his name.
  26. 115 '     by Tim Nicholas  3/05/81
  27. 120 '    ------------------------------------------------------
  28. 125 '     Changed sequence of response to question "Did I mis-
  29. 130 '     anything?", so that a response other than "Y" or "y"
  30. 135 '     or "N"/"n" will re-ask the question. So in noisy line
  31. 140 '     conditions it won't automaticaly default to "N"/"n".
  32. 145 '     Added suggestion by Ben Bronson to move printing of
  33. 150 '     "BULLETIN" file to after name-taking, and other sign
  34. 155 '     in procedures.  by Tim Nicholas 3/12/81.
  35. 180 '    ------------------------------------------------------ 
  36. 185 '  More modifications by BB (3/14/81): checking-for-msgs
  37. 190 '  code transferred from MINIRBBS, lines 810-965.  No new
  38. 195 '  version number.  AND sysop now drops direct to disk
  39. 200 '  without incrementing COUNTERS.
  40. 205 ' ------------------------------------------------------ 
  41. 210 '  4/10/81 additions: another PWD step for SYSOP to go
  42. 215 '     thru, to discourage villians...
  43. 220 '  4/11/81: Change "SYSOP" to another word, to ditto..
  44. 225 '    (see lines 600-610)
  45. 230 '  5/02/81: add Y/N for skipping BULLETIN
  46. 240 '  5/09/81: add routine for reading special user messages (=SPECIAL) 
  47. 245 '  6/20/81: add putting P$ (SP or RG) into LASTCALR so user 
  48. 246 '    privilege status can be passed to MINIRBBS
  49. 250 '  8/08/81: change special user introduction
  50. 255 '  8/18/81: insert Bill Earnest's routines for counting
  51. 260 '    callers & putting times in USERS, CALLERS, & LASTCALR
  52. 265 '  9/01/81: add Brian Kantor's CHAIN MINIRBBS & system user quiz
  53. 270 '  9/07/81: drop re-caller straight to CP/M
  54. 275 '  9/09/81: CALL TIMEX added (Dummy routine compiled with M80 and
  55. 280 '     linked to the BASCOMed pgm with L80, calling an ASM
  56. 285 '        pgm above CP/M for reading the MH clock; other clocks
  57. 286 '        can probably be handled with direct port reads)
  58. 287 '  9/19/81: Give special (SP) users a command menu 
  59. 288 '  9/10/81: Improve twit sign-out; POKE reset bits for PMMI
  60. 289 '  9/27/81: Add Hank Szyszka's time interval stuff.
  61. 290 '  10/9/81: Add 3rd user category, NW, without direct MINIRBBS access
  62. 291 '  10/10/81: And add cp/m knowledge test at 390 & 32000
  63. 292 '  10/24/81: Limited command menu for RG users too.
  64. 293 '---------------------------------------------------------------------
  65. 294 ' NOTE that user privilege status is read from the USERS file, where
  66. 295 ' the following characters are inserted (with an editor) in the first
  67. 296 ' space of the line:  * = 'Twit',  + = 'Special User',  - = 'Regular
  68. 297 ' User', and (space) = 'New User'
  69. 298 ' NOTE ALSO that the code for other clocks made to run with this program
  70. 299 ' will be welcomed.  Use similar line #s if you can but separate the
  71. 300 ' relevant lines and call the result RBBTIME1.BAS, RBBTIME2.BAS, etc.
  72. 301 '----------------------------------------------------------------------
  73. 302 ' Howard Booker's suggested additions at 13030 are included but in a
  74. 303 ' disabled state.  The pgm will run without them.  But if you set
  75. 304 ' the equates and remove the ', it'll run better...
  76. 305 '----------------------------------------------------------------------
  77. 310 POKE 0,&HCD '<-- Change "JMP" to "CALL" to prevent Ctl-C
  78. 320 DEFINT A-Z
  79. 330 DIM A$(17),M(200,2),H(6),HT(6),HD(6)
  80. 340 INC=1
  81. 350 ON ERROR GOTO 15000
  82. 355 XX=0:YY=0
  83. 360 'TIMEX=&HE800  -disabled Call to MHTIME.COM; unnecessary for most non-MH
  84. 365 'CALL TIMEX     clocks, but you'll have have to modify 14000- & 44000-.
  85. 370 '    
  86. 372 GOSUB 14000:GOSUB 14200   'Set time counters (HK routine)
  87. 374 HT(1)=H(1):HT(2)=H(2):HT(3)=H(3):HT(4)=H(4):HT(5)=H(5):HT(6)=H(6)
  88. 376 M=74:FOR I=1 TO 6:POKE M,HT(I):M=M+1:NEXT I   'Save the time in lo memory
  89. 379 '
  90. 380 '  Signon Functions...
  91. 381 '
  92. 390 GOSUB 32000    'CP/M familiarity test
  93. 400 MSGS=1:CALLS=MSGS+1:MNUM=CALLS+1
  94. 425 BK=0
  95. 430 OPEN "I",1,"A:PWDS":IF EOF(1) THEN 450  '<-- Password file
  96. 440 INPUT #1,P1$,P2$   'use editor to make the file. e.g.: BANANA,APPLE,COW
  97. 450 CLOSE #1
  98. 460 ' BEL=-1:XPR=0 (initial bel on, not expert -- not used here but left for future development)
  99. 470 GOSUB 13020
  100. 480 SAV$=""
  101. 510 OPEN "I",1,"A:LASTCALR":INPUT #1,Y$,Z$:CLOSE
  102. 530 GOSUB 4050:GOSUB 13020   ' Print WELCOME File
  103. 540 BK=0:A$="(Prompting bell means system is ready for input).":GOSUB 13020:GOSUB 13020:XX=0
  104. 550 A$="What is your FIRST name ?":GOSUB 13020:C=1:GOSUB 13260:C=0:N$=B$:IF N$="" THEN 550
  105. 570 IF N$<"A" OR LEN(N$)=1 THEN 550
  106. 580 A1$="What is your LAST name ?":GOSUB 13020:C=1:GOSUB 13260:C=0:O$=B$:IF O$="" THEN 550
  107. 590 IF O$<"A" OR LEN(O$)=1 THEN 550
  108. 591 ' Note that the XXXXX below should be replaced with a codeword of your own.
  109. 592 ' It gets passed thru LASTCALR to MINIRBBS, which replaces it with "SYSOP",
  110. 593 ' a paranoid precaution which could probably be dispensed with....
  111. 595 IF N$<>"XXXXX" THEN 610  
  112. 600 IF N$="XXXXX" AND O$<>P1$ THEN XX=XX+1:IF XX=3 THEN 18100 ELSE 550
  113. 605 IF N$="XXXXX" AND O$=P1$ THEN O$="":A1$="2nd codeword?":GOSUB 13020:C=1:GOSUB 13260:C=0:X$=B$:IF X$=P2$ THEN 730 ELSE 550
  114. 610 IF N$="SYSOP" THEN PRINT:PRINT "You know you're not the SYSOP!!!":PRINT:XX=XX+1:IF XX=3 THEN 18100 ELSE 550   ' pseudo-SYSOP gets logged off on 3rd try
  115. 612 '
  116. 620 A$="Checking user file...":GOSUB 13020:V=0:OPEN "R",1,"A:USERS",62:FIELD#1,50 AS RZ$,4 AS NC$,6 AS DT$:GET#1,1:NU=VAL(RZ$)
  117. 625 FIELD #1,62 AS RR$
  118. 630 FOR I=2 TO NU+1:GET#1,I:IF INSTR(RZ$,N$)>0 AND INSTR(RZ$,O$)>0 THEN MF$=LEFT$(RZ$,1):GOSUB 15990:PUT#1,I:CLOSE:GOSUB 13020:XX=1:GOTO 700
  119. 640 NEXT I   ' If recognized, caller is passed to CALLER-logging routine
  120. 649 ' But a caller not in the USER file gets quizzed further...
  121. 650 V=1:A1$="Where (City,State) are you calling from ?":GOSUB 13020:C=1:GOSUB 13260:C=0:ST$=B$:IF ST$="" THEN 580
  122. 660 A$="Hello "+N$+" "+O$+" from "+ST$:GOSUB 13020
  123. 662 A1$="Is any of this misspelled ?":GOSUB 13020:C=1:GOSUB 13260:C=0
  124. 665 IF LEFT$(B$,1)="Y" THEN 550
  125. 667 IF LEFT$(B$,1)<>"N" THEN 662
  126. 670 A1$="This checking is only done the first time you call.":GOSUB 13020:LSET NC$=MKI$(0)
  127. 680 LSET RZ$="  "+N$+" "+O$+" "+ST$+SPACE$(44):GOSUB 15990:NU=NU+1:PUT#1,NU+1:S$=STR$(NU):GOSUB 16000:PUT#1,1:CLOSE
  128. 690 FIL$="NEWCOM":GOSUB 18000:MF$=" "   '...and made to read the NEWCOMer file
  129. 700 GOSUB 14200    '  Now everybody gets logged to CALLERS
  130. 705 A$="Logging "+N$+" "+O$+" to disk...":N=1:GOSUB 13020:OPEN "R",1,"A:CALLERS",60:FIELD#1,60 AS RR$:GET#1,1
  131. 710 RE=VAL(RR$)+1:S$=STR$(RE):RL=60:GOSUB 16000:PUT#1,1:RE=RE+1
  132. 715 S$=N$+" "+O$+" "+ST$+" "+TI$:GOSUB 16000:PUT#1,RE:CLOSE#1
  133. 719 '  Then twits (with *'s before their names in USERS) get logged off...
  134. 720 IF MF$="*" THEN A$="Goodbye.  Thanks for calling,  "+N$+" "+O$:GOSUB 13020:GOSUB 13020:GOTO 18080
  135. 722 '  while recallers go straight to CP/M.
  136. 723 IF N$=Y$ AND O$=Z$ THEN GOSUB 13020:A$="Welcome back.  Since you just signed off, go straight to CP/M":GOSUB 13020:GOTO 2240
  137. 724 '
  138. 726 '  User privilege level (from USERS) & date (DT$) is added to LASTCALR...
  139. 727 IF MF$="+" THEN F$="SP"
  140. 728 IF MF$=" " THEN F$="NW"
  141. 729 IF MF$="-" THEN F$="RG"
  142. 730 OPEN "O",1,"A:LASTCALR. "+CHR$(&HA0):PRINT #1,N$;",";O$;",";F$;",";DZ$:IF N$="XXXXX" THEN 2240
  143. 739 CLOSE
  144. 740 BK=0:GOSUB 13020:OPEN "R",1,"A:COUNTERS",5:FIELD#1,5 AS RR$
  145. 750 PRINT
  146. 760 A$="You are caller # : ":N=1:GOSUB 13020:GET#1,CALLS
  147. 770 CN=VAL(RR$)+INC:A$=STR$(CN):LSET RR$=A$:GOSUB 13020:PUT#1,CALLS
  148. 790 CLOSE:GOSUB 13020
  149. 792 '  And now the user gets to choose whether to answer the survey at 35000,
  150. 793 IF XX=0 THEN GOSUB 35000:GOTO 2200   'except that new users have no choice
  151. 795 A1$="Have you answered the user survey questions yet?":GOSUB 13020:C=1:GOSUB 13260:C=0
  152. 798 IF LEFT$(B$,1)="N" THEN GOSUB 35000
  153. 799 '
  154. 800 ' The SUMMARY file is now checked for messages to all except new users
  155. 830 '
  156. 835 A1$="Wait a second while I check to see if you have messages waiting ...":GOSUB 13020:GOSUB 13020
  157. 838 L=0
  158. 840 FT=1:MX=0:MZ=0:IU=0: ' (Flag first time for printing heading)
  159. 850 OPEN "R",1,"A:SUMMARY",30:RE=1:FIELD#1,28 AS RR$
  160. 860 BK=0:GET#1,RE:IF EOF(1) THEN 960
  161. 870 G=VAL(RR$):MZ=MZ+1:M(MZ,1)=G:IF G=0 THEN 950
  162. 880 IF IU=0 THEN IU=G
  163. 890 IF G>9998 THEN MZ=MZ-1:GOTO 960
  164. 900 GET#1,RE+3:GOSUB 16500:IF INSTR(S$,N$)>0 AND INSTR(S$,O$)>0 THEN 930
  165. 910 IF N$<>"XXXXX" THEN 950  
  166. 920 IF INSTR(S$,"BEN")=0 THEN 950
  167. 930 IF FT THEN L=L+1
  168. 931 IF FT THEN A$="The following messages for "+N$+" "+O$+" are waiting in MINIRBBS: ":GOSUB 13020:FT=0
  169. 940 A$=STR$(G):N=1:GOSUB 13020:GOSUB 13020
  170. 950 GET#1,RE+5:M(MZ,2)=VAL(RR$):MX=MX+M(MZ,2)+6:RE=RE+6:GOTO 860
  171. 960 IF L=0 THEN PRINT "Nope.  No message addressed to you, "+N$+".":PRINT "But check MINIRBBS anyway for public messages.":GOSUB 13020
  172. 965 CLOSE
  173. 2000 '
  174. 2020 '  Everyone comes here, to get ready to go to CP/M
  175. 2040 '
  176. 2049 '  They get menus according to their status....
  177. 2050 '
  178. 2051 IF MF$<>"+" THEN 2100
  179. 2052 GOSUB 13020:A$="As a special user, you have the following options:":GOSUB 13020:GOSUB 13020
  180. 2053 A$=" CON  Read CONFIDENTIAL msgs    MIN  Go to MINIRBBS":GOSUB 13020
  181. 2054 A$=" NEW  Read NEW program data     CPM  Go straight to CP/M":GOSUB 13020
  182. 2055 A$=" OFF  Log Off immediately":GOSUB 13020
  183. 2056 GOSUB 13020:A1$="Which?":GOSUB 13020:C=1:GOSUB 13260:C=0
  184. 2060 IF B$="CON" THEN 4100   'the SPECIAL file
  185. 2065 IF B$="MIN" THEN CHAIN "MINIRBBS"  'to the message module
  186. 2070 IF B$="NEW" THEN 2220   'the BULLETIN file
  187. 2075 IF B$="CPM" THEN 2230   'the DATA file, then CP/M
  188. 2076 IF B$="OFF" THEN CHAIN "EXITBBSB"  'straight to log-off module
  189. 2080 GOTO 2056
  190. 2099 '
  191. 2100 IF MF$=" " THEN 2200    ' Note that new callers don't get a menu
  192. 2110 GOSUB 13020:A$="Now you can do one of the following:":GOSUB 13020:GOSUB 13020
  193. 2120 A$=" NEW  Read about NEW programs    CPM  Go straight to CP/M":GOSUB 13020
  194. 2125 A$=" MIN  Go to message subsystem    OFF  Log Off immediately":GOSUB 13020
  195. 2130 GOSUB 13020:A1$="Which do you want? ":GOSUB 13020:C=1:GOSUB 13260:C=0
  196. 2135 IF B$="MIN" THEN CHAIN "MINIRBBS"
  197. 2140 IF B$="NEW" THEN 2220    ' RG callers can do everything SP callers can
  198. 2145 IF B$="CPM" THEN 2230    ' except read the SPECIAL file
  199. 2150 IF B$="OFF" THEN CHAIN "EXITBBSB"
  200. 2160 GOTO 2130
  201. 2170 '
  202. 2197 ' To discourage new callers from thinking this is a bulletin board system,
  203. 2198 ' this is the only choice they get
  204. 2199 '
  205. 2200 GOSUB 13020:A1$="Want data on the latest programs before entering CP/M?":GOSUB 13020:C=1:GOSUB 13260:C=0
  206. 2210 IF LEFT$(B$,1)="N" THEN 2230
  207. 2215 IF LEFT$(B$,1)<>"Y" THEN 2200
  208. 2220 GOSUB 3040 ' Print BULLETIN file
  209. 2225 IF MF$="+" THEN 2052
  210. 2226 IF MF$="-" THEN 2110
  211. 2230 GOSUB 4070 ' Print DATA file for everyone, including SP & RG callers
  212. 2235 CLOSE ' (just in case any files are still open)
  213. 2237 GOTO 44620  ' Then to the time-on-system routine, and then...
  214. 2240 GOSUB 13020:POKE 4,0:A$="Entering CP/M...":GOSUB 13020
  215. 2260 POKE 0,&HC3:SYSTEM ' we restore the "JMP" and go to CP/M.
  216. 3000 '
  217. 3010 ' The main program has now ended.  It's just subroutines from here on
  218. 3015 '
  219. 3020 ' The display BULLETIN file subroutine
  220. 3040 '
  221. 3060 GOSUB 12220
  222. 3080 FIL$="BULLETIN":GOSUB 18000:RETURN
  223. 4000 '
  224. 4020 ' The display WELCOME file subroutine
  225. 4030 '
  226. 4050 GOSUB 12220
  227. 4060 FIL$="WELCOME":GOSUB 18000:RETURN
  228. 4065 '
  229. 4070 ' The display DATA file subroutine*
  230. 4075 '
  231. 4080 GOSUB 12220
  232. 4090 FIL$="DATA":GOSUB 18000:RETURN
  233. 4095 '
  234. 4100 ' The display SPECIAL file subroutine*
  235. 4120 '
  236. 4140 GOSUB 12220
  237. 4160 FIL$="SPECIAL":GOSUB 18000:GOTO 2052
  238. 5000 '
  239. 12220 RETURN
  240. 12999 '
  241. 13000 A$="Use ctl-K to abort, ctl-S to pause."
  242. 13020 '
  243. 13026 ' In the following lines, substitute the &HC1 and &H01 for your
  244. 13027 ' modem and keyboard data input ports respectively 
  245. 13028 ' (REMOVE THE ' IN THE NEXT 2 LINES IF YOU WANT TO USE THEM)
  246. 13029 '
  247. 13030 ' IF INP(&HC1) AND 127=11 THEN BK=-1    'here, the PMMI data port
  248. 13032 ' IF INP(&H01) AND 127=11 THEN BK=-1
  249. 13033 '
  250. 13040 ' Routine to print string from A$ on console
  251. 13060 '
  252. 13080 IF SAV$<>"" AND A1$<>"" THEN A1$="":RETURN
  253. 13100 IF A1$<>"" THEN A$=A1$:A1$=""
  254. 13120 IF RIGHT$(A$,1)="?" OR N=1 THEN PRINT A$;:PP$=A$:GOTO 13180
  255. 13140 BI=ASC(INKEY$+" "):IF BI=19 THEN BI=ASC(INPUT$(1))
  256. 13160 IF BI=11 THEN BK=-1:GOTO 13220 ELSE PRINT A$
  257. 13180 A=A+LEN(A$)
  258. 13220 A$="":N=0
  259. 13240 RETURN
  260. 13260 '
  261. 13280 ' Routine to accept string into B$ from console
  262. 13300 '
  263. 13320 IF BEL AND SAV$="" THEN PRINT CHR$(7);
  264. 13340 B$="":BK=0
  265. 13360 IF SAV$="" THEN LINE INPUT SAV$
  266. 13380 SP=INSTR(SAV$,";"):IF SP=0 THEN B$=SAV$:SAV$="":GOTO 13420
  267. 13400 B$=LEFT$(SAV$,SP-1):SAV$=MID$(SAV$,SP+1)
  268. 13420 IF LEN(B$)=0 THEN RETURN
  269. 13440 IF C=0 THEN 13480
  270. 13460 FOR ZZ=1 TO LEN(B$):MID$(B$,ZZ,1)=CHR$(ASC(MID$(B$,ZZ,1))+32*(ASC(MID$(B$,ZZ,1))>96)):NEXT ZZ
  271. 13480 IF LEN(B$)<63 THEN 13580
  272. 13500 A$="Input line too long - would be truncated to:":GOSUB 13020
  273. 13520 B$=LEFT$(B$,62):PRINT B$
  274. 13540 LINE INPUT "Retype line (Y/N)?";QQ$:GOSUB 35600:QQ$=LEFT$(QQ$,1)
  275. 13560 IF QQ$="Y" OR QQ$="y" THEN PRINT PP$;:SAV$="":GOTO 13260
  276. 13580 D=D+LEN(B$):RETURN
  277. 13600 RETURN
  278. 13620 '
  279. 14000 ' Date getting subroutine
  280. 14010 ' (being read from MHTIME.COM running at E800H; you may be able to
  281. 14020 '  read the date directly from your clock's ports)
  282. 14030 '
  283. 14040 DM$=MID$(STR$(PEEK(&HEB13)),2)
  284. 14045 DD$=MID$(STR$(PEEK(&HEB14)),2)
  285. 14055 DT$=DM$+"/"+DD$
  286. 14060 DZ$=DM$+"/"+DD$+"/"+RIGHT$(STR$(81),2)
  287. 14090 RETURN
  288. 14100 ' 
  289. 14200 ' Time-finding subroutine
  290. 14205 '
  291. 14210 C=32 : ' C=CLOCK PORT (20H)
  292. 14220 ' This is a mountain hardware clock with ports for each time digit
  293. 14230 H(1)=INP(C+9) AND 15:H(2)=INP(C+8) AND 15
  294. 14240 H(3)=INP(C+7) AND 15:H(4)=INP(C+6) AND 15
  295. 14250 H(5)=INP(C+5) AND 15:H(6)=INP(C+4) AND 15
  296. 14255 '
  297. 14257 DS=(H(5)*10)+H(6) 
  298. 14260 DH=(H(1)*10)+H(2)
  299. 14265 DM=(H(3)*10)+H(4)
  300. 14269 DH$=STR$(DH)
  301. 14270 DI$=STR$(DM)
  302. 14275 DS$=STR$(DS)
  303. 14280 TI$=DD$+"-"+RIGHT$(DH$,2)+":"+RIGHT$(DI$,2)
  304. 14285 TD$=DH$+":"+RIGHT$(DI$,2)+":"+RIGHT$(DS$,2)
  305. 14290 RETURN
  306. 14999 '
  307. 15000 ' The ON-ERROR handler...
  308. 15001 '
  309. 15020 IF ERL=18030 THEN RESUME 18050
  310. 15030 IF ERL=700 THEN RE=0:RESUME 710
  311. 15100 RESUME NEXT
  312. 15887 '
  313. 15888 ' Small routine for writing date, etc., to USERS file (see lines 630 & 680))
  314. 15889 '
  315. 15990 S$=LEFT$(RZ$,50)+RIGHT$("   "+STR$(VAL(NC$)+1),4)+" "+RIGHT$("0"+DM$,2)
  316. 15992 S$=S$+"/"+RIGHT$("0"+DD$,2):RL=62   ' (now fall thru...).
  317. 16000 '
  318. 16010 ' Fill and store disk record...
  319. 16020 '
  320. 16030 LSET RR$=LEFT$(S$+SPACE$(RL-2),RL-2)+CHR$(13)+CHR$(10)
  321. 16040 RETURN
  322. 16500 '
  323. 16510 ' Unpack disk record...
  324. 16520 '
  325. 16530 ZZ=LEN(RR$)-2
  326. 16540 WHILE MID$(RR$,ZZ,1)=" "
  327. 16550 ZZ=ZZ-1:IF ZZ=1 THEN 16570
  328. 16560 WEND
  329. 16570 S$=LEFT$(RR$,ZZ)
  330. 16580 IF MID$(S$,ZZ,1)="?" THEN S$=S$+" "
  331. 16590 RETURN
  332. 17000 '
  333. 17010 ' Toggle expert user mode
  334. 17020 '
  335. 17030 ' XPR=NOT XPR:RETURN  (inactivated here but kept for future use)
  336. 17040 '
  337. 17050 ' Toggle bell prompt
  338. 17060 '
  339. 17070 ' BEL=NOT BEL:RETURN  (ditto)
  340. 18000 '
  341. 18010 ' Subroutine to print a file
  342. 18020 '
  343. 18030 OPEN "I",1,"A:"+FIL$:BK=0
  344. 18040 IF EOF(1) OR BK THEN 18050 ELSE LINE INPUT #1,A$:GOSUB 13020:GOTO 18040
  345. 18050 CLOSE #1:RETURN
  346. 18060 '
  347. 18070 '
  348. 18080 ' Subroutine to log off an unwanted caller (=twit)
  349. 18090 '
  350. 18100 '
  351. 18120 OUT 195,0 '<-- Turn off PMMI to disconnect the line.
  352. 18130 POKE 0,&HC3 '<-- Restore the "jump" at BASE for CP/M.
  353. 18140 SYSTEM
  354. 19000 '  
  355. 32000 '  The CP/M familiarity testing routine  (feel free to make changes)
  356. 32001 '
  357. 32010 XX=0
  358. 32020 GOSUB 13020: A1$="What is the name of Digital Research's standard debugger?":GOSUB 13020:C=1:GOSUB 13260:C=0
  359. 32040 IF B$="DDT" THEN 32400
  360. 32050 IF B$="ddt" THEN 32400
  361. 32060 XX=XX+1:IF XX=2 THEN 18080   ' Log the caller off...
  362. 32080 PRINT "One more try...":GOTO 32020
  363. 32400 RETURN
  364. 32499 '
  365. 35000 '   BK's system user survey module  (again, make changes)
  366. 35001 '
  367. 35002 PRINT:PRINT "     ***   SYSTEM USER SURVEY  ***"
  368. 35005 OPEN "R",1,"A:SURVEY.BBS",40:FIELD#1,40 AS RR$:GET#1,1
  369. 35006 RE=VAL(RR$)+1
  370. 35007 IF RE=1 THEN RE=2
  371. 35008 S$=N$+" "+O$+" "+DZ$
  372. 35009 GOSUB 35200
  373. 35010 GOSUB 13020:GOSUB 13020:A$="Skip questions you don't feel like answering.  But more data"
  374. 35020 GOSUB 13020:A$="about your system will help make this system better":GOSUB 13020
  375. 35025 PRINT:PRINT "(Keep each answer to 34 chars. max.)"
  376. 35026 PRINT "(There are 8 questions in all)":PRINT
  377. 35030 PRINT "What kind of computer (or terminal) are you using? (S-100, Apple,"
  378. 35035 PRINT "  TRS-80, etc.; if S-100, which controller & CPU card?":GOSUB 35600:Q$=" 1":GOSUB 35100
  379. 35040 PRINT "With which operating systems? (CP/M 1.4?  CP/M 2.x?  TRS-DOS?"
  380. 35045 PRINT "  PASCAL?  More than one?)":GOSUB 35600:Q$=" 2":GOSUB 35100
  381. 35050 PRINT "How about the modem?  What brand & baud rate(s)?":GOSUB 35600:Q$=" 3":GOSUB 35100
  382. 35060 PRINT "Where did you learn of this system":PRINT " (If a BBS, which one)? ":GOSUB 35600:Q$=" 4":GOSUB 35100
  383. 35070 PRINT "Do you work with computers professionally?  Which kind?":GOSUB 35600:Q$=" 5":GOSUB 35100
  384. 35080 PRINT "How long have you been involved with microcomputers?":GOSUB 35600:Q$=" 6":GOSUB 35100
  385. 35085 PRINT "If you write your own programs, which languages do you usually use?":GOSUB 35600:Q$=" 7":GOSUB 35100
  386. 35090 PRINT "Are you interested in 16-bit CPUs or other"
  387. 35091 PRINT "  leading-edge equipment & software?  Which?":GOSUB 35600:Q$=" 8":GOSUB 35100
  388. 35092 PRINT "If you'd care to give details, leave a msg in MINIRBBS"
  389. 35094 S$=STR$(RE)
  390. 35095 GOSUB 16000
  391. 35096 PUT#1,1
  392. 35097 CLOSE
  393. 35098 PRINT:PRINT "Thanks for the information.  Now back to the log-in routine...":PRINT:RETURN
  394. 35100 ' PUT IN FILE
  395. 35120 GOSUB 13280:IF B$="" THEN S$="<omitted>" ELSE S$=B$
  396. 35140 S$=Q$+": "+S$
  397. 35200 RL=40
  398. 35220 GOSUB 16000
  399. 35240 PUT#1,RE
  400. 35260 RE=RE+1
  401. 35280 RETURN
  402. 35600 PRINT "----------------------------------|"
  403. 35620 RETURN
  404. 44620 '  Routines for printing the time & time-on-system 
  405. 44625 '   (for MH clock, but adaptable for other clocks)
  406. 44630 '    a. Print just time
  407. 44640 GOSUB 14200  
  408. 44650 PRINT "The time now is (Hrs:Mins:Secs)...."TD$
  409. 44659 '    b. Print elapsed time too
  410. 44660 GOSUB 44940
  411. 44670 GOTO 2240
  412. 44830 '    (calculate the time difference...)
  413. 44840 IF H(6)<HT(6) THEN H(6)=H(6)+10:H(5)=H(5)-1
  414. 44850 IF H(5)<HT(5) THEN H(5)=H(5)+6:H(4)=H(4)-1
  415. 44860 IF H(4)<HT(4) THEN H(4)=H(4)+10:H(3)=H(3)-1
  416. 44870 IF H(3)<HT(3) THEN H(3)=H(3)+6:H(2)=H(2)-1
  417. 44880 IF H(2)<HT(2) THEN H(2)=H(2)+10:H(1)=H(1)-1
  418. 44890 HD(6)=H(6)-HT(6):HD(5)=H(5)-HT(5):HD(4)=H(4)-HT(4)
  419. 44900 HD(3)=H(3)-HT(3):HD(2)=H(2)-HT(2):HD(1)=H(1)-HT(1)
  420. 44910 RETURN
  421. 44920 INPUT "TIME= H,H,M,M,S,S ";HT(1),HT(2),HT(3),HT(4),HT(5),HT(6)
  422. 44930 INPUT "LATER TIME H,H,M,M,S,S ";H(1),H(2),H(3),H(4),H(5),H(6)
  423. 44940 GOSUB 44830
  424. 44950 PRINT "You've been on the system for...... ";
  425. 44960 TF$="#"
  426. 44970 FOR I=1 TO 6
  427. 44980 PRINT USING TF$;HD(I);
  428. 44990 IF I=2 THEN PRINT ":";
  429. 45000 IF I=4 THEN PRINT ":";
  430. 45010 NEXT I
  431. 45020 PRINT
  432. 45030 RETURN
  433.