|
|
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: 5376 (0x1500)
Types: TextFile
Names: »convtx«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦80900d603⟧ »giprocfile«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦80900d603⟧ »giprocfile«
└─⟦this⟧
; conv_tx * page 1 27 09 77, 9.56;
; conv
; ****
if listing.yes
char 10 12 10
conv = set 1 disc
conv = algol
external integer procedure conv(file, paper);
_____________________________________________
value paper;
zone file;
integer paper;
comment
Convert the file given in the description of the zone
file using paper-type given by the parameter paper.
If the value of paper is greater than or equal to
1000 then the paper format paper-1000 will be used
to convert a transformed version of the file in
which small letters are changed to capital letters.
conv (integer, return value). The answer from boss
_ on the convert message:
_ 0 - convert ok
_ 1 - cbufs exceeded
_ 2 - file not visible
_ 3 - file has login scope
_ 4 - temporary resources insufficient
_ 5 - file in use
_ 6 - file not area
_ 7 - file is no text file
_ 19- attention status at remote batch terminal
_ 20- device unknown
_ 21- parent device disconnected
file (zone, call value). Gives the name of
_ the file to be converted to the printer.
paper (integer, call value). The paper format used.
_ Value zero gives standard.
In case of error-answer from boss (conv<>0) the
coresponding text will be written on current output.
where also error message in connection with small to
capital transformation will be written.
The procedure parent_mes(GI no 74010) is used to
send the convert message to the parent, which must
be boss (or another intelligent operating system).
GI no 74005, october 1976.
Willy Lehamnn Weng
;
\f
comment conv_tx * page 2 27 09 77, 9.56
0 1 2 3 4 5 6 7 8 9 ;
begin
comment variable declaration;
integer p, i, class, val;
integer array zone_des(1:20),
_ mes_buf (0:7),
_ ia(1:10);
real array field raf;
zone z(128*2, 2, std_error);
if paper >= 1000 then
begin
comment transform the convert file by
changing all small lettert to capital
letters;
paper:= paper - 1000;
i:= monitor(42)lookup_entry:(file, i, ia);
if i <> 0 then
write(out, <:<10>*** lookup error, :>,
case (i//3 + 1) of (
<:catalog i/o error:>,
<:entry not found:>,
<:name format illegal:>))
else
begin
comment create transformed file;
for i:= 2 step 1 until 10 do ia(i):= 0;
monitor(68)generate_name:(z, i, ia);
monitor(40)create_entry:(z, i, ia);
raf:= 2;
get_zone_6(z, zone_des);
i:= 1;
open(z, 4, string zone_des.raf(increase(i)), 0);
get_zone_6(file, zone_des);
i:= 1;
open(file, 4, string zone_des.raf(increase(i)), 0);
for class:= read_char(file, val) while val <> 25 do
begin
if 96 <= val and val <= 125 then
val := val - 32;
out_char(z, val);
end for class;
out_char(z, 25);
close(z, true);
close(file, true);
\f
comment conv_tx * page 3 27 09 77, 9.56
0 1 2 3 4 5 6 7 8 9 ;
comment rename transformed entry;
for i:= 1 step 1 until 4 do ia(i):= zone_des(i+1);
i:= monitor(46)rename_entry:(z, i, ia);
if i = 3 then
begin
comment the file exist with temp scope;
monitor(48)remove_entry:(file, i, ia);
monitor(46)rename_entry:(z, i, ia);
end entry exist
else
begin
if i <> 0 then
write(out, <:<10>***rename error, :>,
case i of ( <::>,
<* 2: *> <:catalog i/o error:>,
<* 3: *> <:imposible:>,
<* 4: *> <:entry protected:>,
<* 5: *> <:area process used:>,
<* 6: *> <:name format illegal:>,
<* 7: *> <:catalog inconsistent:>));
end ;
end create;
end transformation;
comment build the message;
mes_buf(0):= 30 shift 12 add (1 shift 9);
mes_buf(1):= real <:conv:> shift (-24) extract 24;
mes_buf(2):= real <:conv:> extract 24;
mes_buf(3):= paper;
get_zone(file, zone_des);
for p:= 4 step 1 until 7 do
mes_buf(p):= zone_des(p-2);
comment send the message;
p:= parent_mes(mes_buf);
if p <> 1 then system(9)run_time_alarm:(p, <:<10>print :>);
\f
comment conv_tx * page 4 27 09 77, 9.56
0 1 2 3 4 5 6 7 8 9 ;
i:= mes_buf(0);
if i <> 0 then
write(out, <:<10>convert error : :>,
case (if i <= 7 then i else ( i -(19-(7+1)))) of (
<* 1: *> <:cbufs exceeded:>,
<* 2: *> <:file not visible:>,
<* 3: *> <:file has login scope:>,
<* 4: *> <:temporary resources insufficient:>,
<* 5: *> <:file in use:>,
<* 6: *> <:file not area:>,
<* 7: *> <:file is no text file:>,
<* 19: *> <:attention status at remote batch terminal:>,
<* 20: *> <:device unknown:>,
<* 21: *> <:device not printer:>,
<* 22: *> <:parent device disconnected:>));
conv:= i;
end;
end
if warning.yes
(mode 0.yes
message conv not ok
lookup conv)
▶EOF◀