123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- TITLE TRIVIA startup
- .MLLIT==1
- TTYCHN==1
- SAVCHN==2
- MUDCHN==3
- DSKCHN==4
- A=1
- B=2
- C=3
- TIME=3
- NOW=4
- XUNAME=5
- P=17
- VBPTR: 440700,,A
- VSBPTR: 140600,,B
- DSKDEV: SIXBIT /DSK/
- MSGDIR: SIXBIT /_MSGS_/
- BADNAM: SIXBIT /BADBOY/
- BADDIR: SIXBIT /VANISH/
- SXUNAM: BLOCK 2
- START: MOVE P,[-30,,PDL-1]
- .OPEN TTYCHN,[SIXBIT / !TTY/]
- .LOSE 1000
- .SUSET [.RXUNAME,,XUNAME]
- LDB A,[063600,,XUNAME]
- CAME A,[SIXBIT / GUEST/]
- CAMN A,[SIXBIT / LUSER/]
- JRST LOSNAM
- CAMN A,[SIXBIT / CHEAT/]
- JRST LOSNAM
- LDB A,[063000,,A]
- CAMN A,[SIXBIT / TRIV/]
- JRST LOSNAM
- HLRZ A,XUNAME
- CAIN A,777777
- JRST LOGIN
- .CALL DEATH
- JRST CKUSER
- .CALL [SETZ ; GET FILE LENGTH IN A
- SIXBIT /FILLEN/
- MOVEI DSKCHN
- SETZM A]
- JRST FAKMSG
- CAIN A,
- JRST FAKMSG
- MOVE B,BUFPTR
- .IOT DSKCHN,B
- .CLOSE DSKCHN,
- MOVE B,[440700,,BUF]
- MSGDTH: PUSHJ P,OUTMSG
- MSGEND: CAME XUNAME,[SIXBIT /TAA/]
- CAMN XUNAME,[SIXBIT /MARC/]
- JRST WIN
- .BREAK 16,140000
- FAKMSG: MOVE B,[440700,,MSG]
- .CLOSE DSKCHN,
- JRST MSGDTH
- CKUSER: .CALL DIROPN ; REAL PERSON?
- JRST CKTIME ; NOPE
- .CALL MSGOPN ; REALLY A REAL PERSON?
- JRST LOSNAM
- .CLOSE DSKCHN,
- WIN: MOVE B,[440700,,STMSG]
- PUSHJ P,OUTMSG
- .CALL SAVOPN
- .VALUE [ASCIZ /: No SAVE file?
- /]
- .IOT SAVCHN,[-1,,A]
- MOVSI B,SIXBIT / MUD/
- ILDB C,VBPTR
- SUBI C,40
- DPB C,VSBPTR
- ILDB C,VBPTR
- SUBI C,40
- IDPB C,VSBPTR
- .ACCES SAVCHN,[0]
- .CALL MUDOPN
- .VALUE [ASCIZ /: No TS MUDDLE ?
- /]
- MOVSI 17,STUFF
- BLT 17,17
- JRST 1
- LOSNAM: MOVE B,[440700,,NAMMSG]
- PUSHJ P,OUTMSG
- MOVE B,[440600,,XUNAME]
- MOVE C,[440700,,SXUNAM]
- SIXLOP: ILDB A,B
- JUMPE A,SIXTOO
- ADDI A,40
- IDPB A,C
- JRST SIXLOP
- SIXTOO: MOVE B,[440700,,SXUNAM]
- PUSHJ P,OUTMSG
- MOVE B,[440700,,NAMEND]
- PUSHJ P,OUTMSG
- .BREAK 16,160000
- LOGIN: MOVE B,[440700,,LOGMSG]
- PUSHJ P,OUTMSG
- .BREAK 16,160000
- OFFHOR: MOVE B,[440700,,OFFMSG]
- PUSHJ P,OUTMSG
- .BREAK 16,160000
- CKTIME: .RYEAR A,
- LDB A,[320300,,A] ; IS IT A WEEKEND?
- JUMPE A,CURFCK
- CAIN A,6
- JRST CURFCK
- .RTIME A,
- LDB A,[301400,,A] ; IS IT OFFICE HOURS?
- CAIGE A,'22
- CAIGE A,'09
- JRST CURFCK
- .RDATE A,
- .CALL HOLOPN ; IS IT A HOLIDAY?
- JRST FLUSH
- CURFCK: .CALL CURFEW
- JRST WIN
- .CLOSE DSKCHN,
- MOVE B,[440700,,CURMSG]
- PUSHJ P,OUTMSG
- .BREAK 16,160000
- FLUSH: .CALL BADBOY
- JRST NEWBAD
- .CALL RFDATE
- JFCL
- .CALL RQDATE
- JFCL
- .CALL SFDATE
- JFCL
- .CLOSE DSKCHN,
- HLRZ A,TIME ; DID THE TURKEY TRY <1/2 HR AGO?
- HLRZ B,NOW
- CAME A,B
- JRST OFFHOR
- SUB NOW,TIME
- CAIGE NOW,2400.
- JRST LOGOUT
- JRST OFFHOR
- NEWBAD: .CALL MAKBAD
- .LOSE 1000
- .CLOSE DSKCHN,
- JRST OFFHOR
- LOGOUT: .VALUE [ASCIZ /:You don't believe me, eh? That makes me MAD!!!
- :LOGOUT
- /]
- .BREAK 16,160000
- OUTMSG: PUSH P,A ; GIVEN BYTE POINTER, PRINT FROB OUT
- PUSH P,C
- PUSH P,B
- MOVEI C,
- OUTLOP: ILDB A,B ; LIKES BYTE POINTER TO FROB IN B
- CAIE A,0
- CAIN A,3
- JRST OUTEND
- AOJA C,OUTLOP
- OUTEND: POP P,B ; GET BYTE POINTER IN B, COUNT IS IN C
- .CALL [SETZ
- SIXBIT /SIOT/
- MOVEI TTYCHN
- B
- SETZ C]
- .LOSE 1000
- POP P,C
- POP P,A
- POPJ P,
- DEATH: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- [SIXBIT /TRIVIA/]
- [SIXBIT /DEATH/]
- SETZ MSGDIR
- DIROPN: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- [SIXBIT /.FILE./]
- [SIXBIT /(DIR)/]
- SETZ XUNAME
- MSGOPN: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- MSGDIR
- XUNAME
- SETZ XUNAME
- MUDOPN: SETZ
- SIXBIT /OPEN/
- MOVSI 4
- MOVEI MUDCHN
- DSKDEV
- [SIXBIT /TS/]
- B
- SETZ [SIXBIT /SYS1/]
- SAVOPN: SETZ
- SIXBIT /OPEN/
- MOVSI 6
- MOVEI SAVCHN
- DSKDEV
- [SIXBIT /TRV/]
- [SIXBIT /SAVFIL/]
- SETZ [SIXBIT /MADMAN/]
- HOLOPN: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- [SIXBIT /HLIDAY/]
- A
- SETZ [SIXBIT /COMBAT/]
- CURFEW: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- [SIXBIT /TRIVIA/]
- [SIXBIT /CURFEW/]
- SETZ MSGDIR
- BADBOY: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- BADNAM
- XUNAME
- SETZ BADDIR
- RFDATE: SETZ
- SIXBIT /RFDATE/
- MOVEI DSKCHN
- SETZM TIME
- RQDATE: SETZ
- SIXBIT /RQDATE/
- SETZM NOW
- SFDATE: SETZ
- SIXBIT /SFDATE/
- MOVEI DSKCHN
- SETZ NOW
- MAKBAD: SETZ
- SIXBIT /OPEN/
- MOVSI 1
- MOVEI DSKCHN
- DSKDEV
- BADNAM
- XUNAME
- SETZ BADDIR
- STUFF: OFFSET -.
- 2
- .CALL LOAD
- .VALUE
- .IOT MUDCHN,A
- .CLOSE MUDCHN,
- ADDI A,1
- JRST @A
- LOAD: SETZ
- SIXBIT /LOAD/
- 1000,,-1
- SETZI MUDCHN
- OFFSET 0
- MSG: ASCIZ /
- TRIVIA is down for repairs. Sigh.
- /
- OFFMSG: ASCIZ /
- TRIVIA is not available during office hours (9 AM to 10 PM, Eastern time.)
- /
- NAMMSG: ASCIZ /
- Losers with the name /
- NAMEND: ASCIZ / cannot play TRIVIA!
- /
- LOGMSG: ASCIZ /
- Losers who are not logged in cannot play TRIVIA!
- /
- CURMSG: ASCIZ /
- The system is VERY loaded. Please try again later.
- /
- STMSG: ASCIZ /
- Documentation in MADMAN;TVDOC >.
- Describe bugs with TS TVBUG.
- If TRIVIA absolutely refuses to work, bring it down with TS TVBUG.
- /
- BUF: BLOCK 200
- BUFPTR: BUF-.,,BUF
- PDL: BLOCK 30
- END START
|