ScannerProm:
CEDAR PROGRAM
IMPORTS IO, FS
EXPORTS
~ BEGIN
usefull: ARRAY [0 .. 18) OF INT ← [4, 5, 6, 10B, 11B, 12B, 14B, 15B, 16B, 20B, 21B, 22B, 24B, 25B, 26B, 30B, 31B, 32B];
&2 ← -- S1 top XXX
&2 ← EikonixImpl.GetIntegrationTime[]
5
&3 ← S1 mid XXX
&3 ← EikonixImpl.GetIntegrationTime[]
4
&4 ← S1 bot XXX
&4 ← EikonixImpl.GetIntegrationTime[]
6
&5 ← c2 top XXX
&5 ← EikonixImpl.GetIntegrationTime[]
9
&6 ← c 2 mid XXX
&6 ← EikonixImpl.GetIntegrationTime[]
8
&7 ← c2 bot XXX
&7 ← EikonixImpl.GetIntegrationTime[]
10
&8 ← c3 top XXX
&8 ← EikonixImpl.GetIntegrationTime[]
13
&9 ← c3 mid XXX
&9 ← EikonixImpl.GetIntegrationTime[]
12
&10 ← c3 bot XXX
&10 ← EikonixImpl.GetIntegrationTime[]
14
&11 ← c4 top XXX
&11 ← EikonixImpl.GetIntegrationTime[]
17
&12 ← c4 mid XXX
&12 ← EikonixImpl.GetIntegrationTime[]
16
&13 ← c4 bot XXX
&13 ← EikonixImpl.GetIntegrationTime[]
18
&14 ← c5 top XXX
&14 ← EikonixImpl.GetIntegrationTime[]
21
&15 ← c5 mid XXX
&15 ← EikonixImpl.GetIntegrationTime[]
20
&16 ← c5 bot XXX
&16 ← EikonixImpl.GetIntegrationTime[]
22
&17 ← c6 top XXX
&17 ← EikonixImpl.GetIntegrationTime[]
25
&18 ← c6 mid XXX
&18 ← EikonixImpl.GetIntegrationTime[]
24
&19 ← c6 bot XXX
&19 ← EikonixImpl.GetIntegrationTime[]
26
&20 ←
PrintTable:
PROC [] =
BEGIN
data: ARRAY [0 .. 3777B] OF CARDINAL ← ALL [0];
baseArray: ARRAY [0 .. 8) OF INT ← [0, 400B, 1000B, 1400B, 2000B, 2400B, 3000B, 3400B];
s: IO.STREAM ← FS.StreamOpen["///Scanner/Prom.txt", read];
out: IO.STREAM;
FOR i:
INT
IN [0 .. 3777B]
DO
mult: ARRAY [0 .. 7] OF CARDINAL ← [1, 2, 4, 8, 16, 32, 64, 128];
byte: INT ← IO.GetInt[s];
c: CHAR ← IO.GetChar[s];
IF c # ' THEN ERROR;
FOR k:
INT
IN [0 .. 7]
DO
data[i] ← data[i] + (IF IO.GetChar[s] = '0 THEN 0 ELSE mult[k]);
ENDLOOP;
ENDLOOP;
IO.Close[s];
out ← FS.StreamOpen["///Scanner/PromContents.txt", create];
FOR xyz:
INT
IN [0 .. 8)
DO
base: INT ← baseArray[xyz];
IO.PutF[out, "\nBase = %bB\n", IO.int[base]];
FOR lmno: INT IN [0 .. 18) DO
FOR i:
INT
IN [0 .. 77B]
DO
i: INT ← usefull[lmno];
r: INT ← i * 2 + base;
s: INT ← i * 2 + base + 200B;
IO.PutF[out, "%g\t\t%g\t\t%bB\n", IO.card[data[r] + data[r+1] * 256], IO.card[data[s] + data[s+1] * 256], IO.int[i]];
ENDLOOP;
ENDLOOP;
IO.PutRope[out, "\n\n\n\n\n\n"];
FOR z:
INT
IN [0 .. 77B]
DO
IO.PutF[out, "%bB\t\t%g\n", IO.int[z], IO.card[((z * 4) + 3) * 256 + (z * 4) + 3]];
ENDLOOP;
IO.Close[out];
END;
PrintTable[];
END....