1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 15:27:28 +00:00

ZORK stub - I see no Zork here.

From KMP; AR9 MIDAS.
This commit is contained in:
Lars Brinkhoff 2017-01-22 08:58:51 +01:00 committed by Eric Swenson
parent 706d9ea20e
commit d4185487a9
2 changed files with 91 additions and 0 deletions

View File

@ -458,6 +458,10 @@ respond "System?" "ITS\r"
expect ":KILL"
respond "*" ":link sys2;tc dc,sys1;ts dcrock\r"
# Zork
respond "*" ":midas sys3;ts zork_sysen3;zork\r"
expect ":KILL"
respond "*" ":midas sys1;ts instal_sysen2;instal\r"
expect ":KILL"

87
src/sysen3/zork.21 Normal file
View File

@ -0,0 +1,87 @@
title ZORK - Stop lusers from losing worse!
a=:1
b=:2
ttyo=:3
ttyi=:4
buf=:5
count=:6
chcount=:7
define syscal op,args
.call [setz ? sixbit /op/ ? args ((setz))]
termin
define type &string
movei a,<.length string>
move b,[440700,,[ascii string]]
syscal SIOT,[%climm,,ttyo ? b ? a]
.lose %lsfil
termin
zork: syscal OPEN,[ %clbit,,.uao\%tjdis ? %climm,,ttyo ;open TTY for output
[sixbit /TTY/]]
.lose %lsfil
syscal OPEN,[ %clbit,,.uai ? %climm,,ttyi ;open TTY for input
[sixbit /TTY/]]
.lose %lsfil
type "C
There appears before you a huge figure clothed in a dark
robe. As you shrink back in awe, he speaks:
``This is not the machine of the Zork Implementors!''
Then, as suddenly as it appeared, his image dissolves,
leaving you in darkness.
As your eyes grow more accustomed to the dim light,
you notice a clue etched on the wall... It reads:
No MIT machine supports Zork any longer.
Questions may be directed to ZORK@DM.
FMZC, GUE 745
Beneath this message a passerby has scrawled:
No MIT supports DM any longer.
Save your breath.
FMGC, GUE 799
"
movei count,5 ; Initialize input-line counter
line: movei chcount,0 ; Move 0 into char counter
sosg count ; Check for too much time taken
jrst dark ; and end if so
cain count,1 ; If we're about to die
type "Your lamp is growing dim.A" ; Warn the poor guy
line1: type ">" ; Prompt
iloop: .iot ttyi,buf ; read a char
cain buf,177 ; If a rubout
jrst rubout ; process rubout
cain buf,^M ; If a carriage return
jrst newlin ; process text
aos chcount ; Increment char count
jrst iloop ; else read a new char
dark: type "Your lamp has run out of light. A hungry grue attacks you
and rips you to pieces. (Next time try Zork on a friendlier system.)
" ; Say bye-bye
.logout 1, ; kill the game
newlin: jumpe chcount,line1 ; If no input, no message
type "I see no Zork here.A" ; Noxious program reply
jrst line ; Prompt and Read another line
rubout: skipg chcount ; only if chars exist
jrst iloop ; Nothing to rub out
sos chcount ; Decrement char count
type "X" ; echo a rubout
jrst iloop ; Re-enter loop
end zork