LnSOS BOOT 1.1 SOS.KERNEL SOS KRNLI/O ERRORFILE 'SOS.KERNEL' NOT FOUND%INVALID KERNEL FILE: xةw,@  ȱlmi8#)!)BAYA.2v88' 'GETLIB2.TEXT 7l8"8$HBDEMO.LIB?$8#8%HBDEMO.TEXTA08#8%MKSCR5.LIB$8#8%MKSCR5.TEXT,8#8%SHARE1.TEXT r6o.TGENUTIL3.TEXT4rr-TGENUTIL3.LIB0^rr,SOSTIME.CODEro.TGENUTIL3.CODE"rrIII.PCL.20.4u' BAYA.2888%LABELMAKER.TEXT+4r4; LABELMAKER.FONTFr5 ; FONT.MAKER.FONTIr5; -GENUTIL3.TEXTL=xr6r ,SOSTIME.TEXT >dLԡm#i㰼m#iЕOLԡȱfg hi !dLԡ憦  Ljmkm l y`2 Lԡ8(Je稽)ʈ@L8$8$ A C D B E F G H J K EEECC0^O^e2ldblnkok : boolean; 2filtrblnk : boolean; 2 2editold :boolean; 2hiliton : boolean; 2leadspace :boolean; 2trailspace :boolean):boolean; 2{true if strchngd or not editold} 2 function getrealf (var val : real; 3var ordexit : integer; 3 3var boolean); function gastrf( var astr : string; 2var ordexit : integer; 2 2var strchngd : boolean; 2var quickout : boolean; 2var nonblank : boolean; 2 2ctlset1, {permit exit at initial entry} 2ctlset2,charset: diagset; 2 2fldsiz : integer; readastr ( var astr : string; 7var ordexit : integer; 7var strchngd : boolean; 7var quickout : boolean; 7var nonblank : boolean; 7ctlset1, ctlset2, charset : diagset; 7fldsiz : integer); procedure makevp(fldsiz:integer; leadspace, trailspace : str : string);  procedure getastr(wslind : boolean; fldsiz : integer; instr : string; =var outstr : string; =var ordnum, slind :integer; =var change : boolean); procedure mkbraks( fldsiz : integer);  procedure click;  procedure function getinum (var ival : integer ):boolean;  procedure gtstrnum(var val: real; var null : boolean); function qkgetint( maxi,mini: integer):integer;  procedure rdchafld (fldsiz : integer; var outstr:string ); procedure lftjust( var ald(fldsizin :integer; var val : real; Cvar strlen,ndec : integer; Cvar numeric, null : boolean);   procedure getnum (var val: real; var null : boolean);  function getnum2 ( ndec : integer; var val : real): boolean; real; 6maxdec:integer; 6nullok : boolean; 6var rval :real):boolean; 6{true if not null } (  procedure strtonum( stralph : string; var val:real; Bvar strlen, ndec : integer; Bvar numeric,null : boolean); {April 23,1982}  procedure rdrlf/share1.code} share1, 0{$using .profile/hb/alib2.code} alib2; $  procedure mkgetbox(fldsiz : integer); function getlimf( maxi,mini, nuldefv : integer; nullok : boolean; 5var ival :integer):boolean;  function getlimrf( maxr,minr, nuldefv : unit getlib2; intrinsic code 27; { 2/17/84} {Jan 16, 1986 modified "use...", no change to interface change back to # 34 when getlib}  {used in parmain, rep and upd } ' interface ' uses realmodes, transcend, applestuff, 0{$using .profile/hb  !"#$%&'()*+,-./0123456789:;<=>numchngd : boolean; 3var quickout : boolean; 3var null : boolean; 3 3nullok : boolean; 3 3fldsiz : integer; 3realbool : boolean; {true if real, else integer} 3maxdec : integer; 3 3ctlset1, ctlset2 : diagset; {permit exit at initial entry} 3 3editold :boolean; 3hiliton : boolean; 3 3leadspace, 3trailspace : boolean):real; 2 function getintf( var vali : integer; 3var ordexit : integer; 3 3var numchngd : boolean; 3var quickout :boolean; 3var null : boolean; 3 3nullok : boolean; 3procedure strtonum{ stralph : string; var val:real; Bvar strlen, ndec : integer; Bvar numeric,null : boolean}; {April 23,1982} ){assumes all character are space, 0..9, period, + or -. 2-will check for multiple .,+, or -. 2-deletes all spaces from nd null then rval := nuldefv; 6 6good := (rval <= maxr) and (rval >= minr); 6 6if not good then beep; 6 6until good; 6 /end; {else..} / / /getlimrf := (not null); / )end; {getlimrf} 0 % % %  epeat {until good} 0 6null := false; 6rval := getrealf(rval,ordx,numchngd,quickto, null, >nullok, >10, {fldsiz} >true, {realbool} >maxdec, >[13],[13], >false, {editold} >false, {hiliton} >true, {ldspace} >true); {trailspace} > 6if nullok a- ,begin , ,if nullok and ( (nuldefv > maxr ) or (nuldefv < minr ) ) then 0begin 0msg1; 0beep; 0writeln('impossible data to getlimrf : max, min, default'); 0writeln(maxr,' ',minr,' ',nuldefv); 0msg2; 0null := true; 0end ,else 0begin 0 0r)end; {getlimf} 0 % function getlimrf; {( maxr,minr, nuldefv : real; 6maxdec:integer; 6nullok : boolean; 6var rval :real):boolean; } 6{true if not null } ({set to use fldsize of 10 } (var ordx:integer; ,numchngd, quickto, null, good : boolean; {hiliton} >true, {ldspace} >true); {trailspace} > 6if nullok and null then ival := nuldefv; 6 6good := (ival <= maxi) and (ival >= mini); 6 6if not good then beep; 6 6until good; 6 /end; {else..} / / /getlimf := (not null); / max, min, default'); 0writeln(maxi,' ',mini,' ',nuldefv); 0msg2; 0null := true; 0end ,else 0begin 0 0repeat {until good} 0 6null := false; 6ival := getintf(ival,ordx,numchngd,quickto, null, >nullok, 4, [13],[13], >false, {editold} >false, al :integer):boolean; } 5{true if not null } 5 (var ordx:integer; ,numchngd, quickto, null, good : boolean; - ,begin , ,if nullok and ( (nuldefv > maxi ) or (nuldefv < mini ) ) then 0begin 0msg1; 0beep; 0writeln('impossible data to getlimf : 'resetvp; 'fndcurpos(ulx,uly); 'dfvp(ulx,uly, (ulx+fldsiz+7), (uly+2) ); 'invercha; 'clearvp; 'normcha; 'gotoxy(2,1); 'mkbraks( (fldsiz+2 ) ); 'end; {mkgetbox} ' ' ' function getlimf; {( maxi,mini, nuldefv : integer; nullok : boolean; 5var ivtr, nostr : stralib6; 2hiliton : boolean; 2leadspace, 2trailspace : boolean); #  implementation  % $ procedure mkgetbox; {(fldsiz : integer); } '{2+2+fldsiz+2+2 x 3, centered brackedts if ld, tr space } 'var ulx,uly :integer; ' 'begin ; 2yestr, nostr : stralib6; 2 2ctlset1 : diagset 2{contains initial "exit" characters} ; 2 2editold: boolean; 2 2hiliton : boolean; 2leadspace, 2trailspace : boolean):boolean; 0 procedure putbool(valbool : boolean; 2fldsiz : integer; 2yestring; 2fldsiz : integer; 2hiliton : boolean; 2leadspace, 2trailspace : boolean); 0 function getboolf(var valbool : boolean; 2var ordexit : integer; 2var boolchngd : boolean; 2var quickout : boolean; 2 2fldsiz : integer; 2yescha, nocha :char6 6hiliton : boolean; 6leadspace, 6trailspace : boolean); 3 procedure putreal( val : real; 3fldsiz : integer; 3numdec : integer; 3null : boolean; 3 3hiliton : boolean; 3leadspace, 3trailspace :boolean); 3 procedure putastr( astr : s 3fldsiz : integer; 3ctlset1, ctlset2 : diagset; {permit exit at initial entry} 3 3editold :boolean; 3hiliton : boolean; 3leadspace, 3trailspace : boolean):integer; 2 procedure putint( vali : integer; 6fldsiz : integer; 6null : boolean; string before strlen. 2- returns val = 0 if strlen = 0 }  var i,j,k : integer; %anum,fact : real; %plus : boolean; %alpha : char; % % begin 'val := +0; 'numeric := true; 'null := false; 'ndec := 2; ' '{eliminate blanks} 'while pos(' ',stralph) <> 0 do delete (stralph,pos(' ',stralph),1); , '{ handle + or -} 'if length(stralph) > 0 then ,begin ,plus := true; ,if (stralph[1] = '+') or (stralph[1] = '-') then /begin /plus := (stralph[1] = '+'); /delete(stralph,1,1); /e-for i := 1 to length(wstr) do 1if not (ord(wstr[i]) in numset) then good := false; -if good then 5begin 5strtonum(wstr,val,i,ndec2,numeric,null); 5good := numeric and not null and (ndec2 <= ndec) ; 5end; -end {if length > } else null := truenumeric - could be global} #good := true; #null := false; #val := 0; #repeat {until good} 'if not good then beep; 'good := true; 'wraptmp(off); 'clearln; 'readln(wstr); 'wraptmp(resetw); 'if length(wstr) > 0 then -begin s input to no more than ndec integers to right of decimal $- returns false if null(no number) else true $} var i,ndec2 : integer; $wstr : string[11]; $good,numeric, null : boolean; $numset : set of 0..255; $ begin #numset := [32,43,45,46,48..57]; {:= numeric and not null; 5end; -end {if lenght > } else null := true; 'until good; #normcha; end; {getnum}  function getnum2; {( ndec : integer; var val:real):boolean;} $ #{ %warning - does not use getcha - no help or char commands $ $- limit'wraptmp(off); 'clearln; 'readln(wstr); 'wraptmp(resetw); 'if length(wstr) > 0 then -begin -for i := 1 to length(wstr) do 1if not (ord(wstr[i]) in numset) then good := false; -if good then 5begin 5strtonum(wstr,val,i,j,numeric,null); 5good g[11]; $good,numeric : boolean; $numset : set of 0..255; $ begin #numset := [32,43,45,46,48..57]; {numeric - could be global} #good := true; #null := false; #val := 0; #repeat {until good} 'if not good then beep; 'good := true; ull); &gotoxy(0,0); #end; {of rdrlfld} procedure getnum; {(var val:real; var null : boolean);} #{warning - does not use getcha - no help or char commands } {assume vp 11x1, null = true if first char is }  var i,j : integer; $wstr : strini := 1; &onechstr := ' '; &numstr := ''; &repeat {until end of field} *readcha(onechar); *onechstr[1] := onechar; *numstr := concat(numstr,onechstr); *i := i + 1; *curright; *until (i = fldsizin + 1); & &strtonum(numstr,val,strlen,ndec,numeric,nend; { end of strtonum} 1 & procedure rdrlfld{fldsizin :integer; var val : real; Cvar strlen,ndec : integer; Cvar numeric, null : boolean}; &var i: integer; *numstr : string; *onechstr : string[1]; *onechar : char; ( #begin ( &gotoxy(1,0); &?numeric := (anum >= 0) and (anum <= 9); ?val := val + (anum/fact); ?fact := fact * 10; ?end; ;end else ndec := 0; , +end; {if not null and numeric } &if not numeric then val := 0; &if not plus then val := - val; & & & l := val + ( anum * fact); :fact := fact * 10; :end; ,{handle digits right of decimal} ,if numeric then if (i > 0) and (i < strlen ) then :begin :ndec := strlen - i; :fact := 10; :for k := (i+1) to strlen do ?begin ?anum := ord(stralph[k])- 48; ll and numeric then ,begin ,val := 0; ,{handle digits left of decimal} ,fact := 1; ,if i = 0 then j := strlen else j := i-1; ,if j > 0 then for k := j downto 1 do :begin :anum := ord(stralph[k]) - 48; :numeric := (anum >= 0) and (anum <= 9); :va' '{handle decimal(s) } 'if not null and numeric then ,begin ,i := pos('.',stralph); ,if i > 0 then 1begin 1stralph[i] := '0'; 1numeric := pos('.',stralph) = 0; 1stralph[i] := '.'; 1end; -end; { if ...} - ({compute real value} (if not nund ; {from if} ,end; {length >0} , 'numeric := (pos('+',stralph) = 0) and (pos('-',stralph) = 0); 'strlen := length(stralph); 'if numeric then 2begin 2if (strlen = 0 ) then null := true @else if (stralph[1] = 'n') then null := true; 2end; ' ; 'until good; 'getnum2 := not null; #normcha; end; {getnum2} function getinum; {(var ival : integer):boolean;} %var rval :real; )null : boolean; ) %begin %ival := 0; %null := not getnum2( 0,rval); %if not null then ival := trunc(rval + 0.005); %getinum := not null; %end; {getinum}  procedure gtstrnum; {(var val :real; var null : boolean);} {6/3/82}  {arbitrarily -100 to 100, works with getnum2, assumes vp 11x1 } { rejects values beyond two decimal places, truncates number to same}C8 : {left} Gif xpos > 0 then curleft else beep; C21: {right} Gif (xpos < (fldsiz-1) ) then curright _else beep; C C27: {esc clear / reset} Gbegin Gkesc := kesc + 1; Gif kesc = 2 then Sbegin Sclearln; Swrite(instr); Sgotoxy(0,0); Skesc :=set := ctlset2 + charset; 4kesc := 0; 4first := true; 4 4repeat {until return, apple return, or apple esc}  21 then clearln; 4wrklset1 := [13, 16, 18]; ({codectrl} (ctlset2 := [8,21,13, 27, 18, 16] ; (charset := [32,48..57, 60,62, 32..127]; ( (jerrn := 0; (wrkset := ctlset1 + ctlset2 + charset; (getcha(wrkset, ordnum, onechar); ( ( (if ordnum in ctlset1 then ;case ordnu(fndcurpos(rf1,rf2); (dfvp(rf1, rf2, rf1+fldsiz-1, rf2); (while length(instr) < fldsiz do instr := concat(instr,' '); ( {add trailing blanks } (write(instr); (gotoxy(0,0); ) ( (if wslind then {colctrl} ctlset1 := [10, 13, 11, 16, 18] 2else cttring; 2var outstr : string; 2var ordnum, 7slind :integer; +var change : boolean); } # #var ctlset1, ctlset2, charset, wrkset : diagset; (first : boolean; (kesc, xpos, ypos, jerrn : integer; (onechar : char; ( "begin ( (resetvp; eger; %begin %k := length(astr); %while (pos(' ',astr) = 1) and (k > 0) -do begin 0delete(astr,1,1); 0astr := concat(astr,' '); 0k := k - 1; 0end; %end; {lftjust}    procedure getastr; {( wslind : boolean; 6fldsiz : integer; 6 instr : s,outstr) = length(outstr)) and (length(outstr) > 1 ) do /delete(outstr,length(outstr), 1); {delete trailing } %end; {rdchafld} ' ' '  procedure lftjust; {( var astr : string);} %{keeps length - removes leading blanks - puts on end} % var k : int)onechstr[1] := onechar; )outstr := concat(outstr, onechstr); )i := i + 1; )curright; )until (i = fldsiz ); % %{ removed 11/7/82 %while (pos(' ',outstr) = 1 ) and (length(outstr) > 1) 8do delete(outstr, 1,1); %}{delete lead} % %while (pos(' ' trailing & leading blanks} & &var onechstr : string[1]; *onechar : char; *i: integer; * %begin %gotoxy(0,0); %onechstr := ' '; %outstr := ''; %i := 0; % %repeat {until end of field} )readcha(onechar); {reads from screen} not good then beep; 6 5dfvp(x1,y1,x2,y2); 5gotoxy(xpos,ypos); 5 5until good; 5 )qkgetint := ival; )end; {qkgetint} 0 #  procedure rdchafld ; {(fldsiz : integer; var outstr:string ); } ({ reads character field from screen , *deletes= false; 6 6ival := getintf( Fival, Fordx, Fnumchngd, Fquickto, Fnull, Ffalse, {nullok } F6, F[13], F[13], Ffalse, {editold} Ffalse, {hiliton} Ftrue, {ldspace} Ftrue); {trailspace} > 5good := (ival <= maxi) and (ival >= mini); > 5if function qkgetint; {( maxi,mini: integer):integer;} 5 (var ordx:integer; ,numchngd, quickto, null, good : boolean; ,x1,x2,y1,y2, xpos, ypos, ival : integer; ,begin ,fndcurpos(xpos,ypos); ,fndsiz(x1,y1, x2,y2); - 0 ,repeat {until good} 0 6null :   var val1,val2 : real; $good : boolean;   begin #repeat {val in range } (invercha; (null := not getnum2(2,val); (normcha; (good := (val >= -100.0) and (val <= 100.0); (if not good then beep; (until good; #end; {gtstrnum} # # 0; Send else clearln; Gend; @ C18 : {apple esc - exit without change} Hbegin Hclearln; Hwrite(instr); Hend; B @13,16 : slind := slind + 1; H Hend {case} = = ;else {ordnum in charset} if (xpos <= fldsiz) @then begin Fwrite(onechar); Fend Celse beep; 5 5 . 4until (ordnum = 13) or (ordnum = 18) or (ordnum = 16); ' 8 ' 'end; {else} .rdchafld ( fldsiz, outstr ); {reads from screen} .clearln; .while length(outstr) < fldsiz do outstr := concat(outstr,' '); .write(outstr:fldsiz); =dfvp(rf1,rf2, rf1+fldsiz-1, rf2); =clearvp; =end; 4end; {makevp} B ' ' ' function gastrf; {( var astr : string; 2var ordexit : integer; 2 2var strchngd : boolean; 2var quickout : boolean; 2var nonblank : boolean; 2 2ctlset1, [permit exit + 1; Jend =else rf1x := rf1; =if trailspace then fldsiz2 := fldsiz2 + 1; = =dfvp(rf1, rf2, rf1+fldsiz2-1, rf2); =clearvp; = =dfvp( rf1x, rf2, rf1x+fldsiz-1, rf2) =end 4else {not leadspace or trailspace} =begin nteger; 7leadspace, trailspace : boolean);} 5var fldsiz2, rf1x : integer; 5begin 5resetvp; 5fndcurpos(rf1,rf2); 5 5if leadspace or trailspace then =begin : =fldsiz2 := fldsiz; =if leadspace then Jbegin Jfldsiz2 := fldsiz2 +1; Jrf1x := rf1 t(astr,' '); +{add trailing blanks } + 1 'strchngd := (astr <> instr); ' 'instr := astr; 'while pos(' ',instr) > 0 do delete(instr,pos(' ',instr), 1); 'nonblank := length(instr) > 0; ' ' 'end; { readastr } ' ' &procedure makevp; {(fldsiz:i'getcha(wrkset, ordnum, onechar); ( ( 'if not (ordnum in ctlset1) then editastr else quickout := true; ' 'ordexit := ordnum; . 'if not quickout then rdchafld ( fldsiz, astr ); {reads from screen} ' 'while length(astr) < fldsiz do astr := concad; {editastr} # (begin ( ( (instr := astr; (fixstr(astr,fldsiz, true{ldblnkok}, true{trblnkok}, true{filtrblnk} ); ( {add trailing blanks } (write(instr); (gotoxy(0,0); ( ( 'wrkset := ctlset1 + ctlset2 + charset + [8, 21, 27, 62]; case} 8 6else if ordnum in charset then if (xpos < fldsiz) ;then begin Awrite(onechar); Aif (xpos = (fldsiz - 1) ) then click; Aend >else beep; 0 0 ) { 18 : {apple esc - exit without change} Cbegin Cclearln; Cwrite(instr); Cend; = Cend {7if not first then getcha(wrkset, ordnum,onechar); 7first := false; 7 7if ordnum in [8, 21, 27, 18] then ;case ordnum of >8 : {left} Bif xpos > 0 then curleft else beep; >21: {right} Bif (xpos < (fldsiz-1) ) then curright Zelse beep; > >27: ">" } /if not (ordnum in (ctlset2 + [ 21, 62] ) ) 8then clearln; I { la ra esc ">" } /wrkset := ctlset2 + charset + [ 8, 21, 27]; /kesc := 0; / /repeat {until return, apple return, or apple esc} 7fndcurpos(xpos, ypos); to field size} # #var wrkset : diagset; (kesc, xpos, ypos, ordnum : integer; (onechar : char; (instr : string; (first : boolean; ( #procedure editastr; $ /begin /first := true; /quickout := false; / {, r strchngd : boolean; 7var quickout : boolean; 7var nonblank : boolean; 7 7ctlset1, [contains initial "exit" characters] 7ctlset2,charset : diagset; 7fldsiz : integer);} 6 : '{assumes vp is set for this field, 0allways fills in trailing blanks up)gotoxy( (ix+fldsiz+1), iy); )write(']'); )dfvp(ix+1,iy, (ix+fldsiz),iy); )clearln; )end; {mkbraks} , procedure click; $begin $sound(1,1,63); $end; {click} $ $ $ % procedure readastr ; { ( var astr : string; 7var ordexit : integer; 7 7va. 8 ,change := (outstr <> instr); ,end; { getastr} , , procedure mkbraks; {( fldsiz : integer);} %{sets up outside brackets for use with getastr} 'var ix, iy : integer; 'begin; )resetvp; )fndcurpos(ix,iy); )write('['); at initial entry] 2ctlset2, charset: diagset; 2 2fldsiz : integer; 2ldblnkok : boolean; 2filtrblnk : boolean; 2 2editold :boolean; 2hiliton : boolean; 2leadspace :boolean; 2trailspace :boolean):boolean; } 2{true if strchngd or not editold} 2 2var instr: string; 6ulx, uly,lrx,lry : integer; 3 2 2begin 2fndsiz(ulx,uly,lrx,lry); 2 2instr := astr; 2 2if hiliton and (fldsiz > 1 ) then invercha; 2makevp(fldsiz, leadspace, trailspace); 2 5 2if editold then 7begin 7write(astr); 7gotox3 3 3 3if not editold then vali := 0; 3oldvali := vali; 3val := vali; 3 3tempval := 6getrealf (val, @ordexit, @numchngd, @quickout, @null, @ @nullok, @ @fldsiz, @false, {realbool} @0, {maxdec} @ @ctlset1, @ctlset2, @ @editold, @hirailspace : boolean):integer; } % 3var oldvali : integer; 7val, tempval : real; 7alpha : char; 3 3 3begin 3 3if 11 in diag then  } )else null := true; )numchngd := null or (not editold) or (val <> oldval); )end; {if editold ... else } ) &if null and (not nullok) then good := false; . . #until &if editold and (quickout or not strchngd) then numchngd := false )else )begin )if nonblank then .begin .strtonum(wrkstr,val,i,ndec2,numeric,null); .good := numeric and (ndec2 <= maxdec) ; - could be global} #good := true; #null := false; # #repeat {until good} 'if not good then beep; 'good := true; ' 'readastr ( wrkstr, 3ordexit, , 3strchngd, 3quickout, 3nonblank, , 3ctlset1, 3ctlset2, 3numset, 3fldsiz ); 3 : ) 6 : )begin )if realbool then write(val:fldsiz:maxdec) 5else write( round(val):fldsiz); )rdchafld(fldsiz,wrkstr); )end #else {not editold} )begin )val := 0.0; )wrkstr := ''; )end; ) # #oldval := val; # #numset := [32,43,45,46,48..57]; {numeric #makevp(fldsiz, leadspace, trailspace); # #if 11 in diag then 1begin 1msg1; 1writeln('diag 11, in getrealf'); 1writeln(' val fldsiz ',val:12:3, ' ', fldsiz); 1write('editold : '); 1telltrue(editold); 1msg2; 1end; 1 # # #if editold then g; $good,numeric : boolean; $numset : diagset; $oldval : real; $nonblank, strchngd : boolean; $alpha : char; 2 $ulx, uly,lrx,lry : integer; 3 2 $ begin #fndsiz(ulx,uly,lrx,lry); #if hiliton then invercha; set; [permit exit at initial entry] 3 3editold :boolean; 3hiliton : boolean; 3 3leadspace, 3trailspace : boolean):real; } 3 3 ${ $- limits input to no more than maxdec integers to right of decimal $} $ var i,ndec2 : integer; $wrkstr : strinl : real; 3var ordexit : integer; 3 3var numchngd : boolean; 3var quickout : boolean; 3var null : boolean; 3 3nullok : boolean; 3 3fldsiz : integer; 3realbool : boolean; [true if real, else integer] 3maxdec : integer; 3 3ctlset1, ctlset2: diag?true, {trblnkok} ?filtrblnk); 6 : 2gastrf := strchngd or (not editold) or (instr <> astr); 2if hiliton and (fldsiz > 1 ) then normcha; 2dfvp(ulx,uly,lrx,lry); {permits re-using gastrf} 2 2end; {gastrf} ' ' ' '  function getrealf; { (var vay(0,0); 7end 2else {new string} 7begin 7astr := ''; 7gotoxy(0,0); 7end; 7 6 : 2readastr ( astr, >ordexit, 7 >strchngd, >quickout, >nonblank, 7 >ctlset1, >ctlset2, >charset, >fldsiz ); > 2fixstr(astr, fldsiz, ldblnkok, liton, @leadspace, @trailspace); = 3vali := round(val); 3getintf := vali; 3 3numchngd := (not editold) or null or (vali <> oldvali); 3 3 3end; {getintf} = 0 2 $procedure putint; {( vali : integer; 6fldsiz : integer; 6null : boolean; 6 6hiliton : boolean; 6leadspace, 6trailspace : boolean); } 6 2begin 2if hiliton then invercha; 2makevp(fldsiz, leadspace, trailspace); 2 2if not null then write(vali:fldsiz) else 4 begin 5if fldsiz > 2 then write('') else write ('_'); 5end; 2library files: /p/hb/comlib.lib $$ 2if valbool then write(yestr:fldsiz) else write(nostr:fldsiz); 2if hiliton then normcha; 2end; {putbool} 2 # begin {initialization} diag4('initialize getlib2 ',''); end.{ getlib2 } 2fldsiz : integer; 2yestr, nostr : stralib6; 2hiliton : boolean; 2leadspace, 2trailspace : boolean); } 2 2begin 2if hiliton then invercha; 2makevp(fldsiz, leadspace, trailspace); 2 write(nostr:fldsiz); 2 2boolchngd := valbool <> oldbool; 2 2getboolf := valbool; 2if hiliton then normcha; 2 2ordexit := ordcha; 2dfvp(ulx,uly,lrx,lry); {permits re-using getboolf} 2end; {getboolf} 2 2 0 procedure putbool; {(valbool : boolean;ckout := false; 2 2getcha( ([ordyes, ordno ] + ctlset1), ordcha, onechar ); 2 2if ordcha = ordyes then valbool := true 2else if ordcha = ordno then valbool := false 2else quickout := true; 2 2gotoxy(0,0); 2if valbool then write(yestr:fldsiz) else2if hiliton then invercha; 2makevp(fldsiz, leadspace, trailspace); 2 2oldbool := valbool; 2 2ordyes := ord(yescha); 2ordno := ord (nocha); 2 2if editold then 5if valbool then write(yestr:fldsiz) 5else write(nostr:fldsiz); 2gotoxy(0,0); 2quion : boolean; 2leadspace, 2trailspace : boolean):boolean; } 2 2var ordyes, ordno : integer; 7oldbool : boolean; 7ordcha :integer; 7onechar : char; 2 7ulx, uly,lrx,lry : integer; 3 2 2begin 2fndsiz(ulx,uly,lrx,lry); : boolean; 2var ordexit : integer; 2var boolchngd : boolean; 2var quickout : boolean; 2 2fldsiz : integer; 2yescha, nocha :char; 2yestr, nostr : stralib6; 2 2ctlset1: diagset [contains initial "exit" characters] ; 2 2editold: boolean; 2 2hilitger; 2hiliton : boolean; 2leadspace, 2trailspace : boolean); } 0 2begin 2if hiliton then invercha; 2makevp(fldsiz,leadspace, trailspace); 2 2write(astr); 2 2if hiliton then normcha; 2end; {putastr} 5 0 0 0 function getboolf; {(var valbool 2makevp(fldsiz, leadspace, trailspace); 2 2if not null then write(val:fldsiz:numdec) 5else 5if fldsiz > 2 then write('') else write ('_'); 2 2if hiliton then normcha; 2end; {putreal} 5 # 3 procedure putastr; {( astr : string; 2fldsiz : inteif hiliton then normcha; 2end; {putint} 5 # 3 procedure putreal; {( val : real; 3fldsiz : integer; 3numdec : integer; 3null : boolean; 3 3hiliton : boolean; 3leadspace, 3trailspace :boolean); } 6 2begin 2if hiliton then invercha; A AA %O^Q6true, {leadspace - one space before entry } 6true {trailspze - one space after entry } :); +click; +end; {entereal}  procedure entermsg; $var ordexit :integer; (strchngd, quickout, nonblank : boolean; ( (begin (dfvp(0,6,79,22); (boxvp; (goto1 - quick exit, no other entries F13 is return, 16 is } 6 6[ 13, 16, 18{open apple esc} ], E{ctlset2 - normal exit} 6true, {editold - true if old value used and editable } 6true, {hiliton - true if entry line to be higlighted } try} 6false, {nullok - true if nulls permitted } 68, {fldsiz - how big a field made available for entry} 6true, {realbool, set to true if real number to be entered} 63, {maxdec - maximum number of digits to right of decimal} 6 6[16,13, 27 ], {ctlset (gotoxy(20,6); (mkbraks(14); (realin := getrealf( 5 realin, {value being entered } 6ordexit, {ord() of exit character, eg 13 of } 6numchngd, {true if value changes } 6quickout, {true if exit due to ctlset1 } 6null, {true if exit with no en+end; {shovals} - procedure entereal; $var ordexit :integer; (numchngd, quickout, null : boolean; ( (begin (dfvp(0,6,79,22); (boxvp; (gotoxy(3,2); (writeln('Enter a number with up to 3 decimal places,'); (writeln; (writeln(' eg 34.5 ');arvp; +gotoxy(0,0); +write ('message is '); +invercha; +writeln(' "',msgstr,'"'); +normcha; +gotoxy(0,1); +writeln('Integer is ',intin:10); +gotoxy(0,2); +writeln('real number is ',realin:10:3); +showbox; +dfvp(0,0,79,23); earvp; 4writeln(' Box values : ulx = ',boxulx); 4writeln(' uly = ',boxuly); 4writeln(' lrx = ',boxlrx); 4write (' lry = ',boxlry); 4normcha; 4end; {showbox} - +begin {showvals} +dfvp(0,0,79,5); +clell,done : boolean; % %ordcha :integer; %onechar :char; % %boxulx, boxuly, boxlrx, boxlry : integer; %msgstr :string; % %realin : real; %intin : integer;  #procedure showvals; $ 0procedure showbox; 4begin 4dfvp(45,2,79,5); 4invercha; 4clprogram hbdemo2; { Jan 21, 1986 }   uses realmodes, transcend, applestuff, {$using .profile/hb/comlib.lib} share1,alib2,getlib2;  var astr : string; %intnum, i, j, k, -scrnum2,scrnum1,scrnum3 : integer; %realnum, a,b,c : real; %good, nu@BCDEFGHIJxy(3,2); (writeln('Enter a message '); (writeln; (gotoxy(0,6); (mkbraks(64); (strchngd := gastrf( 6msgstr, {string being entered } 6ordexit, {ord() of exit character, eg 13 of } 6strchngd, {true if value changes } 6quickout, {true if exit due to ctlset1 } 6nonblank, {true if string is not empty} 6 6[16,13, 27 ], {ctlset1 - quick exit, no other entries F13 is return, 16 is } 6 6[13, 16, 18 ], ={ ctlset2 - normal exit =18 is open apple esc} 6[8, 22, 32..126], ND; "ScreenImage = PACKED ARRAY [1..1923] OF CHAR; "Date_Rec = PACKED RECORD /Month : 0..12; /Day : 0..31; /Year : 0..99; -END; "Time_Rec = PACKED RECORD /Hour : 0..24; /Min : 0..60; /Sec : 0..60; -END; 3  PROCEDURE Store (VAR Image : Scrrse,Flashing,No_Display); "Format = (Right,Left,Center,No_Format); "Week = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday); "Long_Integer = INTEGER[12]; "Big_String = STRING[255]; "Julian = PACKED RECORD -Year : 0..99; -Day : 0..366; +E UNIT GENUTIL3;  INTRINSIC CODE 27;  INTERFACE  CONST "CS = 28; "CEOS = 29; "CL = 30; "CEOL = 31; "ResetVPort = 1; "RestoreVPort = 4; "SetUL = 2; "SetLR = 3; "Bell = 7;   TYPE "CompTypes = (Earlier,Later,Equal); "Display = (Normal,InveKMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ X 1 2 3 4 5 6 7 8 Y5yynnO^ƣ#6numchngd, {true if value changes } 6quickout, {true if exit due to ctlset1 } 6null, {true if exit with no entry} 6false, {nullok - true if nulls permitted } 68, {fldsiz - how big a field made available for entry} ,6,79,22); (boxvp; (gotoxy(3,2); (writeln('Enter an integer number '); (writeln; (writeln(' eg 16 '); (gotoxy(20,6); (mkbraks(14); (intin := getintf( 5 intin, {value being entered } 6ordexit, {ord() of exit character, eg 13 of } } :); 0fixstr(msgstr,60, {max size } 7true, {ldblnkok} 7false,{trblnkok - removes trailing blanks} 7false); {filtrblnk} 0click; 0end; {entermsg} + procedure enterint; $var ordexit :integer; (numchngd, quickout, null : boolean; ( (begin (dfvp(0Anoted that gastrf set trblnkok in calling Afixstr} 6true, {editold - true if old value used and editable } 6true, {hiliton - true if entry line to be higlighted } 6true, {leadspace - one space before entry } 6true {trailspze - one space after entry 660, {fldsiz - how big a field made available for entry} 6true, {ldblnkok - if true dont delete leading blanks} 6false, {filtrblnk - if true, fill in trailing blanks} @{does not seem to be working right 1/24/86 eenImage);  PROCEDURE Restore (Image : ScreenImage);   PROCEDURE Screen_On; PROCEDURE Screen_Off;   PROCEDURE Screen_Dump (VAR Printer : INTERACTIVE);   PROCEDURE SetVPort (ULX,ULY,LRX,LRY : INTEGER);   PROCEDURE DrawBox (ULX,ULY,LRX,LRY : INTEGER);   PROCEDURE PROMPT (Off : Display; X,Y : INTEGER; S : STRING);   PROCEDURE Input (Len,X,Y : INTEGER; Cur_Screen : STRING; VAR New_Screen : STRING); PROCEDURE cInput (Len,X,Y : INTEGER; Cur_Screen : STR128); * *IF ORD(Ch) IN [0..31,127] THEN ,CASE ORD(Ch) OF .0,1,2,3,4,5,6,27,28 : Ch := '-'; .7,8,10,18,19,21,22,25,26 : Ch := '|'; .9,20,30 : Ch := '+'; .11,12,13,14,15,16,17,23,24,29 : Ch := '='; .127 : Ch := '*'; .OTHERWISE 0Ch := '?'; ,END; *Code.Channel := 0; "RequestCode.Reserved := 0; "RequestCode.Stat_Or_Ctrl := 0; "RequestCode.Request_Num := 17; " "FOR y := 0 TO 23 DO $BEGIN &FOR x := 0 TO 79 DO (BEGIN *GOTOXY (x,y); * *UNITSTATUS (1,Ch,RequestCode); * *Ch := CHR(ORD(Ch) MOD 5Reserved : 0..63; 3END; " VAR "x,y : INTEGER; "s : STRING; "RequestCode : Request_Record; "Ch : CHAR; " BEGIN "{$I-} "REWRITE (Printer,'.PRINTER'); "{$I+} $IF IORESULT <> 0 THEN &EXIT (Screen_Dump); & "RequestATION   PROCEDURE Cold_Start; EXTERNAL;  PROCEDURE Screen_Dump { (VAR Printer : INTERACTIVE) }; CONST "Form_Feed = 12; " TYPE "Request_Record = PACKED RECORD 5Channel : 0..1; 5Stat_Or_Ctrl : 0..1; 5Request_Num : 0..255; : Long_Integer; VAR LQUOTIENT,LREMDR : Long_Integer);   FUNCTION Key_Pressed : BOOLEAN;   PROCEDURE SAcceptError (Xc,Yc : INTEGER);  PROCEDURE RAcceptError (Xc,Yc : INTEGER);   PROCEDURE Erase_Screen;   PROCEDURE Reboot_Message;   IMPLEMENTCEDURE SetSysDate (Date : Date_Rec); PROCEDURE SetSysTime (Time : Time_Rec);  PROCEDURE TDS (Date : Date_Rec; VAR StrDate : STRING);   PROCEDURE LDIVIDE (Divdend,Divsor : Long_Integer; VAR Result : Long_Integer);  PROCEDURE LONGDIV (Dividend,Divisor  PROCEDURE GetDay (VAR DOW : STRING);  PROCEDURE GetMonth (VAR MOY : STRING);  PROCEDURE GetSysDate (VAR Date : Date_Rec);  PROCEDURE GetSysTime (VAR Time : Time_Rec);  PROCEDURE GetTime (VAR Strng : STRING); PROCEDURE SetTime (Strng : STRING);  PROON CompareDates (D0,D1 : Date_Rec) : CompTypes; FUNCTION DaysIn (m,y : INTEGER) : INTEGER; FUNCTION DOW (Date : Date_Rec) : Week; FUNCTION Leap (y : INTEGER) : BOOLEAN;  FUNCTION DaysBetween (Date1,Date2 : Date_Rec) : Integer; R Strng : STRING);   PROCEDURE JUSTIFY (VAR Strng : BYTESTREAM; Which_Format : Format; Field : INTEGER);  PROCEDURE Strip_Forward (VAR s : BYTESTREAM);  PROCEDURE Strip_Backward (VAR s : BYTESTREAM);  PROCEDURE UCASE (VAR Strng : STRING);   FUNCTI VAR d : Date_Rec);   PROCEDURE CTS (Time : Time_Rec; VAR Strng : STRING);   PROCEDURE CCS (Ch : CHAR; VAR Strng : STRING);   FUNCTION VALIDATE (Strng : STRING) : BOOLEAN;  FUNCTION VALIDTIME (Strng : STRING) : BOOLEAN;  PROCEDURE VALIDOLLAR (VA PROCEDURE CRL (RealNum : REAL; VAR LongNum : Long_Integer);   PROCEDURE CDS (Date : Date_Rec; VAR Strng : STRING);  PROCEDURE CDJ (Date : Date_Rec; VAR j : Julian);   PROCEDURE CJS (JDate : Julian; VAR Strng : STRING);  PROCEDURE CJD (j : Julian;EGER; VAR Strng : STRING);  PROCEDURE CLS (Intgr : Long_Integer; VAR Strng : STRING);  PROCEDURE CLR (LongNum : Long_Integer; VAR RealNum : REAL);   PROCEDURE CRS (RealNum : REAL; VAR Strng : STRING); eger);  PROCEDURE CSR (Strng : STRING; VAR RealNum : REAL);  PROCEDURE CSD (Strng : STRING; VAR Date : Date_Rec);  PROCEDURE CSJ (Strng : STRING; VAR JDate : Julian);  PROCEDURE CST (Strng : STRING; VAR Time : Time_Rec);   PROCEDURE CIS (Intgr : INTING; VAR New_Screen : STRING; VAR Command : BOOLEAN); PROCEDURE mInput (s : STRING; x,y : INTEGER; VAR Option_Number : INTEGER; VAR mCh : CHAR);   PROCEDURE CSI (Strng : STRING; VAR Intgr : INTEGER);  PROCEDURE CSL (Strng : STRING; VAR Intgr : Long_Int *WRITE (Printer,Ch); (END; & &WRITELN (Printer); $END; " "WRITE (Printer,CHR(Form_Feed)); " "CLOSE (Printer,NORMAL); END; " " PROCEDURE SetSysDate { (Date : Date_Rec) }; VAR StrDate,StrDate_Time : STRING;  BEGIN "CDS (Date,StrDate); "GetTime (StrDate_Time); "StrDate_Time[5] := StrDate[1]; "StrDate_Time[6] := StrDate[2]; "StrDate_Time[7] := StrDate[4]; "StrDate_Time[8] := StrDate[5]; "StrDate_Time[3] := StrDate[7]; "StrDate_Time[4] := StrDate[8]; "SetTime (StrDate_Time); END;  "ELSE $IF LENGTH(New_Screen) > 0 THEN &BEGIN (s := New_Screen; (Justify (s,Left,Len); (Prompt (Normal,X,Y,s); &END; END; PROCEDURE mInput { (s : STRING; x,y : INTEGER; VAR Option_Number : INTEGER; VAR mCh : CHAR) }; $ TYPE "Screen_Line_RangeTE (New_Screen,LENGTH(New_Screen),1); .IF LENGTH(New_Screen) = 0 THEN 0Prompt (Inverse,X,Y,Cur_Screen); ,END; "UNTIL EOLN(KEYBOARD); " "Prompt (Normal,X,Y,Cur_Screen); " "IF Command THEN $BEGIN &Command := FALSE; &Prompt (Normal,1,24,' '); $END0Prompt (Inverse,X+Pos-1,Y,s); .END; *END (ELSE *IF NOT(Command) AND (ORD(c) = 8) AND (LENGTH(New_Screen) > 0) THEN ,BEGIN .IF Pos <> 0 THEN 0IF Pos < Len THEN 2Prompt (Inverse,X+Pos,Y,' '); .Pos := Pos - 1; .Prompt (Inverse,X+Pos,Y,' '); .DELEnd THEN .BEGIN 0Prompt (Normal,1,24,' '); 0Prompt (Normal,X,Y,Cur_Screen); 0EXIT (CInput); .END ,ELSE .BEGIN 0IF Pos = 0 THEN 2BEGIN 4t := ' '; 4Justify (t,Right,LENGTH(Cur_Screen)); 4Prompt (Inverse,X,Y,t); 2END; 0Pos := Pos + 1; NOT(Command); (IF Command THEN *Prompt (Inverse,1,24,'/') (ELSE *Prompt (Normal,1,24,' '); &END $ELSE &IF NOT EOLN(KEYBOARD) THEN (IF (ORD(c) IN [32..126]) AND (LENGTH(New_Screen) < Len) THEN *BEGIN ,New_Screen := CONCAT(New_Screen,s); ,IF Comma31,128..255]) AND (LENGTH(New_Screen) = 0) THEN &BEGIN (IF Command THEN *Prompt (Normal,1,24,' '); (Command := TRUE; (Prompt (Normal,X,Y,Cur_Screen); (New_Screen := s; (EXIT (CInput); &END; $ $IF (c = '/') AND (Pos = 0) THEN &BEGIN (Command := "Pos := 0; " "Justify (Cur_Screen,Left,Len); "Prompt (Inverse,X,Y,Cur_Screen); " "REPEAT $IF Pos <> 0 THEN &IF Pos < Len THEN (Prompt (Inverse,X+Pos,Y,'*'); $ $REPEAT $UNTIL Key_Pressed; $READ (KEYBOARD,c); $CCS (c,s); $ $IF (ORD(c) IN [1.. " " PROCEDURE CInput { (Len,X,Y : INTEGER; Cur_Screen : STRING; VAR New_Screen : STRING; VAR Command : BOOLEAN) }; VAR c : CHAR; $s,t : STRING; $Pos : INTEGER; BEGIN "Command := FALSE; "New_Screen := ''; " "c := ' '; "s := ' '; NGTH(StrYear) < 2 THEN $BEGIN &WHILE LENGTH(StrYear) < 2 DO (StrYear := CONCAT('0',StrYear); &StrYear := CONCAT('20',StrYear); $END "ELSE $StrYear := CONCAT('19',StrYear); " "StrDate := CONCAT(StrDOW,' - ',StrMonth,' ',StrDay,', ',StrYear); END; 'June'; %7 : StrMonth := 'July'; %8 : StrMonth := 'August'; %9 : StrMonth := 'September'; $10 : StrMonth := 'October'; $11 : StrMonth := 'November'; $12 : StrMonth := 'December'; "END; "STR (Date.Day,StrDay); " "STR (Date.Year,StrYear); "IF LE$Friday : StrDOW := 'Friday'; $Saturday : StrDOW := 'Saturday'; "END; " "CASE Date.Month OF %1 : StrMonth := 'January'; %2 : StrMonth := 'February'; %3 : StrMonth := 'March'; %4 : StrMonth := 'April'; %5 : StrMonth := 'May'; %6 : StrMonth := : Week; BEGIN "Day := DOW (Date); "CASE Day OF $Sunday : StrDOW := 'Sunday'; $Monday : StrDOW := 'Monday'; $Tuesday : StrDOW := 'Tuesday'; $Wednesday : StrDOW := 'Wednesday'; $Thursday : StrDOW := 'Thursday'; e[13] := StrTime[5]; "StrDate_Time[14] := StrTime[7]; "StrDate_Time[15] := StrTime[8]; "SetTime (StrDate_Time); END;   PROCEDURE TDS { (Date : Date_Rec; StrDate : STRING) }; VAR StrDOW,StrMonth,StrDay,StrYear : STRING; $Day PROCEDURE SetSysTime { (Time : Time_Rec) }; VAR StrTime,StrDate_Time : STRING;  BEGIN "CTS (Time,StrTime); "GetTime (StrDate_Time); "StrDate_Time[10] := StrTime[1]; "StrDate_Time[11] := StrTime[2]; "StrDate_Time[12] := StrTime[4]; "StrDate_Tim = 0..80; " "Option_Record = PACKED RECORD 4Position, 4StrLength : Screen_Line_Range; 2END; 2 "Options_Array = PACKED ARRAY [1..27] OF Option_Record; VAR #Options : Options_Array; #Position, #StrLength, #Max_Options : INTEGER; #Scanning : BOOLEAN; #Ch : CHAR; " "PROCEDURE Set_Option_Field (d : Display; Option_Number : INTEGER); "VAR t : STRING; "BEGIN $WITH Options[Option_Number] DO &BEGIN (t := COPY(s,Position,StrLength); (Prompt (d,Position+x-1,y,t); &NTEGER;  BEGIN "Pos:=0; "New_Screen:=''; "S:=' '; "Cur_Screen:=CONCAT(Cur_Screen,COPY(Blank_Line,1,Len-LENGTH(Cur_Screen))); "PROMPT (Inverse,X,Y,Cur_Screen); "REPEAT $IF Pos <> 0 THEN &IF Pos < Len THEN (PROMPT (Inverse,X+Pos,Y,'*'); $REPEAT $ END;       PROCEDURE INPUT { (Len,X,Y : INTEGER; Cur_Screen : STRING; VAR New_Screen : STRING) }; CONST Blank_Line = ' ';  VAR C : CHAR; $S : STRING; $Pos : I$Normal : WRITE (S); $Inverse : BEGIN 1CCS(CHR(18),s1); 1CCS(CHR(17),s2); 1WRITE (s1,S,s2); /END; $Flashing : BEGIN 1CCS(CHR(18),s1); 1CCS(CHR(17),s2); 1FOR i := 1 TO LENGTH(S) DO 3s[i] := CHR(ORD(s[i])+128); 1WRITE (s1,S,s2); /END; "END; +i,s4); " "PROMPT (Normal,ULx,LRy,CONCAT('',s3,'')); END;  PROCEDURE PROMPT { (Off : Display; X,Y : INTEGER; S : STRING) }; VAR s1,s2 : STRING; $i : INTEGER;  BEGIN "X := X-1; "Y := Y-1; " "GOTOXY (X,Y); " "CASE Off OF ,LRx-ULx); " "s2[0] := CHR(LRx-ULx+1); "FILLCHAR (s2[2],LRx-ULx-1,CHR(32)); "s2[1] := '|'; "s2[LRx-ULx+1] := '|'; "MOVELEFT (s2,s4,LRx-ULx+1); " "PROMPT (Normal,ULx,ULy,CONCAT('',s3,'')); " "FOR i := 1 TO LRy-ULy-1 DO " Prompt (Normal,ULx,ULyTE (CHR(SetUL)); END;    PROCEDURE DrawBox { (ULX,ULY,LRX,LRY : INTEGER) };  VAR i : INTEGER; $s, $s2 : PACKED ARRAY [0..255] OF CHAR; $s3, $s4 : STRING;  BEGIN "s[0] := CHR(LRx-ULx-1); "FILLCHAR (s[1],LRx-ULx-1,CHR(128)); "MOVELEFT (s,s3"WRITE (CHR(15)); END;  PROCEDURE Screen_Off; BEGIN "WRITE (CHR(14)); END;  PROCEDURE SetVPort { (ULX,ULY,LRX,LRY : INTEGER) };  BEGIN "WRITE (CHR(ResetVPort)); " "GOTOXY(LRX-1,LRY-1); "WRITE (CHR(SetLR)); " "GOTOXY(ULX-1,ULY-1); "WRI(KEYBOARD); END; %  PROCEDURE Store { (VAR Image : ScreenImage) };  BEGIN "UNITSTATUS(1,Image,18*4); END;   PROCEDURE Restore { (Image : ScreenImage) };  BEGIN "UNITSTATUS(1,Image,18*4+2); END;  PROCEDURE Screen_On; BEGIN ber := Option_Number + 1 /ELSE 1Option_Number := 1; /Set_Option_Field (Inverse,Option_Number); -END; (OTHERWISE *IF ORD(Ch) IN [10,11,27,211,243,200,232] THEN ,BEGIN .mCh := Ch; .EXIT (mInput); ,END *ELSE ,WRITE (CHR(Bell)); &END; "UNTIL EOLNOption_Number > 1 THEN 1Option_Number := Option_Number - 1 /ELSE 1Option_Number := Max_Options; /Set_Option_Field (Inverse,Option_Number); -END; (21 : BEGIN /Set_Option_Field (Normal,Option_Number); /IF Option_Number < Max_Options THEN 1Option_Num"Set_Option_Field (Inverse,Option_Number); " "REPEAT $REPEAT %{ could update time and date here } $UNTIL Key_Pressed; $READ (KEYBOARD,Ch); $ $IF NOT EOLN(KEYBOARD) THEN &CASE ORD(Ch) OF )8 : BEGIN /Set_Option_Field (Normal,Option_Number); /IF = 0 THEN .Options[Max_Options].Position := Position; ,StrLength := StrLength + 1; *END; $END; $ "mCh := CHR(0); "IF Option_Number < 1 THEN $Option_Number := 1 "ELSE $IF Option_Number > Max_Options THEN &Option_Number := Max_Options; [' : IF NOT(Scanning) THEN .BEGIN 0Scanning := TRUE; 0Max_Options := Max_Options + 1; 0StrLength := 0; .END; &']' : BEGIN .Scanning := FALSE; .Options[Max_Options].StrLength := StrLength; ,END &OTHERWISE (IF Scanning THEN *BEGIN ,IF StrLength END; "END; " " BEGIN { mInput } "GOTOXY (x-1,y-1); "WRITE (CHR(CEOL)); "Prompt (Normal,x,y,s); " "FILLCHAR (Options,SIZEOF(Options),CHR(0)); " "Max_Options := 0; "Scanning := FALSE; "FOR Position := 1 TO LENGTH(s) DO $CASE s[Position] OF &'UNTIL Key_Pressed; $READ(KEYBOARD,C); $CCS(C,S); $IF (ORD(C) IN [1..31,128..255]) AND (LENGTH(New_Screen)=0) THEN &BEGIN (PROMPT (Normal,X,Y,Cur_Screen); (New_Screen:=S; (EXIT (INPUT); &END; $IF NOT EOLN(KEYBOARD) THEN &IF (ORD(C) IN [32..126]) AND (LENGTH(New_Screen)12) THEN $Strng:=COPY(Strng,1,12);  END;   NTEGER; VAR Strng : STRING) };  BEGIN "STR(Intgr,Strng); "WHILE LENGTH(Strng)<3 DO $Strng:=CONCAT('0',Strng);  INSERT ('.',Strng,LENGTH(Strng)-1); "IF (LENGTH(Strng)>12) THEN $Strng:=COPY(Strng,1,12);  END;    POS(':',Strng)-1),x); &DELETE (Strng,1,POS(':',Strng)); &Hour:=x; &CSI(COPY(Strng, 1, POS(':',Strng)-1),x); &DELETE (Strng,1,POS(':',Strng)); &Min:=x; &CSI(COPY(Strng, 1, LENGTH(Strng)),x); &Sec:=x; $END; END; $   PROCEDURE CIS { (Intgr : IEDURE CSJ { (Strng : STRING; VAR JDate : Julian) }; VAR Date : Date_Rec;  BEGIN "CSD(Strng,Date); "CDJ(Date,JDate); END;  PROCEDURE CST { (Strng : STRING; VAR Time : Time_Rec) }; VAR x : INTEGER;  BEGIN "WITH Time DO $BEGIN &CSI(COPY(Strng, 1,&CSI(COPY(Strng, 1, POS(Del,Strng)-1),x); &DELETE (Strng,1,POS(Del,Strng)); &Month:=x; &CSI(COPY(Strng, 1, POS(Del,Strng)-1),x); &DELETE (Strng,1,POS(Del,Strng)); &Day:=x; &CSI(COPY(Strng, 1, LENGTH(Strng)),x); &Year:=x; $END; END; $   PROC0) THEN &RealNum := -RealNum;  END;  PROCEDURE CSD { (Strng : STRING; VAR Date : Date_Rec) }; VAR x : INTEGER; $Del : STRING;  BEGIN "IF POS('-',Strng)>0 THEN $Del:='-' "ELSE $Del:='/'; " "WITH Date DO $BEGIN IF Strng[x] IN ['0'..'9'] THEN (IF x>DecPos THEN *RealNum := RealNum + (ORD(Strng[x]) - 48) / PWROFTEN(x-DecPos) (ELSE *RealNum := RealNum + (ORD(Strng[x]) - 48) * PWROFTEN((DecPos-x)-1); " "IF LENGTH(Strng)<>0 THEN $IF (Strng[1]='-') AND (RealNum<>EDURE CSR { (Strng : STRING; VAR RealNum : REAL) };  VAR x,DecPos : INTEGER;  BEGIN "RealNum := 0.0; " "IF POS('.',Strng)=0 THEN $Strng:=CONCAT(Strng,'.'); $ "DecPos:=POS('.',Strng); " "IF LENGTH(Strng)<>0 THEN $FOR x := 1 TO LENGTH(Strng) DO &"IF LENGTH(Strng)>0 THEN $FOR x:=1 TO LENGTH(Strng) DO &IF Strng[x] IN ['0'..'9'] THEN (BEGIN *Intgr:=Intgr*10; *Intgr:=Intgr+(ORD(Strng[x])-48); (END; "IF Strng<>'' THEN $IF (Strng[1]='-') AND (Intgr<>0) THEN &Intgr:=-(Intgr);  END;  PROCTEGER) };  VAR l : Long_Integer;  BEGIN "CSL(Strng,l); "IF l>32767 THEN $Intgr:=32767 "ELSE $Intgr:=TRUNC(l);  END;     PROCEDURE CSL { (Strng : STRING; VAR Intgr : Long_Integer) };  VAR x : INTEGER;  BEGIN "Intgr:=0; Cur_Screen); *END; "UNTIL EOLN(KEYBOARD);  PROMPT (Normal,X,Y,Cur_Screen); "IF LENGTH(New_Screen)>0 THEN $BEGIN &S:=New_Screen; &JUSTIFY(S,Left,Len); &PROMPT (Normal,X,Y,S); $END;  END;    PROCEDURE CSI { (Strng : STRING; VAR Intgr : IN) AND (LENGTH(New_Screen)>0) THEN *BEGIN ,IF Pos <> 0 THEN .IF Pos < Len THEN 0PROMPT (Inverse,X+Pos,Y,' '); ,Pos:=Pos-1; ,PROMPT (Inverse,X+Pos,Y,' '); ,DELETE (New_Screen,LENGTH(New_Screen),1); ,IF LENGTH(New_Screen)=0 THEN .PROMPT (Inverse,X,Y,ake 10 < r1 < 0 } "r1 := RealNum; "Done := FALSE; "REPEAT $IF r1 < 10 THEN &Done := TRUE $ELSE &BEGIN (r1 := r1 / PWROFTEN(1); (DecPt := DecPt + 1; &END; "UNTIL Done; " " "{ Now start stripping off numbers until DecPt + 4 precision } "x := 0; "Done := FALSE; "r2 := r1; ( "REPEAT $Num := TRUNC(r2); $STR (Num,s); $Strng := CONCAT(Strng,s); $r2 := r1; $Num := TRUNC(r1); $r1 := r1 - Num; $x := x + 1; $IF x = DecPt+4 THEN &Done := TRUE $ELSE &BEGIN (r1 := r1 * PWROFTEN(1); BOOLEAN };  VAR Hour,Min,Sec,Num_Del : INTEGER; $s : STRING;  BEGIN "s:=Strng; "Num_Del:=0; " "{ check for 2 delimeters: ':' } "WHILE LENGTH(s)<>0 DO $IF POS(':',s)>0 THEN &BEGIN (DELETE (s,1,POS(':',s)); (Num_Del:=Num_Del+1ay>=31 THEN 3ValiDate:=FALSE; *2 : IF TRUNC(Year/4)*4=Year THEN 3BEGIN 5IF Day>29 THEN 7ValiDate:=FALSE; 3END 1ELSE 3IF Day>28 THEN 5ValiDate:=FALSE; (END; $END "ELSE $ValiDate:=FALSE END;    FUNCTION VALIDTIME { (Strng : STRING) : &CSI(COPY(Strng, 1, POS(Del,Strng)-1),Day); &DELETE (Strng,1,POS(Del,Strng)); & &CSI(Strng,Year); & &IF (Month <= 0) OR (Month >= 13) OR )(Day <= 0) OR (Day >= 32) OR )(Year < 0) THEN (ValiDate:=FALSE &ELSE (CASE Month OF *4, 6, *9,11 : IF D (s,1,POS('-',s)); *NumHDel:=NumHDel+1; (END &ELSE (s:=''; " "IF (NumSDel=2) OR (NumHDel=2) THEN $BEGIN &ValiDate:=TRUE; & &CSI(COPY(Strng, 1, POS(Del,Strng)-1),Month); &DELETE (Strng,1,POS(Del,Strng)); & ng; "NumHDel:=0; "NumSDel:=0; " "{ check for 2 delimeters: '/' or '-' } "WHILE LENGTH(s)<>0 DO $IF POS('/',s)>0 THEN &BEGIN (Del:='/'; (DELETE (s,1,POS('/',s)); (NumSDel:=NumSDel+1; &END $ELSE &IF POS('-',s)>0 THEN (BEGIN *Del:='-'; *DELETEEND;  PROCEDURE CCS { (Ch : CHAR; VAR Strng : STRING) }; BEGIN "Strng:=' '; "Strng[1]:=Ch; END;  FUNCTION VALIDATE { (Strng : STRING) : BOOLEAN };  VAR Year,Month,Day, $NumSDel,NumHDel : INTEGER; $s,Del : STRING;  BEGIN "s:=Str&x1:=Hour; &x2:=Min; &x3:=Sec; $END; "STR(x1,s1); "STR(x2,s2); "STR(x3,s3); "WHILE LENGTH(s1)<2 DO $s1:=CONCAT('0',s1); "WHILE LENGTH(s2)<2 DO $s2:=CONCAT('0',s2); "WHILE LENGTH(s3)<2 DO $s3:=CONCAT('0',s3); "Strng:=CONCAT(s1,':',s2,':',s3); Diff := j.Day - Accum; &Accum := Accum + DAYSIN(d.Month,d.Year+1900); $END; "d.Day := Diff;  END; &  PROCEDURE CTS { (Time : Time_Rec; VAR Strng : STRING) }; VAR s1,s2,s3 : STRING; $x1,x2,x3 : INTEGER; BEGIN "Strng:=''; "WITH Time DO $BEGIN PROCEDURE CJD { (j : Julian; VAR d : Date_Rec) };  VAR Accum,Diff : INTEGER;  BEGIN "Accum := 0; "d.Year := j.Year; "d.Month := 1; "Diff := j.Day - Accum; "Accum := DAYSIN(1,d.Year+1900); "WHILE j.Day > Accum DO $BEGIN &d.Month := d.Month + 1; &h-1 DO $d := d + DAYSIN (i,Date.Year+1900); "d := d + Date.Day; "j.Day := d; "j.Year := Date.Year;  END;    PROCEDURE CJS { (JDate : Julian; VAR Strng : STRING) }; VAR Date : Date_Rec;  BEGIN "CJD(JDate,Date); "CDS(Date,Strng); END;  "WHILE LENGTH(s2)<2 DO $s2:=CONCAT('0',s2); "WHILE LENGTH(s3)<2 DO $s3:=CONCAT('0',s3); "Strng:=CONCAT(s1,'/',s2,'/',s3); END;  PROCEDURE CDJ { (Date : Date_Rec; VAR j : Julian) };  VAR d,i : INTEGER;  BEGIN "d := 0; "FOR i := 1 TO Date.Mont VAR Strng : STRING) }; VAR s1,s2,s3 : STRING; $x1,x2,x3 : INTEGER; BEGIN "Strng:=''; "WITH Date DO $BEGIN &x1:=Month; &x2:=Day; &x3:=Year; $END; "STR(x1,s1); "STR(x2,s2); "STR(x3,s3); "WHILE LENGTH(s1)<2 DO $s1:=CONCAT('0',s1); : Long_Integer;  BEGIN "TempReal := RealNum / 32767; "MInteger := TRUNC(TempReal); "TempReal := RealNum - (32767.0 * MInteger); "x := TRUNC(TempReal); "l := 32767; "LongNum := (x + l * MInteger) * 100;  END;  PROCEDURE CDS { (Date : Date_Rec;(r2 := r1; &END; "UNTIL Done; " "INSERT ('.',Strng,DecPt+1); " "IF Negative THEN $Strng := CONCAT('-',Strng);  END;  PROCEDURE CRL { (RealNum : REAL; VAR LongNum : Long_Integer) }; VAR TempReal : REAL; $MInteger,x : INTEGER; $l ; &END $ELSE &s:=''; " "IF Num_Del<>2 THEN $ValidTime:=FALSE "ELSE $BEGIN &ValidTime:=TRUE; & &CSI(COPY(Strng, 1, POS(':',Strng)-1),Hour); &DELETE (Strng,1,POS(':',Strng)); & &CSI(COPY(Strng, 1, POS(':',Strng)-1),Min); &DELETE (Strng,1,POS(':',Strng)); & &CSI(Strng,Sec); & &IF (Hour<0) OR (Hour>24) OR )(Min<0) OR (Min>60) OR )(Sec<0) OR (Sec>60) THEN (ValidTime:=FALSE; $END; END;    PROCEDURE VALIDOLLAR { (VAR Strng : STRING) };  BEGIN "IF (POS('.')=0)) THEN $LEAP := TRUE "ELSE $LEAP := FALSE;  END;    FUNCTION DaysBetween; { (Date1,Date2 : Date_Rec) : INTEGER; }  VAR J1,J2,N,i : INTEGER; $Date3 : Date_Rec; $J : Julian;  BEGIN "Date3 := Date1; "Date3.Year := 100; "CDJ ay; (4 : DOW := Wednesday; (5 : DOW := Thursday; (6 : DOW := Friday; (7 : DOW := Saturday; &END; $END;  END;   FUNCTION Leap { (y : INTEGER) : BOOLEAN };  BEGIN "IF (((y MOD 4)=0) AND ((y MOD 100)<>0)) OR %(((y MOD 4)=0) AND ((y MOD 400&O := Month + 12 * K; &P := L DIV 100; &Z1 := P DIV 4; &Z2 := P; &Z3 := (5*L) DIV 4; &Z4 := (13*(O+1) DIV 5); &Z := Z4 + Z3 - Z2 + Z1 + Day - 1; &Z := Z - (7 * (Z DIV 7)) + 1; &CASE Z OF (1 : DOW := Sunday; (2 : DOW := Monday; (3 : DOW := Tuesd(DAYSIN := 29 &ELSE (DAYSIN := 28;  END;   FUNCTION DOW { (Date : Date_Rec) : Week };  VAR K,L,O,P,Y,Z1,Z2,Z3,Z4,Z : INTEGER;  BEGIN "Y := Date.Year + 1900; "WITH Date DO $BEGIN &K := TRUNC(0.6 + 1/Month); &L := Y - K; >D1.Day THEN /CompareDates := Later -ELSE /CompareDates := Equal; END; FUNCTION DaysIn { (m,y : INTEGER) : INTEGER };  BEGIN "IF m IN [1,3,5,7,8,10,12] THEN $DAYSIN := 31 "ELSE $IF m IN [4,6,9,11] THEN &DAYSIN := 30 $ELSE &IF LEAP(y) THEN ier #ELSE %IF D0.Year>D1.Year THEN 'CompareDates := Later %ELSE 'IF D0.MonthD1.Month THEN +CompareDates := Later )ELSE +IF D0.Day0 THEN $FOR x:=1 TO LENGTH(Strng) DO &IF ORD(Strng[x]) IN [97..122] THEN (Strng[x]:=CHR(ORD(Strng[x])-32); END;  FUNCTION CompareDates { (D0,D1 : Date_Rec) : CompTypes };  BEGIN #IF D0.Year' ',s[1]); & &IF i2 = i THEN (FILLCHAR (s[0],i+1,CHR(0)) &ELSE (BEGIN *MOVELEFT (s[i2+1],t[1],i-i2); *MOVELEFT (t[1],s[1],i-i2); *s[0] := CHR(i-i2); (END; $END;  END;  PROCEDURE UCASE { (VAR Strng : STRING) }; VAR x : INTEGER;  BEGIN ,i+1,CHR(0)) &ELSE (s[0] := CHR(i-i2); $END;  END;  PROCEDURE Strip_Forward { (VAR s : BYTESTREAM) };  VAR i,i2 : INTEGER; $t : PACKED ARRAY [0..255] OF CHAR;  BEGIN "i := ORD(s[0]); { length of 's' } " "IF i > 0 THEN $BEGIN &i2 := SCAN(rng[1],Field,CHR(32)); $END; END;   PROCEDURE Strip_Backward { (VAR s : BYTESTREAM) };  VAR i,i2 : INTEGER;  BEGIN "i := ORD(s[0]); { length of 's' } " "IF i > 0 THEN $BEGIN &i2 := ABS(SCAN(-i,<>' ',s[i])); & &IF i2 = i THEN (FILLCHAR (s[0](Left : Start := 1; (Center : Start := (Field - StrLength) DIV 2 + 1; &END; & &MOVELEFT (Strng[1],Temp[Start],StrLength); & &Strng[0] := CHR(Field); &MOVELEFT (Temp[1],Strng[1],Field); $END "ELSE $BEGIN &Strng[0] := CHR(Field); &FILLCHAR (Strray; BEGIN "StrLength := ORD(Strng[0]); " "IF StrLength > 0 THEN $BEGIN &FILLCHAR (Temp[1],Field,CHR(32)); " &IF StrLength > Field THEN (StrLength := Field; ( &CASE Which_Format OF (Right : Start := Field - StrLength + 1; ng)>12) THEN $Strng:='0.00';  END;    PROCEDURE Justify { (VAR Strng : BYTESTREAM; Which_Format : Format; Field : INTEGER) };  TYPE "Str255_Array = PACKED ARRAY [0..255] OF CHAR; " VAR "Start,StrLength : INTEGER; "Temp : Str255_A,Strng)=0) THEN $Strng:=CONCAT(Strng,'.00') "ELSE $IF (LENGTH(Strng)-POS('.',Strng)>2) THEN &DELETE(Strng,POS('.',Strng)+3,(LENGTH(Strng)-POS('.',Strng))+2) $ELSE &WHILE (LENGTH(Strng)-POS('.',Strng)<2) DO (Strng:=CONCAT(Strng,'0'); "IF (LENGTH(Str(Date3,J); "J1 := J.Day; "Date3 := Date2; "Date3.Year := 100; "CDJ (Date3,J); "J2 := J.Day; "N := J2 - J1 + 365 * (Date2.Year - Date1.Year); "IF Date1.Month>2 THEN $Date1.Year := Date1.Year + 1; "IF Date2.Month<3 THEN $Date2.Year := Date2.Year - 1; "FOR i := Date1.Year+1 TO Date2.Year DO $IF LEAP(i) THEN %N := N + 1; "DaysBetween := N;  END;   PROCEDURE GetDay { (VAR DOW : STRING) }; VAR DateStrng : STRING; BEGIN "GetTime(DateStrng); "CASE ORD(DateStrng[91,80,24); END; $ $ & " "  PROCEDURE Reboot_Message; BEGIN "Cold_Start; END;  END. $UNTIL Key_Pressed; $READ (KEYBOARD,Ch); $IF NOT EOLN(KEYBOARD) THEN &WRITE (CHR(Bell)); "UNTIL EOLN(KEYBOARD); "PROMPT (Normal,Xc+6,Yc,''); END;   PROCEDURE Erase_Screen; BEGIN "SetVPort (1,4,80,22); "WRITE (CHR(CS)); "SetVPort (1,NTIL Accept; "PROMPT (Normal,Xc+6,Yc,''); END;   PROCEDURE RAcceptError { (Xc,Yc : INTEGER) }; VAR Ch : CHAR;  BEGIN "PROMPT (Normal,Xc,Yc,'Press to Continue'); "PROMPT (Inverse,Xc+6,Yc,''); "REPEAT $REPEAT PROMPT (Inverse,Xc+6,Yc,''); "Accept := FALSE; "REPEAT $REPEAT $UNTIL Key_Pressed; $READ (KEYBOARD,Ch); $IF NOT EOLN(KEYBOARD) THEN &CASE ORD(Ch) OF (32 : Accept := TRUE; (OTHERWISE *WRITE (CHR(Bell)); &END $ELSE &WRITE (CHR(Bell)); "U.255;  BEGIN "KeyStrokes:=0; "UNITSTATUS(1,KeyStrokes,20); "Key_Pressed:=(KeyStrokes<>0); END;   PROCEDURE SAcceptError { (Xc,Yc : INTEGER) }; VAR Accept : BOOLEAN; $Ch : CHAR;  BEGIN "PROMPT (Normal,Xc,Yc,'Press to Continue'); " PROCEDURE LONGDIV { (Dividend,Divisor : Long_Integer; VAR LQUOTIENT,LREMDR : Long_Integer) };  BEGIN #LQUOTIENT:= DIVIDEND DIV DIVISOR; #LREMDR:= DIVIDEND- LQUOTIENT* DIVISOR; END; #    FUNCTION Key_Pressed { : BOOLEAN };  VAR KeyStrokes : 0.vsor; &Remainder:=(Divdend - Result * Divsor); &Result:=((Result*10000)+((Remainder*10000) DIV Divsor)+50) DIV 100; $END "ELSE $Result:=0;  END;     PROCEDURE SetTime { (Strng : STRING) }; EXTERNAL;  PROCEDURE LDIVIDE { (Divdend,Divsor : Long_Integer; VAR Result : Long_Integer) };  VAR Remainder : Long_Integer;  BEGIN "IF (Divsor<>0) AND (Divdend<>0) THEN $BEGIN &Result:=Divdend DIV DiIN "GetTime(DateStrng); "WITH Time DO $BEGIN &CSI(COPY(DateStrng,10,2),x1); &CSI(COPY(DateStrng,12,2),x2); &CSI(COPY(DateStrng,14,2),x3); $ Hour:=x1; &Min:=x2; &Sec:=x3; $END; END;  PROCEDURE GetTime { (VAR Strng : STRING) }; EXTERNAL; $BEGIN &CSI(COPY(DateStrng,5,2),x1); &CSI(COPY(DateStrng,7,2),x2); &CSI(COPY(DateStrng,3,2),x3); &Month:=x1; &Day:=x2; &Year:=x3; $END; END;  PROCEDURE GetSysTime { (VAR Time : Time_Rec) }; VAR DateStrng : STRING; $x1,x2,x3 : INTEGER;  BEG $9 : MOY:='September'; #10 : MOY:='October'; #11 : MOY:='November'; #12 : MOY:='December'; "END; END; PROCEDURE GetSysDate { (VAR Date : Date_Rec) }; VAR DateStrng : STRING; $x1,x2,x3 : INTEGER;  BEGIN "GetTime(DateStrng); "WITH Date DO h : INTEGER; BEGIN "GetTime(DateStrng); "CSI(COPY(DateStrng,5,2),Month); "CASE Month OF $1 : MOY:='January'; $2 : MOY:='February'; $3 : MOY:='March'; $4 : MOY:='April'; $5 : MOY:='May'; $6 : MOY:='June'; $7 : MOY:='July'; $8 : MOY:='August';])-48 OF $1 : DOW:='Sunday'; $2 : DOW:='Monday'; $3 : DOW:='Tuesday'; $4 : DOW:='Wednesday'; $5 : DOW:='Thursday'; $6 : DOW:='Friday'; $7 : DOW:='Saturday'; "END; END;  PROCEDURE GetMonth { (VAR MOY : STRING) }; VAR DateStrng : STRING; $MontO^X O^#INSERT SYSTEM DISK...' ; message to appear ;  ;-------- (.PROC COLD_START (  C_START .EQU 65 ( (SOS C_START,PARMS PARMS .BYTE 00 ( (.END ( (RTS   TSTRING .BLOCK 18.,0   TIMEBLOCK .BYTE 01 0.WORD TSTRING   ;-------- ; PROCEDURE Cold_Start; EXTERNAL; ; ; This procedure will perform a SOS Cold-Start Call causing ; the hardware to be reset and the '(  RETURN .EQU 0E0 STRING .EQU 0E2   CSETTIME .EQU 062 (POP RETURN (POP STRING (LDY #18. $0 LDA @STRING,Y (DEY (STA TSTRING,Y (BNE $0 (SOS CSETTIME,TIMEBLOCK (PUSH RETURN ; PROCEDURE Set_Time (VAR s : BYTESTREAM); EXTERNAL; ; ; This procedure sets the SOS time stamp with the 18 digit time ; stamp normally returned by SOS. The time stamp is contained in ; the string 's'. ;  ;-------- (.PROC SET_TIME,1 TSTRING,Y (INY (STA @STRING,Y (CPY #18. (BNE $0 (PUSH RETURN (RTS   TSTRING .BLOCK 18.,0   TIMEBLOCK .BYTE 01 .WORD TSTRING   ;-------- . ;  ;-------- (.PROC GET_TIME,1   RETURN .EQU 0E0 STRING .EQU 0E2   CGETTIME .EQU 063 (POP RETURN (POP STRING (SOS CGETTIME,TIMEBLOCK (LDA #18. (LDY #0 (STA @STRING,Y $0 LDA ENDM   ;-------- ; MACRO SOS - performs SOS call ;-------- (.MACRO SOS (BRK (.BYTE %1 (.WORD %2 (.ENDM   ;-------- ; PROCEDURE Get_Time (VAR s : BYTESTREAM); EXTERNAL; ; ; This procedure returns the SOS 18 digit time stamp into 's';-------- ; MACRO POP - pops 16 bit argument (1 word) ;-------- (.MACRO POP (PLA (STA %1 (PLA (STA %1+1 (.ENDM   ;-------- ; MACRO PUSH - pushes 16 bit argument (1 word) ;-------- (.MACRO PUSH (LDA %1+1 (PHA (LDA %1 (PHA (.s used to turn off the screen.'); $WRITELN; $WRITELN ('USAGE: Screen_Off;'); $WRITELN; $WRITELN ('NOTES: After you press the screen will be turned off. The'); $WRITELN (' only way to turn it back on again is with the "Screen_On"'); $WGE: Screen_On;'); $Screen_On; $RAcceptError (1,22); "END; " "PROCEDURE Test2_Screen_Off; "BEGIN $Show_Title ('Screen_Off'); $GOTOXY (0,3); $WRITELN ('SYNTAX: PROCEDURE Screen_Off;'); $WRITELN; $WRITELN ('DESCRIPTION: The "Screen_Off" procedure i$WRITELN ('SYNTAX: PROCEDURE Screen_On;'); $WRITELN; $WRITELN ('DESCRIPTION: The "Screen_On" procedure is used to turn on the screen'); $WRITELN (' after it has been turned off (with the "Screen_Off" procedure.'); $WRITELN; $WRITELN ('USAbelow, the stored screen'); $WRITELN (' will be displayed.'); $RAcceptError (1,22); $Restore (Screen1); $RAcceptError (1,22); "END; " "PROCEDURE Test1_Screen_On; "BEGIN $Show_Title ('Screen_On'); $GOTOXY (0,3); store screen images'); $WRITELN (' that have been previously stored.'); $WRITELN; $WRITELN ('USAGE: TYPE Main_Screen : ScreenImage;'); $WRITELN (' Restore (Main_Screen);'); $WRITELN; $WRITELN ('NOTES: After acknowledging the prompt Screen1); $RAcceptError (1,22); "END; " "PROCEDURE Test_Restore; "BEGIN $Show_Title ('Restore'); $GOTOXY (0,3); $WRITELN ('SYNTAX: PROCEDURE Restore (Image : ScreenImage);'); $WRITELN; $WRITELN ('DESCRIPTION: The "Restore" procedure is used to re$WRITELN ('USAGE: TYPE Main_Screen : ScreenImage;'); $WRITELN (' Store (Main_Screen);'); $WRITELN; $WRITELN ('NOTES: This screen will be stored and can then be subsequently'); $WRITELN (' restored with the "Restore" procedure.'); $Store (; $WRITELN ('SYNTAX: PROCEDURE Store (VAR Image : ScreenImage);'); $WRITELN; $WRITELN ('DESCRIPTION: The "Store" procedure is used to store screen images'); $WRITELN (' in a user defined variable.'); $WRITELN; ,''); " i1 := TRUNC((79-(LENGTH(s)+10))/2); $PROMPT (Inverse,i1,3,CONCAT('| ||',s,'|| |')); "END; " "PROCEDURE Test_Store; "BEGIN $Show_Title ('Store'); $GOTOXY (0,3)ge; "d1,d2 : Date_Rec; "j1,j2 : Julian; "t1,t2 : Time_Rec; "l1,l2 : Long_Integer; "r1,r2 : REAL; "Day1,Day2 : Week; "PROCEDURE Show_Title (s : STRING); "BEGIN $PROMPT (Normal,1,3{$SETC Floppy := FALSE }  PROGRAM Test_GENUTIL3; USES GENUTIL3; VAR "Printer : INTERACTIVE; "s,s1,s2,Reply : STRING; "i1,i2, "x1,x2,y1,y2, "Option_Number, "New_Option_Number : INTEGER; "Main_Screen, "Screen1,Screen2 : ScreenImaRITELN (' command, or the <5> toggle.'); $RAcceptError (1,22); $Screen_Off; "END; " "PROCEDURE Test3_Screen_Dump; "BEGIN $Show_Title ('Screen_Dump'); $GOTOXY (0,3); $WRITELN ('SYNTAX: PROCEDURE Screen_Dump (VAR Printer : INTERACTIVE);'); $WRITELN; $WRITELN ('DESCRIPTION: The "Screen_Dump" procedure is used to dump the screen'); $WRITELN (' image to the printer or file passed in to the procedure.'); $Wi1,'| { NOTE: the "|" is a delimiter }'); $RAcceptError (1,22); "END; " "PROCEDURE Test_CSL; "BEGIN $Show_Title ('CSL'); $PROMPT (Normal,1,5,'Please enter a string: s >'); $READLN (s1); $CSL (s1,l1); $GOTOXY (0,5); $WRITELN ('The value returned NOTE: the "|" is a delimiter }'); $RAcceptError (1,22); "END; " "PROCEDURE Test_CSI; "BEGIN $Show_Title ('CSI'); $PROMPT (Normal,1,5,'Please enter a string: s >'); $READLN (s1); $CSI (s1,i1); $GOTOXY (0,5); $WRITELN ('The value returned is > |',$PROMPT (Normal,1,5,'Please enter a length, an x and y coordinate, and a'); $PROMPT (Normal,1,6,'current string setting: l,x,y,s > '); $READLN (i1,x1,y1,s1); $Input (i1,x1,y2,s1,Reply); $GOTOXY (0,6); $WRITELN ('The value returned is > |',Reply,'| { fter each call.'); $WRITELN; $WRITE ('Enter X Y S > '); $READLN (x1,y1,s1); $PROMPT (Normal,x1,y1,s1); $RAcceptError (1,22); $PROMPT (Inverse,x1,y1,s1); $RAcceptError (1,22); "END; " "PROCEDURE Test_Input; "BEGIN $Show_Title ('Input'); ,10,10,''This is a test string.'');'); $WRITELN; $WRITELN ('NOTES: "PROMPT" will first be called with the Normal display type and'); $WRITELN (' then be called with the Inverse display type. You will have'); $WRITELN (' to press ay; X,Y : INTEGER; S : STRING'); $WRITELN; $WRITELN ('DESCRIPTION: The "PROMPT" procedure is used to place a string anywhere'); $WRITELN (' on the screen in either Normal or Inverse characters.'); $WRITELN; $WRITELN ('USAGE: PROMPT (Inverse$WRITE ('Enter ULX ULY LRX LRY coordinates > '); $READLN (x1,y1,x2,y2); $DrawBox (x1,y1,x2,y2); $RAcceptError (1,22); "END; " "PROCEDURE Test_PROMPT; "BEGIN $Show_Title ('PROMPT'); $GOTOXY (0,3); $WRITELN ('SYNTAX: PROCEDURE PROMPT (Off : Displa0,10,70,20);'); $WRITELN; $WRITELN ('NOTES: ULX = Upper Left X-coordinate'); $WRITELN (' ULY = Upper Left Y-coordinate'); $WRITELN (' LRX = Lower Right X-coordinate'); $WRITELN (' LRY = Lower Right Y-coordinate'); $WRITELN; $WRITELN ('DESCRIPTION: The "DrawBox" procedure is used to draw a box on the screen'); $WRITELN (' using the specialized characters set supplied with this'); $WRITELN (' testing facility'); $WRITELN; $WRITELN ('USAGE: DrawBox (1rdinates > '); $READLN (x1,y1,x2,y2); $SetVPort (x1,y1,x2,y2); $RAcceptError (1,22); "END; " "PROCEDURE Test_DrawBox; "BEGIN $Show_Title ('DrawBox'); $GOTOXY (0,3); $WRITELN ('SYNTAX: PROCEDURE DrawBox (ULX,ULY,LRX,LRY : INTEGER);'); $WRITELN; $WRITELN ('NOTES: ULX = Upper Left X-coordinate'); $WRITELN (' ULY = Upper Left Y-coordinate'); $WRITELN (' LRX = Lower Right X-coordinate'); $WRITELN (' LRY = Lower Right Y-coordinate'); $WRITELN; $WRITE ('Enter ULX ULY LRX LRY cooRE SetVPort (ULX,ULY,LRX,LRY : INTEGER);'); $WRITELN; $WRITELN ('DESCRIPTION: The "SetVPort" procedure is used to set a window on the'); $WRITELN (' screen.'); $WRITELN; $WRITELN ('USAGE: SetVPort (10,10,70,20);'); $WRITELN; LN (' in slot 4.'); $RAcceptError (1,22); ${$I-} $REWRITE (Printer,'.PRINTER'); ${$I+} $Screen_Dump (Printer); $CLOSE (Printer); "END; " "PROCEDURE Test_SetVPort; "BEGIN $Show_Title ('SetVPort'); $GOTOXY (0,3); $WRITELN ('SYNTAX: PROCEDURITELN; $WRITELN ('USAGE: VAR Printer : INTERACTIVE;'); $WRITELN (' REWRITE (Printer,''.PRINTER'');'); $WRITELN (' Screen_Dump (Printer);'); $WRITELN; $WRITELN ('NOTES: As delivered, the .PRINTER driver is set up for a UPIC card'); $WRITEis > |',l1,'| { NOTE: the "|" is a delimiter }'); $RAcceptError (1,22); "END; " "PROCEDURE Test_CSR; "BEGIN $Show_Title ('CSR'); $PROMPT (Normal,1,5,'Please enter a string: s >'); $READLN (s1); $CSR (s1,r1); $GOTOXY (0,5); $WRITELN ('The value returned is > |',r1,'| { NOTE: the "|" is a delimiter }'); $RAcceptError (1,22); "END; " "PROCEDURE Show_Main_Screen; "BEGIN $WRITE (CHR(CS)); $PROMPT (Normal,1,1,'GENUTIL3 Testing Facility'); $PROMPT (Inverse,1,1,'GENUTIL3');: Test_VALIDOLLAR; &29 : Test_JUSTIFY; &30 : Test_STRIP; &31 : Test_UCASE; &32 : Test_CompareDates; &33 : Test_DaysIn; &34 : Test_DOW; &35 : Test_Leap; &36 : Test_DaysBetween; &37 : Test_GetDay; &38 : Test_GetMonth; &39 : Test_GetSysDate; &40 :; &14 : Test_CST; &15 : Test_CIS; &16 : Test_CLS; &17 : Test_CLR; &18 : Test_CRS; &19 : Test_CRL; &20 : Test_CDS; &21 : Test_CDJ; &22 : Test_CJS; &23 : Test_CJD; &24 : Test_CTS; &25 : Test_CCS; &26 : Test_VALIDATE; &27 : Test_VALIDTIME; &28 '2 : Test_Restore; '3 : Test1_Screen_On; '4 : Test2_Screen_Off; '5 : Test3_Screen_Dump; '6 : Test_SetVPort; '7 : Test_DrawBox; '8 : Test_PROMPT; &{ '8 : Test_Input; '9 : Test_CSI; &10 : Test_CSL; &11 : Test_CSR; &12 : Test_CSD; &13 : Test_CSJ$IF Reply = '' THEN $ New_Option_Number := Option_Number $ELSE &CSI (Reply,New_Option_Number); $IF New_Option_Number IN [1..56] THEN &BEGIN (Erase_Screen; (GOTOXY (0,23); (WRITE (CHR(CL)); &END; $ $CASE New_Option_Number OF '1 : Test_Store; Please enter routine number to test [ ]'); "END;   BEGIN { Test_GENUTIL3 } "Screen_Off; "Show_Main_Screen; "Store (Main_Screen); "Screen_On; "Option_Number := 1; "REPEAT $STR (Option_Number,s); $Justify (s,Right,2); $Input (2,38,24,s,Reply); In (a month) 56) Reboot_Message'); $PROMPT (Normal,1,22,'19) CLS (Conv Long->Str) 38) DOW (Day Of Week) 57) Quit'); $PROMPT (Normal,1,23,''); $PROMPT (Normal,1,24,'$PROMPT (Normal,1,19,'16) CSJ (Conv Str->Juln) 35) UCASE (a string) 54) RAcceptError (Return)'); $PROMPT (Normal,1,20,'17) CST (Conv Str->Time) 36) CompareDates (<,>,=) 55) Erase_Screen'); $PROMPT (Normal,1,21,'18) CIS (Conv Int->Str) 37) Daysnv Str->Real) 33) Strip_Forward (blks) 52) Key_Pressed (bool chk)'); $PROMPT (Normal,1,18,'15) CSD (Conv Str->Date) 34) Strip_Backward (blks) 53) SAcceptError (Space)'); te->Str)'); $PROMPT (Normal,1,15,'12) CSI (Conv Str->Int) 31) VALIDOLLAR (a string) 50) LDIVIDE (for dollars)'); $PROMPT (Normal,1,16,'13) CSL (Conv Str->Long) 32) JUSTIFY (a string) 51) LONGDIV (for full accr)'); $PROMPT (Normal,1,17,'14) CSR (Co1) 28) CCS (Conv Char->Str) 47) SetSysDate (sys date)'); $PROMPT (Normal,1,13,'10) cInput (i/o rout #2) 29) VALIDATE (bool chk) 48) SetSysTime (sys time)'); $PROMPT (Normal,1,14,'11) mInput (i/o rout #3) 30) VALIDTIME (bool chk) 49) TDS (Trans Da$PROMPT (Normal,1,10,' 7) DrawBox (boxes) 26) CJD (Conv Juln->Date) 45) GetTime (full sys date)'); $PROMPT (Normal,1,11,' 8) PROMPT (text on scr) 27) CTS (Conv Time->Str) 46) SetTime (full sys date)'); $PROMPT (Normal,1,12,' 9) Input (i/o rout #etMonth (ret mon str)'); $PROMPT (Normal,1, 8,' 5) Screen_Dump 24) CDJ (Conv Date->Juln) 43) GetSysDate (sys date)'); $PROMPT (Normal,1, 9,' 6) SetVPort (windows) 25) CJS (Conv Juln->Str) 44) GetSysTime (sys time)'); a screen) 21) CRS (Conv Real->Str) 40) DaysBetween (two dates)'); $PROMPT (Normal,1, 6,' 3) Screen_On 22) CRL (Conv Real->Long) 41) GetDay (ret day str)'); $PROMPT (Normal,1, 7,' 4) Screen_Off 23) CDS (Conv Date->Str) 42) G $PROMPT (Normal,69,1,'Version 1.0'); $PROMPT (Normal,1,2,'by John E. Cisar'); $Show_Title ('R O U T I N E S'); $PROMPT (Normal,1, 4,' 1) Store (a screen) 20) CLR (Conv Long->Real) 39) Leap (chk for leap yr)'); $PROMPT (Normal,1, 5,' 2) Restore ( Test_GetSysTime; &41 : Test_GetTime; &42 : Test_SetTime; &43 : Test_LDIVIDE; &44 : Test_LONGDIV; &45 : Test_KEYPRESS; &46 : Test_SAcceptError; &47 : Test_RAcceptError; &48 : Test_EraseScreen; &49 : Test_ReBootMessage; &} &57 : BEGIN { nothing } END; &OTHERWISE (WRITE (CHR(Bell)); $END; $IF New_Option_Number IN [1..56] THEN &BEGIN (Option_Number := New_Option_Number; (Restore (Main_Screen); &END; "UNTIL New_Option_Number = 57; " "{$IFC Floppy } " Reboot_Messagˡǀġg/  ( ǀ > *ڨ ɡ(MMMM܏M܏T+ܨ ء '$' \)  ɡ-Í á ܑ ) '!Í ) % ɡ    ~ɡ  ~"(&آڢ٢آ&'ڢڢá ޡ?šڢڢ'ޡڢڢڢ~ڢ n( ȡ ۞$(@ $( $( ۡ#š #ȡšڢۑڢ.!ɡܢڕܢښ $"ڢܢۢڢ`` ڢ 2#آڢ٢آ*$آڢ٢آ(%آڢ٢آɄɡ& 8ݍ á ބݍݍܓ܄>ۢۢۢۢۢNۢۢۢܕ( trToNum(VAR decstr: string; poweroften: integer ): real;  procedure NumToStr( r: real; fixed: boolean; placecount: integer; 4var s: string; var expon: integer );  IMPLEMENTATION E and: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem,) PROCEDURE FSEEK(VAR F: FIB; RECNUM: INTEGER); PROCEDURE FREADREAL(VAR F: FIB; VAR X: REAL); PROCEDURE FWRITEREAL(VAR F: FIB; xx: REAL; e1, e2: INTEGER); FUNCTION SUPER_MOD(A,B : INTEGER) : INTEGER; FUNCTION SUPER_DIV(A,B : INTEGER) : INTEGER;  function SH 4#PASCALIOLONGINTIGENUTIL3 e; "{$ELSEC } $WRITE (CHR(CS)); "{$ENDC } END. +$&!&%š#$ە##š##$"$##ɡ#"ɡ2ݓ&&Í&&&á&"&!)&%&&Í&&"&!)$%&&!!$$#ȡ!ˡ ء##ȡ''0'Q'P% ,    ݂܂F  -    ޏݏ@܏ޏ@ݏ܏ޏݏ܏܏ ݏ ܏- 0 fLfJJJi䨩ȩ50,8 &5&  6 F5L L5HH`~u$hhhhhhhhhh訪 横 Ji&&0 fL]fJJJi&&⠊hhhhhhhhhhhh&FffHHHHHH`Phhhhhh⨥HH`,hhhhhhhhhh訪 横v E 詀 vE 詀  LjH`:hhhhhhH50HHH`*hhhh LHH`4hhhhhhhhhhhhhhhhȑ**ȩȑ&HHHH`h hhhhhhhhHHHHHH`(0 2) l` 0 2) l` 0 2) l` 0 2) l` hhhhhh404)@ 4) HHH š)  ȡ0ˡ š  *ݡ W~ ٦***תP(š_ۡɡڑ ɡá0PÄ,ߡצ-QP<ˡ;,ɡ#??P?0Q?P>>.P>8??P?8U?P/ؑ>,>Nš N>>š3=>?=?ȡ#@@P@צ0Q@P==ȡ5=?=?ȡ#ˡ/14 ڡؼáڡؼZš0áۀ š ۀ*ByO7>zS8ȡ ȄPšPMšM/(<<<0Eá4+á4-á4.1.Ǹ ɡ ۏ01ۑ+-4.L0Ná=;á/Ä ڡؼ1A3N3'Ä!4' Ä1./-+á -á0Ná1. 2 .á0Eáa4.12,ɡ1.0آ  "10ˍ8,ɡ 1ɡؿ 0ÄL2٢10ˡ103آ1 41á?˄??&@ۂ"ˡu??š???#?$???$?#ń ?#?$?ۚ?$ܚ?AAA?AˡA  5~ 09Ȅ.!~Ȅ/azōaA??@ɡ??"@?Ä?á?????,? >"Má? > >? >á @@@ Ą @ ?ˡ\?%,?%???&@?"v  u&&v&E& &詀&L&&ť&&ʈHH`o'hhhhhhhhhhhh bL)5Ffeyumꩀ5JA1SKQL51QF55(5ȱ5qjȑHHHH`\hhhhhhhh  0<Ȱ& u E   ؠ ) JJJJ 0ȑ ) 0ȑᘠHH`hhhhhhR0H* ei|ʽ 8襁i}ƅ|L,hƀhhh8hohlhXhhhFffff80)ƅܥ#FfII懥HHL,LGhhhhhƀhh-Ȅʈƅ})H揥>ʈƅ ~擥  抦|ɥ8包~ƅLII懩&&u`hh HHHHHL,}ʈƅFyʈƅ}ʈƍƎƋƊЌإL2d|e~28ʈƅyʈƅƉ` _LWŁ|}ƅLwE||怦}ʚH恺8倅偪ƅ  ILL, _LwLL,E0LL _Lw ILL,ELL _LwEe8刅刪ʈʈݒ&~ƀLV~HHL,~HH~HHHHHHL,~ʈƅFHHHH恥HL,0~}ʈƅ0I愊iʈؚH恥LŁ|} ƅLw ~~8ʭ==` 5l 5 l 5lhzh{hƁhhhƁ}eʆƀƀ|ʊe~8偅z{lzhhhhhh8冐 0 h HHHL,LGIL,h hBCʈ _.ł( Ł|} ŀ}|z Z   :    ( tV8$@hvhwhhxylxh:vwlv8<<+-Í-۲0ݡߑ ع       &  * عteVG8  )   uh[NA4'á NTEGER[36]) /END; ' " "PROCEDURE FREADDEC(VAR F: FIB; VAR D: STUNT; L: INTEGER); "PROCEDURE FWRITEDEC(VAR F: FIB; D: DECMAX; RLENG: INTEGER); "  IMPLEMENTATION L E ^5PECommand: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem,) $ "TYPE DECMAX = INTEGER[36]; STUNT = RECORD CASE INTEGER OF 12:(W2:INTEGER[4]); 13:(W3:INTEGER[8]); 14:(W4:INTEGER[12]); 15:(W5:INTEGER[16]); 16:(W6:INTEGER[20]); 17:(W7:INTEGER[24]); 18:(W8:INTEGER[28]); 19:(W9:INTEGER[32]); 110:(W10:Iv :2D"\.< z 048VID K6ANU8HVIDS ZA\A!8H@DIRRANGEA~AA8MTID CAAN8HFULLID VJAA8H HH`7hhhhhhhh訪 H & *HHH`6hhhhhhhhHHHH`&hhhhhheȑȦ0+L4-I8i  L6i0i0HH`.`4j rXJF8IȱjE Ȅ橀إHH`zhhhhhhhhhh[ȱ)uD*&**u&L&*** ʈHHhhƀ 0ȑƀ0hJJJJ 0ȑ) 0ȑƀĆLOL,3-'~{vvvvvvvvvvvZTNlb3 `\[TOG@;:3(  T[Fc= 8BLKRANGEX(=+U8IN  CONST "CS = 28; "CEOS = 29; "CL = 30; "CEOL = 31; "ResetVPort = 1; "RestoreVPort = 4; "SetUL = 2; "SetLR = 3; "Bell = 7;   TYPE "CompTypes = (Earlier,Later,Equal); "Display = (Normal,Inverse,Flashing,No_Display); "Format = (Right,Left,Ce: Long_Integer; VAR LQUOTIENT,LREMDR : Long_Integer);   FUNCTION Key_Pressed : BOOLEAN;   PROCEDURE SAcceptError (Xc,Yc : INTEGER);  PROCEDURE RAcceptError (Xc,Yc : INTEGER);   PROCEDURE Erase_Screen;   PROCEDURE Reboot_Message;   IMPLEMENTCEDURE SetSysDate (Date : Date_Rec); PROCEDURE SetSysTime (Time : Time_Rec);  PROCEDURE TDS (Date : Date_Rec; VAR StrDate : STRING);   PROCEDURE LDIVIDE (Divdend,Divsor : Long_Integer; VAR Result : Long_Integer);  PROCEDURE LONGDIV (Dividend,Divisor  PROCEDURE GetDay (VAR DOW : STRING);  PROCEDURE GetMonth (VAR MOY : STRING);  PROCEDURE GetSysDate (VAR Date : Date_Rec);  PROCEDURE GetSysTime (VAR Time : Time_Rec);  PROCEDURE GetTime (VAR Strng : STRING); PROCEDURE SetTime (Strng : STRING);  PROON CompareDates (D0,D1 : Date_Rec) : CompTypes; FUNCTION DaysIn (m,y : INTEGER) : INTEGER; FUNCTION DOW (Date : Date_Rec) : Week; FUNCTION Leap (y : INTEGER) : BOOLEAN;  FUNCTION DaysBetween (Date1,Date2 : Date_Rec) : Integer; R Strng : STRING);   PROCEDURE JUSTIFY (VAR Strng : BYTESTREAM; Which_Format : Format; Field : INTEGER);  PROCEDURE Strip_Forward (VAR s : BYTESTREAM);  PROCEDURE Strip_Backward (VAR s : BYTESTREAM);  PROCEDURE UCASE (VAR Strng : STRING);   FUNCTI VAR d : Date_Rec);   PROCEDURE CTS (Time : Time_Rec; VAR Strng : STRING);   PROCEDURE CCS (Ch : CHAR; VAR Strng : STRING);   FUNCTION VALIDATE (Strng : STRING) : BOOLEAN;  FUNCTION VALIDTIME (Strng : STRING) : BOOLEAN;  PROCEDURE VALIDOLLAR (VA PROCEDURE CRL (RealNum : REAL; VAR LongNum : Long_Integer);   PROCEDURE CDS (Date : Date_Rec; VAR Strng : STRING);  PROCEDURE CDJ (Date : Date_Rec; VAR j : Julian);   PROCEDURE CJS (JDate : Julian; VAR Strng : STRING);  PROCEDURE CJD (j : Julian;EGER; VAR Strng : STRING);  PROCEDURE CLS (Intgr : Long_Integer; VAR Strng : STRING);  PROCEDURE CLR (LongNum : Long_Integer; VAR RealNum : REAL);   PROCEDURE CRS (RealNum : REAL; VAR Strng : STRING); eger);  PROCEDURE CSR (Strng : STRING; VAR RealNum : REAL);  PROCEDURE CSD (Strng : STRING; VAR Date : Date_Rec);  PROCEDURE CSJ (Strng : STRING; VAR JDate : Julian);  PROCEDURE CST (Strng : STRING; VAR Time : Time_Rec);   PROCEDURE CIS (Intgr : INTING; VAR New_Screen : STRING; VAR Command : BOOLEAN); PROCEDURE mInput (s : STRING; x,y : INTEGER; VAR Option_Number : INTEGER; VAR mCh : CHAR);   PROCEDURE CSI (Strng : STRING; VAR Intgr : INTEGER);  PROCEDURE CSL (Strng : STRING; VAR Intgr : Long_Int PROCEDURE DrawBox (ULX,ULY,LRX,LRY : INTEGER);   PROCEDURE PROMPT (Off : Display; X,Y : INTEGER; S : STRING);   PROCEDURE Input (Len,X,Y : INTEGER; Cur_Screen : STRING; VAR New_Screen : STRING); PROCEDURE cInput (Len,X,Y : INTEGER; Cur_Screen : STR);   PROCEDURE Screen_On; PROCEDURE Screen_Off;   PROCEDURE Screen_Dump (VAR Printer : INTERACTIVE);   PROCEDURE SetVPort (ULX,ULY,LRX,LRY : INTEGER);  :'') "Date_Rec = PACKED RECORD /Month : 0..12; /Day : 0..31; /Year : 0..99; -END; "Time_Rec = PACKED RECORD /Hour : 0..24; /Min : 0..60; /Sec : 0..60; -END; 3  PROCEDURE Store (VAR Image : ScreenImage);  PROCEDURE Restore (Image : ScreenImagenter,No_Format); "Week = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday); "Long_Integer = INTEGER[12]; "Big_String = STRING[255]; "Julian = PACKED RECORD -Year : 0..99; -Day : 0..366; +END; "ScreenImage = PACKED ARRAY [1..1923] OF CHAR;ATION L E te (Date : Date_Rec); PROCEDURE SetSysTime (Time : Time_Rec);  PROCEDURE TDS (Date : Date_Rec; VAR StrDate : STRING);   PROCEDURE LDIVIDE (Divdend,Divsor : Long_Integer; VAR Result : Long_Integer);  PROCEDURE LONGDIV (Dividend,Divisor ئ.PRINTER"ˡ-- ?--//ȡO00ȡ.- .ǀ...-.|.+.=.*. "$&(*,)+(/')+-/13?A>EG?AMOVXKR@BDFHJLNPRTV,0,,׷(-ؼ ؼV٪Pسצ.á..P.צ.Q.Pצ.,ˡh-.-.ȡX-;-,šؼ-0-,$ؼ-0,-Y YYY á   š0تP0!0 .vx * ٪P,,  ,Z8 ٪Pš],-,-ȡM,1ؼ ؼÄ 0P  /ɄZZPZ0ǠZPYácצO ZZ YYY0 F/ń:YˡYɡ .i\ ٪PYئתP0 PZZPZצO ƀƀǟZP YˡYɡ Y* 5//0/ǀƁXצRƁX ڕ́XʁXȡ܂Ɓ ́XƁXצƁXƁ/QƁXRƁX FتP۹W.W.kW.̀̀ʀʀȡʀʀǀʀ̀W͂ 8ƀەƀەǀ ƀƁ/ەەە ||Ɓە́XƁXƁXƁ/QJ;5N N<;šJ;w;Jɡ;YD @N  N   W   ب /,-,,-P, @;ܪP /6 JMLOLOȡkL+M MJJKHM/JKP0[]2#MKá/JLPKKLLɡ J̀ƀPƀZǠƀP   1ʀá1 P1!1 ʀ̀ʀZ P0Äń@ʀˡʀɡ ʀ ʀ̀ʀ á    šZ٪PZ!Z =? ƀƀPL t2ڪP٦תP 0Z P̀! ʀˡʀɡ ʀ* 500Z0ǀÄ  ZP 0/ʀÄ/   0ɄgP ~sh[K=.-P  P ɡKɡ!̀ƀ0ƀQƀP̀ƀצ20ƀRƀP ̀ƀצ19ƀRƀP̀ƀPƀצ - SƀVǣƀצ Ǥƀ-ƀצ, ThursdayתP6צFridayP'SaturdayתPyl_QA2%VJanuaryתPVFebruaryתPVצMarchPVצAprilPVצMayPVצJunePVJulyתPrVצAugustPcV SeptemberתPQVOctoberתPAVNovemberתP0VצDecember.,,,,,,/X0ب-. - - - ---/X1٨'̀ʀqSundayתPxצMondayPiTuesdayתPY WednesdayתPGXZ\^`bdfhjlnprtvxz|~ ?.. #79>^ب,$--ˡ-ؼؼ ٪P-š--P-/PVW-W, -V, W-W, -V,WW, V ,c٪P,,T٪P-.:., צ:-,.:., צ:-,<.., -,<P ɡצ0QP.P š  PGR +צJanuaryPئFebruaryתPئMarchתPצAprilPئMayתPצJunePyצJulyPmצAugustP_צ SeptemberPNئOctoberתP?צNovemberP/צDecemberP wmcWH;-# +..//- //Ƃcɡ  c  ȡ(). 0jצSundayPqצMondayPcצTuesdayPTئ WednesdayתPCצThursdayP3צFridayP%צSaturdayPqeYL=/#R*.,,+φނߕܹ#3.)$*'$!'d˄ǐÄ,(ۨڨ   dc     dc   m  š    ɡ]  šKɡ9š'ɡš%ǪP (2&ڨ l ?  参 d    á ٕH#šX  á 5ٕٕٕp"ˡ8ȡ+ٛ ٛٛ 3 J$ۨڨצ.ɡPצ0QP š צ0.00PAT šl šٹەە  ۞ؿ؞ؿ !š0ڑ -ˡZצ:Z0 :Zצ:Z/ :. 00ō/ɍ/<ō.ɍ.<ō צ.áP.00SPaצ.š"צ..-ƀ2ƀ/ 21 00 č/ȍ/ č1ɍO00/ġ@11á /š /š ,;? EIKR dڪP1P-1ˡ1צ:1š1צ:1--1צPƀ.ǡƀ:ǢƀƀPm  PٿڪP[P-.[ˡc/[š2/P[צ/[..4צ-[š2-P[-[--[תP.-Íƀ2ƀ0 2&@ |٨צP̀̀̀ʀWP ʀ.P ʀP Wɡ!Ẁƀצ0ƀWQƀP.ɡ!.̀ƀ0ƀ.QƀPɡ!̀ƀצ0ƀQƀP̀ƀWPƀ:QƀƀPm ٨ȡ l& n c@ \٨٨ c  ܕ l& š,  ܕ lp٨צP̀̀ ʀVP ʀ-P P Vɡ!V̀ƀצ0ƀVQƀP-ɡ!-̀ƀ0ƀ-QƀPɡ!̀ƀצ0ƀQƀP̀ƀVPƀ/Qƀ-ǡƀ/Ǣ6P6Ǡ6P022-22-.../á522$025צ.P/466-6Q6P Fފd ZP ɡצ0QP.P š  PGR ZR 4/.צP4252 522$//5.5020--P 6, //+ .- .,. +cZ,../ /- / /, //+ .-.,<.+<\-  }  ؼؼ' ' 2d  3 ټ<4 5ئPress to Continue צ 57@צ Screen_OffSYNTAX: PROCEDURE Screen_Off;צGDESCRIPTION: The "Screen_Off" procedure is used to turn off the screen.USAGE: Screen_Off;CNOTES: After ;צDDESCRIPTION: The "Screen_On" procedure is used to turn on the screenצK after it has been turned off (with the "Screen_Off" procedure.USAGE: Screen_On; Restore (Main_Screen);צ>NOTES: After acknowledging the prompt below, the stored screenצ will be displayed.77 צ Screen_OnצSYNTAX: PROCEDURE Screen_Onage);צEDESCRIPTION: The "Restore" procedure is used to restore screen images. that have been previously stored.&USAGE: TYPE Main_Screen : ScreenImage; צ>NOTES: This screen will be stored and can then be subsequentlyצ- restored with the "Restore" procedure.7צRestoreצ0SYNTAX: PROCEDURE Restore (Image : ScreenImצADESCRIPTION: The "Store" procedure is used to store screen images( in a user defined variable.&USAGE: TYPE Main_Screen : ScreenImage; Store (Main_Screen);تPצO O ++צ| ||+U+צ|| |Z+ צStoreצ2SYNTAX: PROCEDURE Store (VAR Image : ScreenImage);KdLdTESTGENU ~rf$t>4!> ;צ Y[ 6ئPress to Continue ئ 5  צ DF 7PP8: 9hhhhc9'ȑHH`'0)Jhhhh∙!b3HH`!&"Dexx8z& .x>N6nH V > ` ۹   ڡצ Y[ 6ئPress to Continue ئ 5  צ DF 7PP8:you press the screen will be turned off. Theצ@ only way to turn it back on again is with the "Screen_On"צ+ command, or the <5> toggle.7צ Screen_Dumpצ:SYNTAX: PROCEDURE Screen_Dump (VAR Printer : INTERACTIVE);צCDESCRIPTION: The "Screen_Dump" procedure is used to dump the screenE image to the printer or file passed in to the procedure..צ"| { NOTE: the "|" is a delimiter }7GENUTIL3 Testing Facility GENUTIL3 Eצ Version 1.0 צby John E. Cisar צR O U T I N E SN 1) Store (a screen) 20) CLR (|(צThe value returned is > |( "| { NOTE: the "|" is a delimiter }7 צCSRPlease enter a string: s > |P|.צThe value returned is > |CSIPlease enter a string: s > |P| צThe value returned is > | "| { NOTE: the "|" is a delimiter }7 צCSLPlease enter a string: s > |Pate, and a "current string setting: l,x,y,s >     |PթөХ|* צThe value returned is > |*"| { NOTE: the "|" is a delimiter }72 צill haveצ) to press after each call.Enter X Y S >   |Pөѥ| 7өѥ| 7 צInput3Please enter a length, an x and y coordin7USAGE: PROMPT (Inverse,10,10,'This is a test string.');צENOTES: "PROMPT" will first be called with the Normal display type andC then be called with the Inverse display type. You wBSYNTAX: PROCEDURE PROMPT (Off : Display; X,Y : INTEGER; S : STRINGFDESCRIPTION: The "PROMPT" procedure is used to place a string anywhereB on the screen in either Normal or Inverse characters.= Lower Right X-coordinate% LRY = Lower Right Y-coordinateצ$Enter ULX ULY LRX LRY coordinates >     өѩҩ7 צPROMPTצ testing facilityUSAGE: DrawBox (10,10,70,20);צ$NOTES: ULX = Upper Left X-coordinateצ$ ULY = Upper Left Y-coordinateצ% LRX צ6SYNTAX: PROCEDURE DrawBox (ULX,ULY,LRX,LRY : INTEGER);צHDESCRIPTION: The "DrawBox" procedure is used to draw a box on the screenצD using the specialized characters set supplied with this LRX = Lower Right X-coordinate% LRY = Lower Right Y-coordinateצ$Enter ULX ULY LRX LRY coordinates >     өѩҩ7צDrawBoxa window on theצ screen.צUSAGE: SetVPort (10,10,70,20);צ$NOTES: ULX = Upper Left X-coordinateצ$ ULY = Upper Left Y-coordinateצ% צ in slot 4.7.PRINTERpצSetVPort7SYNTAX: PROCEDURE SetVPort (ULX,ULY,LRX,LRY : INTEGER);צDDESCRIPTION: The "SetVPort" procedure is used to set צ!USAGE: VAR Printer : INTERACTIVE;$ REWRITE (Printer,'.PRINTER'); Screen_Dump (Printer);צBNOTES: As delivered, the .PRINTER driver is set up for a UPIC cardConv Long->Real) 39) Leap (chk for leap yr) צO 2) Restore (a screen) 21) CRS (Conv Real->Str) 40) DaysBetween (two dates) צL 3) Screen_On 22) CRL (Conv Real->Long) 41) GetDay (ret day str) N 4) Screen_Off 23) CDS (Conv Date->Str) 42) GetMonth (ret mon str) צM 5) Screen_Dump 24) CDJ (Conv Date->Juln) 43) GetSysDate (sys date)  צM 6) SetVPort (windows) 25) CJS (Conv Juln->Str) 44) GetSysTime (sys time)  צO 7) DrawBox (boxes) 2tcha([0..255],ordcha,onechar); (until (onechar = 'q'); $end; {showscrn} $ procedure viewany; %var scrnum :integer; )vbool : boolean; %begin %dfvp(5,5,65,15); %boxvp; %gotoxy(4,4); %write('enter number of screen to be displayed '); %gotoxy(8,6); n; &for i := 1 to 10 do write(' Das Box '); &delay(2); &wrapoff; &end; {setbox} . +  procedure showscrn(scrnum : integer); $begin $repeat (scrpg(2,scrnum); (gotoxy (0,23); (invercha; (write(' Enter "q" to exit this screen '); (normcha; (ge&getboxv(boxuly, 21,0,0,4, 'enter upper left y '); &showv; &getboxv(boxlrx, 79,(boxulx+1),79,6,'enter lower right x '); &showv; &getboxv(boxlry, 23,(boxuly+1),23,8,'enter lower right y '); &showv; &dfvp(boxulx,boxuly,boxlrx,boxlry); &boxvp; &wrapo'procedure showv; ,begin ,dfvp(33,12,75,20); ,gotoxy(0,23); ,write('Values : ',boxulx:3,boxuly:3,boxlrx:3,boxlry:3); ,end; & &begin {setbox} &dfvp(25,10,79,22); &boxvp; &showv; &getboxv(boxulx, 77,0,0,2, 'enter upper left x '); &showv; ring); -var vbool : boolean; -begin -dfvp(30,10,79,22); -gotoxy(2,ypos); -write (prompt); -mkbraks(10); -vbool := getlimf(max,min, =def,{default, if null entry } =true, {nullok - true if null is acceptable } =val); -click; -end; {getboxv} ' ine to be higlighted } 6true, {leadspace - one space before entry } 6true {trailspze - one space after entry } :); +click; +end; {enterint} + + + procedure setbox; & 'procedure getboxv( var val:integer; :max,min,def,ypos :integer; prompt :st6[16,13, 27 ], {ctlset1 - quick exit, no other entries F13 is return, 16 is } 6 6[13, 16, 18 {open apple esc} ], E{ctlset2 - normal exit} 6true, {editold - true if old value used and editable } 6true, {hiliton - true if entry l9á x^T^+ P d^lJ (Please enter routine number to test [ ] Z)ZϩP !&* *צϫι * γ8ι" 9r)'%#! "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnpyγ ΫϥZ DOW (Day Of Week) 57) Quit O (Please enter routine number to test [ ] Z)ZϩP !&* *צtr->Juln) 35) UCASE (a string) 54) RAcceptError (Return) צD17) CST (Conv Str->Time) 36) CompareDates (<,>,=) 55) Erase_Screen F18) CIS (Conv Int->Str) 37) DaysIn (a month) 56) Reboot_Message צ<19) CLS (Conv Long->Str) 38)Long) 32) JUSTIFY (a string) 51) LONGDIV (for full accr) צN14) CSR (Conv Str->Real) 33) Strip_Forward (blks) 52) Key_Pressed (bool chk) L15) CSD (Conv Str->Date) 34) Strip_Backward (blks) 53) SAcceptError (Space) צM16) CSJ (Conv S#2) 29) VALIDATE (bool chk) 48) SetSysTime (sys time) צM11) mInput (i/o rout #3) 30) VALIDTIME (bool chk) 49) TDS (Trans Date->Str) צM12) CSI (Conv Str->Int) 31) VALIDOLLAR (a string) 50) LDIVIDE (for dollars) צO13) CSL (Conv Str->6) CJD (Conv Juln->Date) 45) GetTime (full sys date)  צO 8) PROMPT (text on scr) 27) CTS (Conv Time->Str) 46) SetTime (full sys date)  צM 9) Input (i/o rout #1) 28) CCS (Conv Char->Str) 47) SetSysDate (sys date)  צM10) cInput (i/o rout %write(' ( 1 to 12 ) : '); %mkbraks(11); %vbool := getlimf(12, {max } 81, {min} 81, {default, if null entry } 8false, {nullok - true if null is acceptable } 8scrnum); %showscrn(scrnum); %end; %   procedure dowraps( wrapison : boolean); ( (procedure showfit; ,begin ,dfvp(boxulx, boxuly, boxlrx, boxlry); ,boxvp; ,clearvp; ,for i := 1 to 5 do write(msgstr); ,end; &begin &if wrapison then wrapon else wrapoff; &showfit; &delay(3); &wrapoff; &end; {dowraps} & % procedure showait;(1); {freeware screen} 1 1{esc} 27 : wayout; 1{ s } 115 : scrparty; 1{ w } 119 : showait; 1end; {case} 1 )until done; ) %end; {menu} 1 ' ' ' %  begin { ********* main procedure of hbdemo ********** }  hlp1set(2,4,5,9,10); { (apple h) : enterint; 1{ 3,m } 51, 109 : entermsg; 1{ 4,b } 52,98 : setbox; 1{ 5,W } 53,87 : dowraps(true); 1{ 6,N } 54,78 : dowraps(false); 1{ 7,h } 55,104 : showscrn(2); {help with keys} 1{ 8,v } 56,118 : viewany; 1{ 9,f } 57,102 : showscrn( { 1 9 esc s w r i m h v f b} (getcha([ 49..57, 27, 115, 119, 114, 105, 109, 104, 118, 102, 98, 287, 78 ],ichoice,onechar); ( { W N } (case ichoice of . 1{ 1,r } 49, 114 : entereal; 1{ 2,i } 50, 105 u; %var ichoice :integer; )iscr : integer; % %begin ' %repeat {until done } (done := false; (iscr := 11; (scrpg(2,iscr); ( (showvals; ( (gotoxy(50,22); (write('ENTER COMMAND : ____'); ( o $begin $beep; $boop; $softboop; $bigboop; $bup; $uhoh; $yae; $delay(1); $end; boxmsg2; scrpg(2,pattern); dfvp(5,4,60,18); boxvp; gotoxy(30,8); invercha;  writeln(' The party''s over '); delay(2); normcha; end; {scrparty} & ' procedure mene '); boxmsg2;   boxmsg1(5,3,high );  writeln;  writeln(' This is a '); writeln(' "high" box message '); writeln; writeln(' You are listening to '); writeln(' beep, boop, softboop, '); writeln(' bigboop,bup,uhoh and yae ');  for i := 1 to 3 d$shiftscr(-1); $dfvp(2,12,77,21); $shiftscr(1); $end; $ dfvp(20,12,65,22); boxmsgvp; writeln('this is the way'); writeln(' a warning message'); writeln(' appears ! '); boxmsg2;  boxmsg1(3,3,wide ); gotoxy(2,2);  writeln('this is a "wide" box messag*3), ((18+4*j) + i2*3),( 8 + I2*3)); +scrpg(11,patsmall); +end; {for i} %end; {for j} & clflscr; boxvp;  dfvp(30,2,40,10); scrpg(11,blnksmall); dfvp(30,13,40,21); scrpg(11,blnksmall);   for i := 1 to 30 do  begin $dfvp(2,2,77,11); fvp(0,0,79,23); for j := 1 to 4 do %begin %for i := 1 to 5 do +begin +dfvp( ((8+4*j) + i*3),(0 + i*3), ((18+4*j) + i*3),( 8 + I*3)); +scrpg(11,blnksmall); +end; {for i} + %for i := 1 to 5 do +begin +i2 := 6 - i; +dfvp( ((8+4*j) + i2*3),(0 + i2crpg(1,patsmall); scrpg(2,pattern); dfvp(0,0,79,23); for i := 1 to 69 do if (i in [ 2,5,7,14,17, 19, 23, 43,45, 47,54,60 ]) then 'begin 'j := j + 5; 'j := (j mod 15 ); 'dfvp(i,j, (i+10),(j+8) ); 'scrpg(11,blnksmall); 'end;  scrpg(2,pattern); d&end; procedure scrparty; %var blnksmall,pattern, patsmall:integer; ) )i2, i,j, k : integer; ) ) begin pattern := 12;  clflscr; dfvp(30,5,40,13); boxvp; write('bubbles'); dfvp(30,5,40,13);  scrpg(1,blnksmall); scrpg(2,pattern); dfvp(30,5,40,13); s'begin 'if (i mod 7 ) = 0 then /begin /shift := -1; /delay(1); /end; 'doshift; 'end; #done := true; #end; {endit} ' procedure wayout; &begin &clflscr; &gotoxy(5,10); &write('Do you really want to quit now ? '); &if yesf then endit; fvp( 7,12,26,18); 1shiftscr(- shift); 1dfvp(27,11,72,18); 1shiftscr(shift); 1end; {doshift} + #begin {*** endit *** } #clflscr; #shift := 1; #dfvp(5,10,75,20); #boxvp; #gotoxy(5,5); #writeln(' That''s all folks '); # #for i := 1 to 12 do $var shortstr : string; $begin $shortstr := msgstr; $cutstr(40,msgstr); $for i := 1 to 3 do )begin )waiter(msgstr); )delay(1); )waitoff; )boop; )end; %end; {showait}  procedure endit; #var shift :integer; ' -procedure doshift; 1begin 1d, (apple ?), !, (apple !), [got me] } #{NOTE : with position 3 <> 0 the "!" cannot be used as a character in *a string because it will trigger the associated help screen, *in this case, record # 5 }   hlp2set(1,6,7,8,3); { (open apple with 1,2,3,4,5 )} wrapoff; realin := 0.0; intin := 0;  msgstr := 'no message'; boxulx := 0; boxuly := 0; boxlrx := 79; boxlry := 23; menu; ' bigboop; dfvp(0,0,79,23); normcha; wrapon;  end. {hbdemo}  " dure errorf(enum,i1,i2 : integer; r1,r2 : real; str1,str2,str3 :string); *{ initial error program - 5/11/82 } * $ var i,j,k, recefil : integer; )alpha :char; $ $begin $recefil := 0; $scrpg(1,recefil); $dfvp(0,0,79,10); $clearvp; $ $beep; $wrigetlib2; * var scredi,scrpthlib : string; $scrnf : text; $jio, i,j,k, nextsl : integer; $ulx,uly,lrx,lry : integer; $alpha : char; $wstr :string; $nums : array[0..40] of real; $nully : array[0..40] of boolean; $numeric : boolean; $ $  proceprogram mkscr5;  { Jan 22, 1986 modified to use current libraries apr 13, , 1983 } uses realmodes, transcend, applestuff, %{$using .profile/hb/share1.code} share1, %{$using .profile/hb/alib2.code} alib2, %{$using .profile/hb/getlib2.code}  A B C D O^6library files: /p/hb/comlib.lib $$ teln('error # ',enum); $writeln; $if str1 <> '' then begin writeln(str1);writeln;end; $if str2 <> '' then begin writeln(str2);writeln;end; $if str3 <> '' then begin writeln(str3);writeln;end; $ $writeln( i1:5, i2:5,' ', r1:12:3, ' ',r2:12:2); $writeln; $ $writeln(' enter x to halt, any other character to continue'); $read(alpha); $if (alpha = 'x') or (alpha = 'X') then /begin /if alpha = 'X' then scrpg(2,recefil); /exit(program); pha <> 'x') then write(wstr1); -until (wstr2[1] = '*') or (eof(scrnf)); -end; {rdscr1} - %begin (rdscr1; (if alpha <> 'x' then ,begin - ,dfvp(ulx,uly,lrx,lry); ,scrpg(3,slotrecn); ,if (slotrecn > nextsl) or (slotrecn > 500 ) then 7begin 7wri79,23); (clearvp; (dfvp(ulx,uly,79,23); (gotoxy(0,0); (wstr2 := '~'; (repeat { until *}; -readln(scrnf,wstr1); -if wstr2[1] <> '~' then writeln; -if length(wstr1) > 0 then wstr2[1] := wstr1[1] Belse wstr2[1] := ' '; -if (wstr2[1] <> '*') and (al(readln(scrnf,ulx); (readln(scrnf,uly); ( (readln(scrnf,lrx); (readln(scrnf,lry); ( (writeln; (writeln(' vp will be ',ulx:5,uly:5,lrx:5,lry:5); (writeln; (writeln('press any letter to continue, x to skip this screen'); (read(alpha); (dfvp(0,0, := round(nums[2]) 9else scrfil^.prior := 0; /if not nully[3] then scrfil^.next := round(nums[3]) 9else scrfil^.next := 0; /end; 6 (writeln('slot # will be ',slotrecn,', Prior = ',scrfil^.prior:3, 1', next = ',scrfil^.next:3); ( numeric, nully); +if (not numeric) or nully[1] then /begin /writeln(' bad data a start of screen section '); /writeln('>',wstr,'<'); /writeln; /exit(program); /end ,else /begin /slotrecn := round( nums[1]); /if not nully[2] then scrfil^.priorstr2,''); ' $end; {while length(str) >0 ... } $ $ $end; {mstrnum}  procedure readscrn; %var wstr1,wstr2 : string; )i,j,k : integer; )slotrecn : integer; )alpha : char; ) %procedure rdscr1; )begin +readln(scrnf,wstr); +mstrnum(wstr, nums,$strtonum(str2,val,strlen,ndec,numeric,null); $if numeric then 'begin 'j := j + 1; {how many values in string} 'nums[j] := val; 'if not null then nully[j] := false; 'nums[0] := j; 'end else errorf(8, 0,0, 0,0,'non-numeric string in strtonum', 2egin $p1 := length(str); $if ( pos(',',str) > 0 ) then p1 := pos(',',str); $if ( pos(' ',str) < p1) and ( pos(' ',str) > 0 ) then p1 := pos(' ',str); $str2 := copy(str,1,p1); $delstuff(str2); $delete(str,1,p1); $delstuff(str); ) 2) > 0) do delete(str2,pos(' ',str2), 1); $if (pos(',,',str2) > 0) then errorf(13, 0,0, 0,0, 1'multiple commas in string ',str,''); $delstuff(str); $end; {first if length > 0} $ $ j := 0; numeric := true; while (length(str) > 0) and numeric do $b(begin (nums[i] := 0; (nully[i] := true; (end; {for begin} ( $if length(str) > 0 then $begin $p1 := length(str); $if (pos('*',str) > 0) then p1 := pos('*',str)-1; $str := copy(str,1,p1); $ {check for ',,'} $str2 := str; $while (pos(' ',str-done := false; -if length(str) > 0 then 1repeat {until done or length = 0} 5if (str[1] = ' ') or (str[1] = ',') then ?delete(str,1,1) else done := true; 5until done or (length(str) = 0); 3 - -end; {delstuff} - $ $begin $for i := 0 to 40 do - -begin -done := false; -if length(str) > 0 then 1repeat {until done or length = 0} 5if (str[length(str)] = ' ') or (str[length(str)] = ',') 9then delete(str,length(str),1) ?else done := true; - until done or (length(str) = 0); - kscn5...} $ $var str2 : string[80]; (i,j,k,p1, strlen, ndec : integer; (val : real; $ alpha : char; (null :boolean; ( $ (procedure delstuff(var str:string); -{remove leading & trailing blanks and commas, ignores ",," } -var done : boolean; /end; $ $scrpg(2,recefil); $end; {errorf} $ $ $ procedure mstrnum(str:string; var nums: numry ; Cvar numeric : boolean Cvar nully : boolary); ${reads up to 40 numbers prior to *, ignores all after *} ${used in pr8 (read par1.text etc.,) and mteln('warning, screen is to be put in '); 7writeln(' slot # ',slotrecn,' which is '); 7writeln(' greater than next slot ( ',nextsl,' )'); 7writeln(' or greater than 500 '); 7beep; 7alphago; 7end; , ,if slotrecn >= nextsl then nextsl := slotrecn + 1; , ,dfvp(0,0,79,23); ,clearvp; ,writeln('slot # is ',slotrecn, 4', press any letter to see stored screen'); ,writeln; ,writeln( ' (p to print stored screen) '); ,read(alpha); ,dfvp(0,0, 79 GETTIME nextsl; 'writeln; 'boop; ' 'writeln(' ENTER zero for default of ',scrfil^.startrec, /' from record # 0' ); 'writeln; 'writeln(' this number will be in record # 0 '); 'writeln; 'writeln(' Enter zero unless you know something ');1writeln(' path = ',scredi,' did not work, iorerror is ',jio); 1alphago; 1end; %until jio = 0;  end; {startit}  & & "procedure endit; 'begin 'clearvp; 'writeln(' enter # of next available record after fixed screens '); 'scrfil^.startrec := redi := wstr; % %{$iocheck-} %reset(scrnf,scredi); %jio := ioresult; %if jio = 12 then begin .close(scrnf, lock); .reset(scrnf, scredi); .jio := ioresult; .end; %{$iocheck+} %if jio <> 0 then 1begin scrfil^.startrec; % % %repeat {until path ok} %scredi := '.profile/hb/testscrns.text'; %writeln('current input path is : ',scredi); %writeln; %writeln('enter path for edit file , to keep as is'); %readln(wstr); %if length(wstr) > 0 then scwas created, empty'); (writeln; (writeln('record # 1 is first available record '); (writeln; (alphago; (end; % % %writeln('the next available record is ', scrfil^.startrec, .' in ', scrpth, '; indicated by record # 0'); %alphago; %nextsl :=1close(scrfil,lock); 1{$iocheck-} 1reset(scrfil,scrpth); 1jio := ioresult; 1{$iocheck+} 1end; % %if jio = 10 then % begin (rewrite(scrfil, scrpth); (scrfil^.startrec := 1; (put(scrfil); {load record # 0} (writeln(scrpth,' did not exist, it . * procedure startit; begin %scrpthlib := scrpth; % %scrpth := '.profile/hb/fxdscrns.data'; %writeln('scrpth is now : ',scrpth); %{$iocheck-} %reset(scrfil,scrpth); %jio := ioresult; %{$iocheck+} % %if jio = 12 then begin k full, 0 out'); .readln(i); .if i > 0 then 3begin 3scrpg(i,recnum); 3dfvp(0,0,79,23); 3clearvp; 3writeln('key saved screen, then key to continue'); 3read(alpha); 3scrpg((i+1),recnum); 3read(alpha); 3end; { i> 0} .until (i = 0); .end; {test}dure test; * *var i,j, recnum, recx : integer; * *begin *writeln('enter rec # to recall'); *readln(recx); *repeat { until zero} .scrpg(2,recx); .dfvp(0,20, 79,23); .clearvp; .writeln; .writeln('enter 1/save, 5/save full,', 6' 7/quick, 9/quic 0 then begin 5scrpg(3,j); 5writeln('screen stored in record # ',j); 5delay(3); 5end; {if} &end; {recalscrn} & & &procen; &writeln(' enter # for new slot, 0 for none'); &readln(j); &clearvp; &scrpg(2,i); &read(keyboard,alpha); &if alpha = 'p' then begin  x} , 'end; {readscrn} = ( procedure recalscrn; &var i,j : integer; *alpha : char; * & &begin &clearvp; &writeln(' enter # of slot for screen to recall '); &readln(i); &writel,23); ,clearvp; ,scrpg(2,slotrecn); ,if alpha = 'p' then begin @writeln(outprint, H'screen stored in record # ', slotrecn); @writeln(outprint, ' from ',scredi); @fndsiz(ulx,uly,lrx,lry); @scrnprnt(0,0,79,23); @writeln(outprint, I'vp size is ',A3/1.1(&آڢ٢آ&'ڢڢá ޡ?šڢڢ'ޡڢڢڢ~ڢ n( ȡ ۞$(@ $( $( ۡ#š #ȡA B G O^erwise beep; )end; {of case} " "until alpha = 'x'; " "endit; " end. {makescrn} teln(' r : to change source files'); $writeln; $if eof(scrnf) then writeln(' type x , file ',scredi,' is finished.'); " $read(alpha); $case alpha of )'a' : readscrn; )'b' : recalscrn; )'t' : test; )'x' : writeln; )'r' : startit; )oth$writeln(' a : read another screen from edit file'); $writeln; $writeln(' b : recall a screen '); $writeln; $writeln(' t : to test full screen and quick features'); $writeln; $writeln(' x : to exit program '); $writeln; $wri program} % % writeln('April 13, 1983 Version, minor changes Jan 23, 1986'); delay(2);  wrapon;  startit; wrapoff; %  repeat {until done} $dfvp(0,0, 79,23); $clearvp; $writeln('pick one : '); $writeln; 'write (' different : '); 'readln(i); 'if i > 0 then scrfil^.startrec := i; 'seek(scrfil,0); 'put(scrfil); 'writeln; 'writeln(scrfil^.startrec,' stored in record # 0'); 'writeln; 'close(scrfil,lock); 'end; {endit} ' ' ' begin {hostGETTIME GETTIME SETTIME SETTIME COLDSTAR COLDSTAR hhhhc9'ȑHH`'0)Jhhhh∙!b3HH`!&"Deb' \)  ɡ-Í á ܑ ) '!Í ) % ɡ    ~ɡ  ~"