|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00)
Types: TextFile
Names: »lilprog1«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »lilprog1«
procedure nextpart;
begin
comment translate from algol8 til djs-6;
integer i, class, symbol, inz, ouz;
integer array table(0:127);
table(0):= 0 shift 12+0;
for i:= 1 step 1 until 9 do
table(i):= 7 shift 12 +i;
table(10):= 8 shift 12+10;
table(11):=7 shift 12 +11;
table(12):= 8 shift 12+12;
table(13):= 0 shift 12+ 13;
for i:= 14 step 1 until 24 do
table(i):= 7 shift 12+i;
table(25):= 8 shift 12+25;
for i:=26 step 1 until 38 do
table(i):= 7 shift 12+i;
table(39):= 10 shift 12+39;
for i:=40 step 1 until 42 do
table(i):=7 shift 12+i;
table(43):=3 shift 12+43;
table(44):=7 shift 12+44;
table(45):=3 shift 12+45;
table(46):= 4 shift 12+46;
table(47):= 7 shift 12+47;
for i:= 48 step 1 until 57 do
table(i):= 2 shift 12+i;
for i:= 58 step 1 until 64 do
table(i):= 7 shift 12+i;
for i:= 65 step 1 until 90 do
table(i):=6 shift 12+i;
table(91):= 9 shift 12+91;
table(92):= 6 shift 12+92;
table(93):= 9 shift 12+93;
for i:= 94 step 1 until 96 do
table(i):= 7 shift 12+i;
for i:= 97 step 1 until 125 do
table(i):= 6 shift 12+i;
table(126):= 7 shift 12+126;
table(127):= 0 shift 12+127;
intable(table);
comment initialize different variables;
class:= readchar(in,symbol);
for i:= i+1 while class<8 do
begin
outchar(out,symbol);
class:= readchar(in,symbol);
end;
if class = 9 then if symbol = 91 then
begin
outchar(out,40);
nextpart;
end
else
begin
outchar(out, 41);
nextpart;
end;
if class = 10 then
begin
lookup;
nextpart;
end;
outchar(out,symbol);
end;
procedure lookup;
begin
integer i,i1;
class:= readchar(in,symbol);
for i:=i+1 while class<>10 do
begin
if symbol<>76 and symbol<>78 and symbol<>71 then
begin
for i1:= i1+1 while class<>10 do
begin
outchar(out,symbol);
class:= readchar(in,symbol);
end;
end;
if symbol = 76 then
begin
outchar(out,60);
class:= readchar(in,sumbol);
if symbol = 81 then outchar(out,61);
class:= readchar(in,symbol);
end;
if symbol = 78 then
begin
class:= readchar(in,symbol);
if symbol = 81 then
begin
outchar(out,60);
outchar(out,62);
class:= readchar(in,symbol);
end
else
begin
outchar(out,78);
for i1:= i1+1 while class<>10 do
begin
outchar(out,symbol);
class:= readchar(in,symbol);
end;
end;
if symbol = 71 then
begin
class:= readchar(in,symbol);
if symbol<>81 and symbol<>82 then
begin
outchar(out,71);
for i1:=i1+1 while class<>10 do
begin
outchar(out,symbol);
class:= readchar(in,symbol);
end;
end
else
begin
outchar(out,62);
if symbol =81 then outchar(out,61);
class:= readchar(in,symbol);
end;
end;
end;
▶EOF◀