trivia.9 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. TITLE TRIVIA startup
  2. .MLLIT==1
  3. TTYCHN==1
  4. SAVCHN==2
  5. MUDCHN==3
  6. DSKCHN==4
  7. A=1
  8. B=2
  9. C=3
  10. TIME=3
  11. NOW=4
  12. XUNAME=5
  13. P=17
  14. VBPTR: 440700,,A
  15. VSBPTR: 140600,,B
  16. DSKDEV: SIXBIT /DSK/
  17. MSGDIR: SIXBIT /_MSGS_/
  18. BADNAM: SIXBIT /BADBOY/
  19. BADDIR: SIXBIT /VANISH/
  20. SXUNAM: BLOCK 2
  21. START: MOVE P,[-30,,PDL-1]
  22. .OPEN TTYCHN,[SIXBIT / !TTY/]
  23. .LOSE 1000
  24. .SUSET [.RXUNAME,,XUNAME]
  25. LDB A,[063600,,XUNAME]
  26. CAME A,[SIXBIT / GUEST/]
  27. CAMN A,[SIXBIT / LUSER/]
  28. JRST LOSNAM
  29. CAMN A,[SIXBIT / CHEAT/]
  30. JRST LOSNAM
  31. LDB A,[063000,,A]
  32. CAMN A,[SIXBIT / TRIV/]
  33. JRST LOSNAM
  34. HLRZ A,XUNAME
  35. CAIN A,777777
  36. JRST LOGIN
  37. .CALL DEATH
  38. JRST CKUSER
  39. .CALL [SETZ ; GET FILE LENGTH IN A
  40. SIXBIT /FILLEN/
  41. MOVEI DSKCHN
  42. SETZM A]
  43. JRST FAKMSG
  44. CAIN A,
  45. JRST FAKMSG
  46. MOVE B,BUFPTR
  47. .IOT DSKCHN,B
  48. .CLOSE DSKCHN,
  49. MOVE B,[440700,,BUF]
  50. MSGDTH: PUSHJ P,OUTMSG
  51. MSGEND: CAME XUNAME,[SIXBIT /TAA/]
  52. CAMN XUNAME,[SIXBIT /MARC/]
  53. JRST WIN
  54. .BREAK 16,140000
  55. FAKMSG: MOVE B,[440700,,MSG]
  56. .CLOSE DSKCHN,
  57. JRST MSGDTH
  58. CKUSER: .CALL DIROPN ; REAL PERSON?
  59. JRST CKTIME ; NOPE
  60. .CALL MSGOPN ; REALLY A REAL PERSON?
  61. JRST LOSNAM
  62. .CLOSE DSKCHN,
  63. WIN: MOVE B,[440700,,STMSG]
  64. PUSHJ P,OUTMSG
  65. .CALL SAVOPN
  66. .VALUE [ASCIZ /: No SAVE file?
  67. 
  68. /]
  69. .IOT SAVCHN,[-1,,A]
  70. MOVSI B,SIXBIT / MUD/
  71. ILDB C,VBPTR
  72. SUBI C,40
  73. DPB C,VSBPTR
  74. ILDB C,VBPTR
  75. SUBI C,40
  76. IDPB C,VSBPTR
  77. .ACCES SAVCHN,[0]
  78. .CALL MUDOPN
  79. .VALUE [ASCIZ /: No TS MUDDLE ?
  80. 
  81. /]
  82. MOVSI 17,STUFF
  83. BLT 17,17
  84. JRST 1
  85. LOSNAM: MOVE B,[440700,,NAMMSG]
  86. PUSHJ P,OUTMSG
  87. MOVE B,[440600,,XUNAME]
  88. MOVE C,[440700,,SXUNAM]
  89. SIXLOP: ILDB A,B
  90. JUMPE A,SIXTOO
  91. ADDI A,40
  92. IDPB A,C
  93. JRST SIXLOP
  94. SIXTOO: MOVE B,[440700,,SXUNAM]
  95. PUSHJ P,OUTMSG
  96. MOVE B,[440700,,NAMEND]
  97. PUSHJ P,OUTMSG
  98. .BREAK 16,160000
  99. LOGIN: MOVE B,[440700,,LOGMSG]
  100. PUSHJ P,OUTMSG
  101. .BREAK 16,160000
  102. OFFHOR: MOVE B,[440700,,OFFMSG]
  103. PUSHJ P,OUTMSG
  104. .BREAK 16,160000
  105. CKTIME: .RYEAR A,
  106. LDB A,[320300,,A] ; IS IT A WEEKEND?
  107. JUMPE A,CURFCK
  108. CAIN A,6
  109. JRST CURFCK
  110. .RTIME A,
  111. LDB A,[301400,,A] ; IS IT OFFICE HOURS?
  112. CAIGE A,'22
  113. CAIGE A,'09
  114. JRST CURFCK
  115. .RDATE A,
  116. .CALL HOLOPN ; IS IT A HOLIDAY?
  117. JRST FLUSH
  118. CURFCK: .CALL CURFEW
  119. JRST WIN
  120. .CLOSE DSKCHN,
  121. MOVE B,[440700,,CURMSG]
  122. PUSHJ P,OUTMSG
  123. .BREAK 16,160000
  124. FLUSH: .CALL BADBOY
  125. JRST NEWBAD
  126. .CALL RFDATE
  127. JFCL
  128. .CALL RQDATE
  129. JFCL
  130. .CALL SFDATE
  131. JFCL
  132. .CLOSE DSKCHN,
  133. HLRZ A,TIME ; DID THE TURKEY TRY <1/2 HR AGO?
  134. HLRZ B,NOW
  135. CAME A,B
  136. JRST OFFHOR
  137. SUB NOW,TIME
  138. CAIGE NOW,2400.
  139. JRST LOGOUT
  140. JRST OFFHOR
  141. NEWBAD: .CALL MAKBAD
  142. .LOSE 1000
  143. .CLOSE DSKCHN,
  144. JRST OFFHOR
  145. LOGOUT: .VALUE [ASCIZ /:You don't believe me, eh? That makes me MAD!!!
  146. :LOGOUT
  147. /]
  148. .BREAK 16,160000
  149. OUTMSG: PUSH P,A ; GIVEN BYTE POINTER, PRINT FROB OUT
  150. PUSH P,C
  151. PUSH P,B
  152. MOVEI C,
  153. OUTLOP: ILDB A,B ; LIKES BYTE POINTER TO FROB IN B
  154. CAIE A,0
  155. CAIN A,3
  156. JRST OUTEND
  157. AOJA C,OUTLOP
  158. OUTEND: POP P,B ; GET BYTE POINTER IN B, COUNT IS IN C
  159. .CALL [SETZ
  160. SIXBIT /SIOT/
  161. MOVEI TTYCHN
  162. B
  163. SETZ C]
  164. .LOSE 1000
  165. POP P,C
  166. POP P,A
  167. POPJ P,
  168. DEATH: SETZ
  169. SIXBIT /OPEN/
  170. MOVSI .BII
  171. MOVEI DSKCHN
  172. DSKDEV
  173. [SIXBIT /TRIVIA/]
  174. [SIXBIT /DEATH/]
  175. SETZ MSGDIR
  176. DIROPN: SETZ
  177. SIXBIT /OPEN/
  178. MOVSI .BII
  179. MOVEI DSKCHN
  180. DSKDEV
  181. [SIXBIT /.FILE./]
  182. [SIXBIT /(DIR)/]
  183. SETZ XUNAME
  184. MSGOPN: SETZ
  185. SIXBIT /OPEN/
  186. MOVSI .BII
  187. MOVEI DSKCHN
  188. DSKDEV
  189. MSGDIR
  190. XUNAME
  191. SETZ XUNAME
  192. MUDOPN: SETZ
  193. SIXBIT /OPEN/
  194. MOVSI 4
  195. MOVEI MUDCHN
  196. DSKDEV
  197. [SIXBIT /TS/]
  198. B
  199. SETZ [SIXBIT /SYS1/]
  200. SAVOPN: SETZ
  201. SIXBIT /OPEN/
  202. MOVSI 6
  203. MOVEI SAVCHN
  204. DSKDEV
  205. [SIXBIT /TRV/]
  206. [SIXBIT /SAVFIL/]
  207. SETZ [SIXBIT /MADMAN/]
  208. HOLOPN: SETZ
  209. SIXBIT /OPEN/
  210. MOVSI .BII
  211. MOVEI DSKCHN
  212. DSKDEV
  213. [SIXBIT /HLIDAY/]
  214. A
  215. SETZ [SIXBIT /COMBAT/]
  216. CURFEW: SETZ
  217. SIXBIT /OPEN/
  218. MOVSI .BII
  219. MOVEI DSKCHN
  220. DSKDEV
  221. [SIXBIT /TRIVIA/]
  222. [SIXBIT /CURFEW/]
  223. SETZ MSGDIR
  224. BADBOY: SETZ
  225. SIXBIT /OPEN/
  226. MOVSI .BII
  227. MOVEI DSKCHN
  228. DSKDEV
  229. BADNAM
  230. XUNAME
  231. SETZ BADDIR
  232. RFDATE: SETZ
  233. SIXBIT /RFDATE/
  234. MOVEI DSKCHN
  235. SETZM TIME
  236. RQDATE: SETZ
  237. SIXBIT /RQDATE/
  238. SETZM NOW
  239. SFDATE: SETZ
  240. SIXBIT /SFDATE/
  241. MOVEI DSKCHN
  242. SETZ NOW
  243. MAKBAD: SETZ
  244. SIXBIT /OPEN/
  245. MOVSI 1
  246. MOVEI DSKCHN
  247. DSKDEV
  248. BADNAM
  249. XUNAME
  250. SETZ BADDIR
  251. STUFF: OFFSET -.
  252. 2
  253. .CALL LOAD
  254. .VALUE
  255. .IOT MUDCHN,A
  256. .CLOSE MUDCHN,
  257. ADDI A,1
  258. JRST @A
  259. LOAD: SETZ
  260. SIXBIT /LOAD/
  261. 1000,,-1
  262. SETZI MUDCHN
  263. OFFSET 0
  264. MSG: ASCIZ /
  265. TRIVIA is down for repairs. Sigh.
  266. /
  267. OFFMSG: ASCIZ /
  268. TRIVIA is not available during office hours (9 AM to 10 PM, Eastern time.)
  269. /
  270. NAMMSG: ASCIZ /
  271. Losers with the name /
  272. NAMEND: ASCIZ / cannot play TRIVIA!
  273. /
  274. LOGMSG: ASCIZ /
  275. Losers who are not logged in cannot play TRIVIA!
  276. /
  277. CURMSG: ASCIZ /
  278. The system is VERY loaded. Please try again later.
  279. /
  280. STMSG: ASCIZ /
  281. Documentation in MADMAN;TVDOC >.
  282. Describe bugs with TS TVBUG.
  283. If TRIVIA absolutely refuses to work, bring it down with TS TVBUG.
  284. /
  285. BUF: BLOCK 200
  286. BUFPTR: BUF-.,,BUF
  287. PDL: BLOCK 30
  288. END START