Add README.md
[pdp8.git] / sw / adventure / src / RSPEAK.RA
CommitLineData
84b5715c
PH
1 SECT RSPEAK\r
2/ SUBROUTINE RSPEAK(I)\r
3/C\r
4/C PRINT THE I-TH "RANDOM" MESSAGE (SECTION 6 OF DATABASE).\r
5/C\r
6/ IMPLICIT INTEGER (A-Z)\r
7/ COMMON /TXTCOM/ RTEXT\r
8/ DIMENSION RTEXT(205)\r
9\r
10 EXTERN SPEAK\r
11 JA #ST\r
12#XR, ORG .+10\r
13 TEXT +RSPEAK+\r
14#RET, SETX #XR\r
15 SETB #BASE\r
16 JA .+3\r
17#BASE, ORG .+6\r
18I, ORG .+3\r
19J, ORG .+3\r
20 ORG #BASE+30\r
21 FNOP\r
22 JA #RET\r
23 FNOP\r
24#GOBAK, 0;0\r
25 #LBL=.\r
26 COMMON TXTCOM\r
27RTEXT, ORG .+1147\r
28LINES, ORG .+44\r
29ASCVAR, ORG .+3\r
30TXTLOC, ORG .+3\r
31DATA, ORG .+0234\r
32 ORG #LBL\r
33#RTN, BASE #BASE\r
34 JA #GOBAK\r
35#ST, STARTD\r
36 0210\r
37 FSTA #GOBAK,0\r
38 0200\r
39 SETX #XR\r
40 SETB #BASE\r
41 LDX 0,1\r
42 FSTA #BASE\r
43 FLDA% #BASE,1+\r
44 FSTA I\r
45 STARTF\r
46/ IF(I.NE.0)CALL SPEAK(RTEXT(I))\r
47 FLDA% I\r
48 JEQ #RTN\r
49/ CALL SPEAK(RTEXT(I))\r
50 ATX 7\r
51 FLDA RTEXT-3,7\r
52 FSTA J\r
53 JSR SPEAK\r
54/ RETURN\r
55 JA #RTN\r
56 JA J\r
57 END\r