A large commit.
[pdp8.git] / sw / adventure / src / IO.FT
CommitLineData
84b5715c
PH
1 SUBROUTINE IO(RECORD)\r
2C\r
3C\r
4C This function reads the direct access file and unpacks it.\r
5C we put 6 13-character records into a single direct access record\r
6C because OS/8 FORTRAN puts every record into a single block.\r
7C Packing this saves one-sixth the space.\r
8C\r
9 COMMON /TXTCOM/ RTEXT,LINES,ASCVAR,TXTLOC,DATA\r
10 INTEGER RTEXT(205),LINES(12),DATA(78),RECORD\r
11 INTEGER OLDREC,TXTLOC\r
84b5715c
PH
12 DATA OLDREC/-1/\r
13\r
84b5715c 14 IREC = RECORD/6 + 1\r
84b5715c
PH
15 IF (IREC .NE. OLDREC)READ(8'IREC)DATA\r
16 OLDREC = IREC\r
17 N = 13 * (MOD(RECORD-1,6)) + 1\r
18 TXTLOC = DATA(N)\r
19 DO 10 I = 1, 12\r
2010 LINES(I) = DATA(N+I)\r
21 RETURN\r
84b5715c 22 END\r