DataMuseum.dk

Presents historical artifacts from the history of:

RC3500

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC3500

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦a5874c44f⟧ TextFileVerbose

    Length: 2304 (0x900)
    Types: TextFileVerbose
    Names: »strtesttxt«

Derivation

└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system
    └─⟦72244f0ef⟧ 
        └─⟦this⟧ »strtesttxt« 

TextFileVerbose

job j 1 time 11 0 perm disc1 1000 10 
message start compilation
strtest=set 1 disc1
scope user strtest
strtest=algol
begin
<**********************************************************
*
* this program tests the stream simulator
*
* it is run interactively from a standard tty
*
* programmed dec 1980 by stb
*
***********************************************************>

integer char,i;
integer array table(0:255);


\f


procedure get_input;
begin <* used to get an input message from the stream simulator *>

zone zin(20,1,stderror);
integer i,char;
set_table;
open(zin,0,<:streamer:>,0);
for i:=1 step 1 until 18 do
begin
readchar(zin,char);
write(out,i,":",1,char,"nl",1);
end;

setposition(out,0,0);
end;
\f


procedure send_output;
begin <* used to send an outputmessage to the stream simulator *>

zone zout(20,1,stderror);
integer i;

open(zout,0,<:streamer:>,0);

for i:=1 step 1 until 10 do
outchar(zout,i);

close(zout,true);
end;


\f


procedure set_table;
begin <* defines an in_table with all characters having class 'text' *>
integer i;

for i:=0 step 1 until 255 do
table(i):=6 shift 12 + i;

intable(table);
end;


\f


procedure testout(text,int);
value int; integer int; string text;
begin
write(out,text,"sp",2,int,"nl",1);
setposition(out,0,0);
end;

\f


<************************** main loop ***************************>

write(out,<:stream simulator tester :>);
char:=0;

repeat
if char<>'nl' then
write(out,"nl",1,<:com: :>);
setposition(out,0,0);
readchar(in,char);

if char='o' then  sendoutput
else if char='e' then
else if char='i' then get_input
else if char='nl' then
else write(out,<:unknown command:>);

setposition(out,0,0);
until (char='e');

end
if warning.yes
(message warning errors in compilation
finis)
message compilation ok
finis
«eof»