DataMuseum.dkPresents historical artifacts from the history of: CR80 Hard and Floppy Disks |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CR80 Hard and Floppy Disks Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 3424 (0xd60) Types: TextFile Names: »INPARAMS.S«
└─⟦b8af24a88⟧ Bits:30005796 CR80 Disc Pack ( MINICAMPS ) └─ ⟦this⟧ »GENS.D!SWELLLIB.D!INPARAMS.S«
submodule inparams; %SOURCE @**GENS.D*SWELLPREFIX.D*GENERALPARAMS.S %SOURCE @**GENS.D*SWELLPREFIX.D*MONITORNAMES.S %SOURCE @**GENS.D*SWELLPREFIX.D*IOSPARAMS.S %SOURCE @**GENS.D*UTILITYHELP.D*UTH.I export var ifiletype: filetype; "input file descr ofiletype: filetype; "output file descr export procedure readparams(r6); "all registers destroyed "============================" " read the second line of the parameter file var link: integer; i_open, o_open: boolean; init i_open= false; o_open= false; const namelistmax= 10; const kwsize= 1; "in words" type keywords= (k_error, k_i, k_o, k_top); var keyword: array [0..k_top*kwsize-1] of integer; keywordindex: keywords; nameno: integer; fromadam: integer; fsn: file_system_name; vol: volume_name; namelist: array [0..size(file_name)*namelistmax-1] of integer; workarea: array [0..15] of integer; init keyword[k_i *kwsize..(k_i +1)*kwsize-1]= 'I'; keyword[k_o *kwsize..(k_o +1)*kwsize-1]= 'O'; begin r6=> link; address(pfiletype)=> r4; repeat readkeyword(kwsize,1,k_top,r0,address(keyword)=>r4,r6); r0=> keywordindex; pfiletype.s=> r4; case r0:keywords of k_error: fileerror(address(pfiletype)=>r4, address('illegal keyword(:0:)')=>r5, 0=>r7, r6); k_i, k_o: begin " read file id " address(default_fsn)=> r6; address(fsn)=> r7; movm(size(file_system_name), r6@file_system_name, r7@file_system_name); address(default_vol)=> r6; address(vol)=> r7; movm(size(volume_name), r6@volume_name, r7@volume_name); switch mon(infileid, address(fsn)=>r0, address(vol)=>r1, r2, r3, r4, address(namelist)=>r5, address(workarea)=>r6, r7): infileid_exits to if_error: fileerror(address(pfiletype)=>r4, address('infileid(:0:)')=>r5, r7, r6); if_syntax: fileerror(address(pfiletype)=>r4, address('fileid syntax(:0:)')=>r5, r7, r6); end; r2=> nameno; r3=> fromadam; end; end; keywordindex=> r6; case r6:keywords of k_i: if i_open =>r6 = false then begin openfile(address(ifiletype)=>r4, address(fsn)=>r0, address(vol)=>r1, nameno=>r2, fromadam=>r3, address(namelist)=>r5, dfiletype.f=>r7, r6); openstream(r4, input_mode=>r3, r6); true =>r6 =>i_open; end; k_o: if o_open =>r6 = false then begin openfile(address(ofiletype)=>r4, address(fsn)=>r0, address(vol)=>r1, nameno=>r2, fromadam=>r3, address(namelist)=>r5, dfiletype.f=>r7, r6); switch mon(io,reset,ofiletype.f=>r4,r7): error_done to err: fileerror(address(ofiletype)=>r4, address('reset output(:0:)')=>r5,r7,r6); end; openstream(address(ofiletype)=>r4, output_mode=>r3, r6); true =>r6 =>o_open; end; end; until keywordindex=>r0 = k_top; if i_open =>r6 = false then begin movm(size(filetype), (address(cinfiletype)=>r0)@filetype, (address(ifiletype)=>r1)@filetype); openstream(address(ifiletype) =>r4, input_mode =>r3, r6); end; if o_open =>r6 = false then movm(size(filetype), (address(coutfiletype)=>r0)@filetype, (address(ofiletype)=>r1)@filetype); exit(link); end "readparams"; endmodule "page«ff»