123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- TITLE TRIVIA startup
- .MLLIT==1
- TTYCHN==1
- SAVCHN==2
- MUDCHN==3
- DSKCHN==4
- O=0
- 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 /ABADBO/
- BADDIR: SIXBIT /VANISH/
- SXUNAM: BLOCK 2
- START: MOVE P,[-30,,PDL-1]
- .OPEN TTYCHN,[SIXBIT / !TTY/]
- .LOSE 1000
- .SUSET [.RXUNAME,,XUNAME]
- 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: PUSHJ P,WINNER
- JRST WIN
- .BREAK 16,140000
- FAKMSG: MOVE B,[440700,,MSG]
- .CLOSE DSKCHN,
- JRST MSGDTH
- CKUSER: PUSHJ P,WINNER
- JRST WIN
- LDB A,[063600,,XUNAME]
- CAMN A,[SIXBIT / GUEST/]
- JRST CKTIME
- .CALL DIROPN ; REAL PERSON?
- JRST CKTIME ; NOPE
- .CALL MSGOPN ; REALLY A REAL PERSON?
- JRST LOSNAM
- .CLOSE DSKCHN,
- CKNUM: PUSHJ P,ZKCNT
- JRST TOOMNY
- WIN: .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
- TOOMNY: MOVE B,[440700,,TOOMSG]
- 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,'20
- CAIGE A,'09
- JRST CURFCK
- .RDATE A,
- .CALL HOLOPN ; IS IT A HOLIDAY?
- JRST FLUSH
- CURFCK: .CALL CURFEW
- JRST CKNUM
- .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!!!
- 0U
- /]
- .BREAK 16,160000
- ZKCNT: MOVEI B,40
- MOVEI O,3
- ZKLOP: SOJL B,[AOS (P)
- POPJ P,]
- SKIPN @MSUSER
- JRST ZKLOP
- MOVE A,@MSRED2
- CAME A,[SIXBIT /ZORK/]
- JRST ZKLOP
- SOJG O,ZKLOP
- POPJ P,
- SQUOZE 0,MSUSER
- MSUSER: 0
- SQUOZE 0,MSRED2
- MSRED2: 0
- INIT: MOVE B,[-200,,200]
- MOVEI A,0
- .CALL [SETZ
- SIXBIT /CORBLK/
- MOVEI %CBRED
- MOVEI %JSELF
- B
- MOVEI %JSABS
- SETZ A]
- .LOSE 1000
- MOVE A,MSUSER-1
- .EVAL A,
- .LOSE 1000
- ADD A,[B,,400000]
- MOVEM A,MSUSER
- MOVE A,MSRED2-1
- .EVAL A,
- .LOSE 1000
- ADD A,[B,,400000]
- MOVEM A,MSRED2
- .VALUE [ASCIZ /K
- :PDUMP SYS2;TS ZORK
- :KILL
- /]
- 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,
- WINNER: CAME XUNAME,[SIXBIT /TAA/]
- CAMN XUNAME,[SIXBIT /MARC/]
- POPJ P,
- CAME XUNAME,[SIXBIT /PDL/]
- CAMN XUNAME,[SIXBIT /SEC/]
- POPJ P,
- CAME XUNAME,[SIXBIT /BKD/]
- CAMN XUNAME,[SIXBIT /ELBOW/]
- POPJ P,
- AOS (P)
- POPJ P,
- DEATH: SETZ
- SIXBIT /OPEN/
- MOVSI .BII
- MOVEI DSKCHN
- DSKDEV
- [SIXBIT /ZORK/]
- [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 /MADADV/]
- [SIXBIT /SAVE/]
- 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 /
- ZORK is down for repairs. Sigh.
- /
- OFFMSG: ASCIZ /
- ZORK is not available during office hours (9 AM to 8 PM, Eastern time.)
- /
- TOOMSG: ASCIZ /
- There appears before you a threatening figure clad all over
- in heavy black armor. His legs seem like the massive trunk
- of the oak tree. His broad shoulders and helmeted head loom
- high over your own puny frame and you realize that his powerful
- arms could easily crush the very life from your body. There
- hangs from his belt a veritable arsenal of deadly weapons:
- sword, mace, ball and chain, dagger, lance, and trident.
- He speaks with a commanding voice:
- "YOU SHALL NOT PASS "
- As he grabs you by the neck all grows dim about you./
- NAMMSG: ASCIZ /
- Losers with the name /
- NAMEND: ASCIZ / cannot play ZORK!
- /
- LOGMSG: ASCIZ /
- Losers who are not logged in cannot play ZORK!
- /
- CURMSG: ASCIZ /
- The system is VERY loaded. Please try again later.
- /
- BUF: BLOCK 200
- BUFPTR: BUF-.,,BUF
- PDL: BLOCK 30
- END START
|