|
|
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: »ttestio«
└─⟦2c55ea56f⟧ Bits:30001844 SW-save af projekt 1000, Alarm-system
└─⟦6b41451d2⟧
└─⟦this⟧ »ttestio«
job jaba 600 time 6 0 size 100000 perm mini 25 2
mode list.yes
( btestio = set 1 mini
btestio = pascal80 ioenvir
scope user btestio
finis
)
process testio( var sv : system_vector );
const
version = 2;
empty = "############";
stop = "stop########";
type
opbuffer = record
first, last, next: integer;
name: alfa;
chars: array (6+12..6+12+80-1) of char
end;
ktable = array (1..10) of integer;
var
stat, i, num : integer;
name, txt : alfa;
t: char;
oppool: pool 3 of opbuffer;
mainsem: semaphore;
kb,
z: zone;
k: ktable:= ktable( 0, 1, 12, 123, 1234, 12345,
32767, -32768, -12345, -1 );
begin
openopzone ( z, sv(operatorsem), ref(z.free),
2, oppool, 2,0,0,0 );
outtext ( z, own.incname );
outfill ( z, ".", 3);
outinteger ( z, version, 8);
outchar ( z, nl);
outend ( z);
outhex ( z, #h0123, 2);
outhex ( z, #h4567, 3);
outhex( z, #h89ab, 4);
outhex ( z, #hcdef, 6 );
outtext( z, " out.#hidde");
outchar ( z, nl);
outend ( z);
for i:= 32 to 127 do outchar ( z, chr(i));
outchar ( z, nl);
outend ( z);
for i:= 57 downto 0 do outchar ( z, chr(i));
outchar ( z, nl);
outend ( z);
txt:= "programtest.";
outtext ( z, txt);
outchar ( z, nl);
for i:= 1 to 12 do
begin
txt(13-i):= "#"; (* stop mark *)
outtext ( z, txt);
outfill ( z, "-", i);
outchar ( z, nl)
end;
outend( z);
for i:= 1 to 10 do
begin
num:= -3;
repeat
outinteger ( z, k(i), num); outchar ( z, ",");
outhex ( z, k(i), num); outchar ( z, ",");
num:= num+3
until num=9;
outchar ( z, nl);
end;
outend ( z);
openopzone ( kb, sv(operatorsem), ref(mainsem),
1, oppool, 1, 1, 1, 1);
outtext ( z, "ininteger:");
outchar ( z, nl);
outend ( z);
outtext ( z, "ready: # ");
outchar ( z, bel);
outend ( z);
repeat
ininteger ( kb, num);
if kb.readstate < 0 then
begin
opin ( kb);
opwait ( kb, oppool);
ininteger ( kb, num);
end;
stat:= kb.readstate;
outinteger ( z, num, 6);
outfill ( z, sp, 2);
inchar ( kb, t);
outchar ( z, t);
outinteger ( z, stat, 4);
outchar ( z, nl);
if t = nl then outchar ( z, bel);
outend ( z)
until num = -1 ;
outchar ( z, nl);
outtext ( z, "inhex: ");
outchar ( z, nl);
outend ( z);
repeat
inhex ( kb, num);
if kb.readstate = -1 then (* buffer empty *)
begin
opin ( kb);
opwait ( kb, oppool);
inhex ( kb, num)
end;
stat:= kb.readstate;
outinteger ( z, num, 6);
outhex ( z, num, 6);
outfill ( z, sp, 2);
inchar ( kb, t);
outchar ( z, t);
outinteger ( z, stat, 4);
outchar ( z, nl);
if t = nl then outchar ( z, bel);
outend ( z)
until num = -1 ;
outchar ( z, nl);
outtext ( z, "inname: ");
outchar ( z, nl);
outend ( z);
repeat
name:= empty;
inname ( kb, name);
if kb.readstate = -1 then (* buffer empty *)
begin
opin ( kb);
opwait ( kb, oppool);
inname ( kb, name)
end;
stat:= kb.readstate;
outtext ( z, name);
outfill ( z, sp, 2);
inchar ( kb, t);
outchar ( z, t);
outinteger ( z, stat, 4);
outchar ( z, nl);
if t = nl then outchar ( z, bel);
outend ( z)
until name = stop ;
for num:= -32768 to 32767 do
begin
outinteger ( z, num, 6);
outhex ( z, num, 6);
outchar ( z, nl)
end;
outend ( z)
end .
▶EOF◀