|
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: 6144 (0x1800) Types: TextFile Names: »tgetconv«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ. └─⟦b2ec5d50f⟧ └─⟦0b92c64d5⟧ »ctb« └─⟦this⟧
getconv = set 30 1 scope user getconv getconv = algol begin write(out,<:<12><10> getconv versionid: 76 10 19, 3 <10>:>); begin comment sm 75.09.08 getconv ...1... ; comment the program converts areas that have been copied to magtape by the program saveconv. each area is copied from tape to disc and is then converted (by means of the standard procedure system(10,...). program call: getconv <tape-id>.<mode> <fileno>.<number> or getconv <tape-id>.<mode> or getconv <fileno>.<number> or getconv <tape-id> ::= mt<identifier> <mode> ::= mto, mte, nrz or nrze <fileno> ::= integer, number of the first file on the tape to be converted <number> ::= integer, number of files to be converted (that is until the claims of the process are exceeded) default values: mtsaveconv.mto 1.<max> a log is written on current output during execution; integer procedure convert(index, length); value index, length; integer index, length; begin comment the procedure converts characters that are packed in input(index) to an integer. the number of characters (digits) is specified by the parameter length; integer i, j, k; integer array cif(1:length); for i:=1 step 1 until length do begin j:=input(index) shift (-8*(length-i)) extract 8; for k:=0 step 1 until 9 do if j=48+k then begin cif(i):=k; goto contin; end; contin: end i; j:=0; for i:=1 step 1 until length do j:=j*10+cif(i); convert:=j; end; \f comment sm 75.09.08 tgetconv ...2... ; zone input, area(256,2,stderror); integer i, j, k, number, size, paper, fileno, mode, par1, par2, par3, par4; real array name,param1,param2, param3, param4, tapeid(1:2); integer array moni, syst(1:10); boolean tapeok, fileok; procedure testtape; begin integer i; if param1(1) shift (-32) shift 32 <> real<:mt:> then goto endproc; mode:=-1; for i:=1 step 1 until 4 do if param2(1)=real(case i of (<:mto:>,<:mte:>,<:nrz:>,<:nrze:>)) then mode:=(i-1)*2; if mode=-1 then goto endproc; tapeid(1):=param1(1); tapeid(2):=param1(2); tapeok:=true; endproc: end; procedure testfile(param1, param2); value param1, param2; real param1, param2; begin fileno:=param1-1; number:=param2; if fileno<=0 then fileno:=1; fileok:=true; end; procedure paramerr; begin write(out,<:<10>parameter error.:>); goto endp; end; moni(2):=long<:dis:> shift (-24) extract 24; moni(3):=long<:c:> shift (-24) extract 24; for i:=4, 5, 9 do moni(i):=0; \f comment sm 75.12.04 tgetconv ...2a... ; comment the parameters to the program-call (if any) are checked; tapeok:=false; fileok:=false; par1:=system(4,1,param1); if par1=0 then goto cont; par2:=system(4,2,param2); par3:=system(4,3,param3); if par3=0 then begin comment tapeid.mode or fileno.number; if par1=4 shift 12 + 10 and par2=8 shift 12 + 10 then testtape else if par1=4 shift 12 + 4 and par2=8 shift 12 + 4 then testfile(param1(1), param2(1)); if -,tapeok and -,fileok then paramerr; end else begin comment tapeid.mode and fileno.number; par4:=system(4,4,param4); if par1=4 shift 12 + 10 and par2=8 shift 12 + 10 then testtape; if tapeok and par3=4 shift 12 + 4 and par4=8 shift 12 + 4 then testfile(param3(1), param4(1)); if -,tapeok or -,fileok then paramerr; end; cont: if -,tapeok then begin tapeid(1):=real<:mtsav:> add 101; tapeid(2):=real<:conv:>; mode:=0; end; i:=1; open(input,mode shift 12+18, string tapeid(increase(i)),0); if fileok then goto firstfile; fileno:=1; setposition(input,fileno,0); inrec6(input,512); number:=convert(4,3); \f comment sm 75.09.08 tgetconv ...3... ; firstfile: if number<=0 then goto endprog; write(out,<:<10> calls of convert:<10>answer<10> papertype<10>:>, <: filename<10>:>); for i:=1 step 1 until number do begin fileno:=fileno+1; setposition(input,fileno,0); inrec6(input,512); if input(2)=real<:chang:> add 101 then begin comment the current file specifies a new papertype; fileno:=fileno+1; setposition(input,fileno,0); inrec6(input,512); end; if input(2)=real<:all f:> add 105 then goto endprog; comment no more files to be converted; name(1):=input(3); name(2):=input(4); paper:=convert(7,3); size:=convert(9,4); moni(1):=size+4; size:=size+3; j:=1; open(area,4,string name(increase(j)),0); monitor(40,area,0,moni); comment create area; outrec6(area,512); comment the area is copied from tape to disc; for k:=1 step 1 until 128 do area(k):=input(k); for j:=1 step 1 until size do begin outrec6(area,512); inrec6(input,512); for k:=1 step 1 until 128 do area(k):=input(k); end; area(128):=area(128) shift (-8) shift 8 add 25; close(area,true); comment the parameters to the system(10...)-call are initialised; for j:=1 step 1 until 8 do syst(j):=case (j) of ( 30 shift 12 + 1 shift 9 + 1, long <:con:> shift (-24) extract 24, long <:v:> shift (-24) extract 24, paper, name(1) shift (-24) extract 24, name(1) extract 24, name(2) shift (-24) extract 24, name(2) extract 24); system(10,1,syst); comment message to boss, convert area; j:=1; write(out,<:<10>:>,<<ddd>,syst(1),<< ddd>,fileno,<: :>, string name(increase(j))); end i; endprog: setposition(out,0,0); close(input, true); endp: end end; ▶EOF◀