`8N@r@ Hy NMHz<<b Hz` Hz ?<&NN\NuA0<BQ g`? 1) then Insert(Spaces(9-PuncPos),FileName,PuncPos); LookGood := FileName + Spaces(12-Length(FileName)); End; { LookGood } { Pad a string with nulls, until it has a length that equals Lng. } Function AddZero ( Number : Integer; Lng : Byte ) : String; Var WorkRes : String; Begin Str(Number,WorkRes); While Length(WorkRes) 0) then Write('' :10) ELSE Write(Size:10); If (DisplayAttr) then Begin Write(' '); If (Attr And ReadOnly > 0) then Write('r') else Write('-'); If (Attr And Hidden > 0) then Write('h') else Write('-'); If (Attr And SysFile > 0) then Write('s') else Write('-'); If (Attr And VolumeID > 0) then Write('v') else Write('-'); If (Attr And Directory > 0) then Write('d') else Write('-'); If (Attr And Archive > 0) then Write('a') else Write('-'); End; { displayattr } UnpackTime(Time,Dt); With Dt DO Begin If (DisplayDate) then Write(Day:6, '-',AddZero(Month,2),'/',Year); If (DisplayTime) then Write(Hour:6, '.',AddZero(Min,2)); End; { with dt do } Writeln; End; { with dosdata do } FindNext(DosData); End; { while doserror = 0 } End; { ShowDir } BEGIN { main } PauseParam := (ParamStr(1) = '/p') OR (ParamStr(1) = '/P'); DirName := FExpand(''); { Get current directory. } ShowDir(DirName); END. (* Recursive Fibonacci calculation. 26.06.90 *) {$R-,S+} program Fibonacci(input, output); function fib(n : LongInt) : LongInt; begin if n <= 1 then fib := n else fib := fib(n-1) + fib(n-2); end; var n : LongInt; begin Writeln('Calculate some Fibonacci numbers'); If RunFromMemory then Writeln('You can stop a calculation by pressing both shift keys'); Writeln; repeat write('Enter number : '); read(n); writeln; writeln('Result = ',fib(n)) until n = 0 end. {$M 10,10,10,10} Program FileCopy; Uses Dos,UtilUnit; { Filename: FileCopy.pas } { Coder : Jacob V. Pedersen } { Coded : 26-11-1990 } { Purpose : Example } Const Bsize = 8000; { Size of disk buffer } Var Buffer : Pointer; File1, { Source file. } File2 : File; { Destination file. } { Copies Source file to Dest file. } Procedure CopyAFile( Source, Dest : String ); Var Reply : Char; BytesRead, BytesWrit : Integer; Begin GetMem(Buffer,BSize); WriteLn; If (Not(Exist(Source))) then Begin Writeln('Cannot access the SOURCE file. (',Source,').'); HALT; End; If (Exist(Dest)) then Begin Write('DESTINATION file ',Dest,' already exist. Overwrite (Y/N): '); Repeat Reply := UpCase(ReadKey); Until (Reply IN ['Y','N']); WriteLn(Reply); If (Reply = 'N') then EXIT; Writeln; Erase(Dest); End; { to exists } Reset(File1, Source ); Rewrite(File2, Dest ); Write('Copying from ',Source,' to ',Dest,' '); Repeat BlockRead(File1, Buffer^, Bsize, BytesRead); BlockWrite(File2, Buffer^, BytesRead, BytesWrit); Until (BytesRead = 0) or (BytesRead <> BytesWrit); Close(File1); Close(File2); If (BytesRead = BytesWrit) then Writeln('Ok') Else Begin Writeln('Insufficient disk space.'); Erase(Dest); End; FreeMem(Buffer,Bsize); End; { CopyAFile } BEGIN { main } If (ParamCount <> 2) then BEGIN Writeln('Please enter FROM and TO filename on the command line.'); Writeln('Use the OPTIONS/Run dialog.'); Writeln; END ELSE CopyAFile(ParamStr(1),ParamStr(2)); END. {$M 5,1,1,10} {Show a magic square, where the sum of each coloum, row or diagonal is the same } Program magic(input,output); const maxsize = 19; type sqrtype = array[1..maxsize,1..maxsize] of integer; var sqare: sqrtype; Size,row,col: integer; procedure makesqare(var sq:sqrtype;limit:integer); var num,r,c: integer; begin for r:=1 to limit do for c:=1 to limit do sq[r,c]:=0; r:=(limit+1) div 2; c:=limit; for num:=1 to sqr(limit) do begin if sq[r,c]<>0 then begin r:=r-1; if r<1 then r:=r+limit; c:=c-2; if c<1 then c:=c+limit end; sq[r,c]:=num; gotoxy(r*4,2+c); write(num:4); r:=r+1; if r>limit then r:=r-limit; c:=c+1; if c>limit then c:=c-limit end end; begin Size:=5; repeat if ((Size>2) and (SizeLength(InputLine) then Ch:=NextIsEOF else Ch:=UpCase(InputLine[Position]); end; procedure PrevCh; begin dec(Position) end; begin {procedure Next} LastCh:=Ch; LastPos:=Position; repeat NextCh until Ch<>' '; ErrPos:=Position; case Ch of '0'..'9','.': {Number} begin p:=Position; repeat NextCh until not (Ch in ['0'..'9','.']); if UpCase(Ch)='E' then begin {look for E} NextCh; if Ch in ['+','-'] then NextCh; while Ch in ['0'..'9'] do NextCh; end; Val(Copy(InputLine,p,Position-p),NextVal,e); if e<>0 then begin Position:=p+e-1; Ch:=NextIsError end; PrevCh; Ch:=NextIsValue; end; 'A'..'Z': {Name} begin NextName:=''; while (Ch in ['A'..'Z']) do begin NextName:=NextName+Ch; NextCh end; PrevCh; Ch:=NextIsName; end; end; end; function AddExpr: Real; FORWARD; function Factor: Real; function FindAndSkip(What: TStr): Boolean; begin if NextName=What then begin Next; FindAndSkip:=True; end else FindAndSkip:=False; end; begin case Ch of NextIsValue: begin Factor:=NextVal; Next; end; NextIsName: {SIN(10) or SIN 10} begin {Add your own here} if FindAndSkip('PI') then Factor:=PI else if FindAndSkip('SQR') then Factor:=sqr(Factor) else if FindAndSkip('SQRT') then Factor:=sqrt(Factor) else if FindAndSkip('ABS') then Factor:=abs(Factor) else if FindAndSkip('SIN') then Factor:=sin(Factor) else if FindAndSkip('COS') then Factor:=cos(Factor) else if FindAndSkip('ARCTAN') then Factor:=arctan(Factor) else if FindAndSkip('LOG') then Factor:=ln(Factor)/ln(10) else if FindAndSkip('LN') then Factor:=ln(Factor) else if FindAndSkip('EXP') then Factor:=exp(Factor) else if FindAndSkip('MIN') then begin {User defined rutine} if Saved['X']')' then Ch:=NextIsError else Next; end; else {Error} Ch:=NextIsError; Factor:=0; end; end; function SignedFactor: Real; {SignedFactor ::= (+|-| ) SignedFactor} begin case Ch of '-': begin Next; SignedFactor:=-SignedFactor; end; '+': begin Next; SignedFactor:=+SignedFactor; end; else SignedFactor:=Factor; end; end; function Term: Real; {Term ::= (^| ) SignedFactor} var R: Real; begin R:=SignedFactor; while Ch='^' do begin Next; R:=exp(ln(R)*SignedFactor); end; Term:=R; end; function MulExpr: Real; {MulExpr ::= Term (*|/| ) Term} var R: Real; begin R:=Term; while Ch in ['*','/'] do begin Next; case LastCh of '*': R:=R*Term; '/': R:=R/Term; end; end; MulExpr:=R; end; function AddExpr: Real; {AddExpr ::= MulExpr (+|-| ) MulExpr} var R: Real; begin R:=MulExpr; while Ch in ['+','-'] do begin Next; case LastCh of '+': R:=R+MulExpr; '-': R:=R-MulExpr; end; end; AddExpr:=R; end; function AssignStmt: Boolean; {AssignStmt ::= ID=AddExpr} var ID: Char; Pos2: Integer; begin AssignStmt:=False; if Ch=NextIsName then begin Pos2:=LastPos; ID:=NextName[1]; Next; if Ch='=' then begin Next; Saved[ID]:=AddExpr; AssignStmt:=True; end else begin Position:=Pos2; Next; end; end; end; Label Exit; begin {Main program} FillChar(Saved,SizeOf(Saved),0); writeln('MiniCalc for Atari'); repeat write('* '); readln(CmdLine); if CmdLine='' then goto Exit; repeat Position:=Pos(';',CmdLine+';'); InputLine:=Copy(CmdLine,1,Position-1); Delete(CmdLine,1,Position); Position:=0; Next; if (Ch<>NextIsEOF) then begin if not AssignStmt then begin R:=AddExpr; if Ch=NextIsEOF then begin write('= '); if abs(R)>1 then {Chose your own format} writeln(R:10:5) else if R=0 then writeln(0) else writeln(R); end; end; if Ch<>NextIsEOF then writeln(InputLine,#13#10'^ fejl':ErrPos+8); end; until (CmdLine=''); until false; Exit: end. {---------------------------------------------------------------------} { HighSpeed Pascal Demo Program } { } { Copyright (C) 1990 by D-House I Aps, Denmark } { } { Programmed by Jacob V. Pedersen } { } { } { The program: Expands tabulator signs, and removes any unnessecary } { spaces at the end of each line in the program. The } { original file is renamed to nnnn.BAK before processed. } { Output is an nnnn.PAS file. } {---------------------------------------------------------------------} Program NoTabs; Uses Dos,UtilUnit; Const MaxLnLng = 127; TabSize = 8; Procedure Process(N : Byte); Var Data : String[MaxLnLng]; I,O : Text; Dir : DirStr; Name : NameStr; Ext : ExtStr; InName, OutName : PathStr; Line : Integer; Procedure Expand; Const Spaces = ' '; Var TabPos : Byte; ToIns : Byte; Begin While Pos(#9,Data) > 0 Do Begin TabPos := Pos(#9,Data); ToIns := Succ(TabSize)-(TabPos MOD TabSize); Delete(Data,TabPos,1); If ToIns < Succ(TabSize) then Insert(Copy(Spaces,1,ToIns),Data,TabPos) Else Insert(' ',Data,Tabpos); End; While Copy(Data,Length(Data),1) = #32 Do Delete(Data,Length(Data),1); End; { Expand } Begin { Process } FSplit(ParamStr(N),Dir,Name,Ext); InName := Dir+Name+'.BAK'; OutName:= Dir+Name+'.PAS'; If Exist(InName) then Writeln('Backup file "',InName,'" already exists. Cannot continiue.') Else If Not(Exist(OutName)) then Writeln('Cannot open input file: "',OutName,'"') Else Begin Rename(OutName,InName); { From .PAS to .BAK } Reset(I,InName); { Read from .BAK } Rewrite(O,OutName); { Write to .PAS } Line := 0; While Not(Eof(I)) Do Begin ReadLn(I,Data); Expand; WriteLn(O,Data); Inc(Line); GotoXy(1,WhereY); Write(OutName,' (',Line,')'); If (Length(Data) = MaxLnLng) then Writeln(#7,' ERROR: Long line found. Data may be lost!'); End; Close(I); Close(O); Writeln; Writeln('Done.'); End; End; { Process } Var X : Byte; BEGIN Clrscr; Writeln('HighSpeed Pascal tab-sign expander.'); Writeln; If ParamCount = 0 then Writeln('Please specify filename(s) on command line.') Else For X := 1 to ParamCount Do Process(X); END. PROGRAM PasTri; (* Pascal/S (ST) ver. 22.07.89 *) CONST cols = 13; VAR row : ARRAY[0..cols] OF integer; i,j : integer; max : integer; BEGIN ClrScr; REPEAT REPEAT gotoxy(1,21); write('Size: (1-',cols:1,'; 0 = stop) : '); ClrEol; read(max); writeln UNTIL (max>=0) AND (max<=cols); IF max>0 THEN BEGIN gotoxy(1,4); FOR i:=0 TO cols DO row[i]:=0; row[1]:=1; FOR j:=1 TO cols DO BEGIN IF j<=max THEN BEGIN FOR i:=j DOWNTO 1 DO row[i]:=row[i]+row[i-1]; write(' ':3*(cols-j)); FOR i:=1 TO j DO write(row[i]:6) END; ClrEol; Writeln; END END UNTIL max=0; END. {----------------------------------------------------------------------} { HighSpeed Pascal Demo Program } { } { Copyright (C) 1990 by D-House I Aps, Denmark } { } { Programmed by Jacob V. Pedersen } { } { } { The program: Prints your Pascal programs (source-code). Any include } { files are also loaded and printed. Remarks can be dis- } { carded when printing. } {----------------------------------------------------------------------} Program Print; Uses Printer,Dos; Const TopMargin = 2; { Top margin } PrintLines = 59; { Lines to print per page } BottomMargin = 11; { Bottom margin } PageLines = 72; { Adds up to total lines per page } MaxIncludeLevel = 7; { 0 is the same as IncLoad=False } RemShow =False; { Show remarks? } LinShow =False; { Show line numbers? } IncLoad = True; { Load include files? } Var LineNum : Integer; { Line counter. Total } PageCount : Byte; { Line counter. Page } IncludeLevel : Byte; { Include-file level } { Main procedure to process the primary file, as well as any } { found include files. } Procedure Process_File(Fil : PathStr; FirstFile : Boolean); Var InFil : Text; { Input file } Ch , { Current character } PrevCh : Char; { Previous character } Buffer , { Buffer for output } Data : String; { Line read from file } LinePos : Byte; { Current position on line } StrExp , { Currently in a strig expression? } IgnoreStr , { Used in connection with StrExp } In_Remark , { Currently in a remark? } FirstLine, { First line in file? } NormChr : Boolean; { Is there a character on the line? } { Stuffs characters into the output stream } Procedure OutPut(C : Char); Begin If In_Remark and Not(RemShow) then Exit; Buffer := Buffer + C; If (C > #32) then NormChr := True; End; { Print a line to the output file } Procedure PrintLine; Var X : Byte; { Returns true if no characters are present in the output stream } Function EmptyLine : Boolean; Var X : Byte; Begin For X := 1 to Length(Data) Do If Data[x] <> #32 then Begin EmptyLine := False; Exit; End; EmptyLine := True; End; { Takes care of top and bottom margins } Procedure MakeMargin(Lines : Byte); Var X : Byte; Begin For X := 1 to Lines Do WriteLn(Lst); End; Begin { PrintLine } If (NormChr or EmptyLine) and Not(FirstLine) then Begin If (PageCount = 0) then MakeMargin(TopMargin) Else If (PageCount = PrintLines) then Begin MakeMargin(BottomMargin); MakeMargin(TopMargin); PageCount := 0; End; Inc(PageCount); If LinShow then Begin Inc(LineNum); Write(Lst,LineNum:5,',',IncludeLevel,': '); End; Writeln(Lst,Buffer); End; Buffer := ''; End; { PrintLine } { Provides the next character in the input stream } Procedure NextCh; Begin PrevCh := Ch; If LinePos = Length(Data) then Begin LinePos := 0; PrintLine; ReadLn(InFil,Data); FirstLine := In_Remark and Not(RemShow); NormChr := False; Ch := #0; End Else Begin Inc(LinePos); Ch := Data[LinePos]; End; End; { NextCh } { Looks ahead in the input stream. Used to determine if a character } { is the start of a remark or a compiler directive } Function LookAhead(Chars : Byte) : Char; Begin If LinePos+Chars <= Length(Data) then LookAhead := Data[LinePos+Chars] Else LookAhead := #0; End; { LookAhead } { Reads and processes any remarks found in the input stream } Procedure Process_Remark; Begin In_Remark := True; OutPut(Ch); Case Ch Of '{' : Repeat NextCh; OutPut(Ch); Until (Ch = '}'); '(' : Repeat NextCh; OutPut(Ch); Until (PrevCh = '*') and (Ch = ')'); End; In_Remark := False; End; { Process_Remark } { Reads and processes compiler directives. If IncLoad is True, then } { include files are processed by calling Process_File recursively } Procedure Process_Directive; Var OldPos : Byte; Navn : PathStr; Stop : Char; Begin If IncLoad then Begin OldPos := LinePos; If Ch = '{' then Stop := '}' Else Stop := '*'; While PrevCh <> '$' Do NextCh; If (UpCase(Ch) = 'I') then Begin NextCh; If (Ch = #32) then Begin Navn := ''; Repeat NextCh; If (Ch <> #32) and (Ch <> Stop) then Navn := Navn + Ch; Until (Ch = Stop); If Ch = '*' then NextCh; Process_File(Navn,False); Exit; End; End; LinePos := OldPos; OutPut(Data[LinePos]); End { IncLoad } Else OutPut(Ch); End; { Process_Directive } Begin { Process_File } If (IncludeLevel <= MaxIncludeLevel) Then { Check include level } Begin If (Pos('.',Fil) = 0) then Fil := Fil + '.PAS'; { Check file extension } Assign(InFil,Fil); {$I-} Reset(InFil); { Try to open the file } {$I+} If IOresult = 0 then { File exists. Begin processing } Begin If FirstFile then { If beginning of new printout } Begin LineNum := 0; { then reset some variables } PageCount := 0; IncludeLevel := 0; End; Inc(IncludeLevel); FirstLine := True; In_Remark := False; StrExp := False; IgnoreStr := False; Ch := #0; Data := ''; LinePos := 0; Repeat NextCh; If Not(In_Remark) and (PrevCh = '''') then Begin If (Ch = '''') then IgnoreStr := True Else Begin If IgnoreStr then IgnoreStr := False Else StrExp := Not(StrExp); End; End; If StrExp then OutPut(Ch) Else Case Ch Of '{' : If (LookAhead(1) = '$') then Process_Directive else Process_Remark; '(' : If (LookAhead(1) = '*') then Begin If (LookAhead(2) = '$') then Process_Directive else Process_Remark End Else OutPut(Ch); Else OutPut(Ch); End; { Case } Until (Eof(InFil)) and (LinePos = Length(Data)); PrintLine; Close(InFil); Dec(IncludeLevel); If (IncludeLevel = 0) then Page(Lst); End Else Writeln(#7,'Can''t process the file: ',Fil); End Else Writeln('Include-level ',IncludeLevel,' is too deep.'); End; { Process_File } Var Name : String; X : Byte; BEGIN { Main } ClrScr; Writeln('HighSpeed Pascal print program.'); Writeln; If ParamCount = 0 then Begin Write('Enter name of program to print: '); Readln(Name); Process_File(Name,True); End Else For X := 1 to ParamCount Do Begin Writeln('Printing: ',ParamStr(x)); Process_File(ParamStr(X),True); End; END. Program StrDemo; { This small program demonstrates how to use one of the new } { features in the UTILUNIT.PAS file } Uses UtilUnit; Var R : Real; Begin Write('Enter a number: '); ReadLn(R); { All output to the StrOut file is stored in the string StrData. } Write(StrOut,R :20:10); { StrData now contains the entered number. } { Including the formatting spaces. } Writeln('You entered: ',StrData); End. . !.. BOUNCER PAS " BOXES1 PAS &BOXES2 PAS (RANLINESPAS *Program Bouncer; Uses EasyGraf; { Filename: Bouncer.pas } { Coder : Jacob V. Pedersen } { Coded : 4-8-1990 } { Purpose : Example } { The mouse is not shown if you enter .TOS in the OPTIONS/Linker dialog } { Runtime commands are: [+] Increaces the size of the tail. [-] Decreaces the size of the tail. [C] Clears the screen. [F] Freezes the program. [ ] Set cleanup of tail to On/Off } Const AbsMax = 200; { Max. number of lines. } Var Brain : Array[1..AbsMax, 1..4] OF Integer; Maxs, Coors : Array[1..4] OF Integer; Direcs : Array[1..4] OF Boolean; Cur_Max : Integer; { Current max. lines. } Drawn : Integer; { Number of drawn lines. } CleanUp : Boolean; Procedure DelargeTail; Begin If (Cur_Max > 1) AND (CleanUp) THEN Begin LineColor(0); Line(Brain[1,1],Brain[1,2],Brain[1,3],Brain[1,4]); Dec(Drawn); Dec(Cur_Max); Move(Brain[2],Brain[1],8*Drawn); End; End; { DelargeTail } Procedure EnlargeTail; Begin If (Cur_Max < AbsMax) THEN Inc(Cur_Max); End; { EnlargeTail } Procedure CheckTail; Begin If (Drawn > Cur_Max) THEN Begin If (CleanUp) THEN Begin LineColor(0); Line(Brain[1,1],Brain[1,2],Brain[1,3],Brain[1,4]); Move(Brain[2],Brain[1],8*Cur_Max); End; Dec(Drawn); End; End; { CheckTail } Procedure CalculateCoors; Var X : Byte; Function CheckMax : Boolean; Begin If (Coors[x] = Maxs[x]) and (Direcs[x]) then Begin Direcs[x] := False; CheckMax := True; End ELSE CheckMax := False; End; { CheckMax } Procedure MakeMin; Begin If (Coors[x] = 0) and Not Direcs[x] then Direcs[x] := True; End; { MakeMin } Procedure Adjust; Begin If (X = 1) then Begin If (Direcs[x]) then Begin If (Odd(Coors[2])) then Inc(Coors[1]); End ELSE Dec(Coors[x]); End ELSE If (Direcs[x]) then Inc(Coors[x]) else Dec(Coors[x]); End; { Adjust } Begin For X := 1 to 4 DO Begin If (CheckMax) then ELSE MakeMin; Adjust; End; End; { CalculateCoors } Procedure StartValues; Var X : Byte; Begin Maxs[1] := MaxX; Maxs[2] := MaxY; Maxs[3] := maxX; Maxs[4] := MaxY; For X := 1 to 4 DO Begin Coors[x] := Random(Maxs[x]); Direcs[x] := Odd(Random(20)); End; Drawn := 0; Cur_Max := 1; CleanUp := TRUE; End; { StartValues } Procedure Lets_Bounce; Var Dummy : Char; Begin StartValues; Repeat CalculateCoors; LineColor(Random(MaxColor+1)); Line(Coors[1],Coors[2],Coors[3],Coors[4]); Inc(Drawn); CheckTail; If (KeyPressed) THEN Repeat CASE UpCase(ReadKey) OF '+' : EnlargeTail; '-' : DelargeTail; ' ' : Begin If (CleanUp = False) THEN ClearDevice; CleanUp := NOT(CleanUp); End; 'C' : ClearDevice; 'F' : Dummy := ReadKey; ELSE Exit; END; Until (Not(KeyPressed)); Move( Coors, Brain[Drawn], 8 ); Until False; End; { Lets_Bounce } BEGIN { main } Randomize; InitGraphics; ClearDevice; Lets_Bounce; DeInitGraphics END. {M 10,10,20,20} Program Boxes1; Uses EasyGraf; { Filename: Boxes1.pas } { Coder : Jacob V. Pedersen } { Coded : 1-8-1990 } { Purpose : Example } { The mouse is not shown if you enter .TOS in the OPTIONS/Linker dialog } Const StepX = 1; StepY = 1; Var ShiftX : Byte; ShiftY : Byte; Boxes : Integer; { Makes a number of boxes, all filled with smaller boxes. } Procedure MakeBoxes; Var Xlng, Ylng, X,Y : Integer; Procedure FillBox( X1,Y1, X2,y2 : Integer); Begin If KeyPressed then Exit; LineColor(Random(MaxColor+1)); Box(x1,y1,x2,y2); If (X1+stepx < X2) AND (Y1+stepy < Y2) then Fillbox( x1+stepx, y1+stepy, x2-stepx, y2-stepy ); End; { FillBox } Begin Xlng := (MaxX DIV Boxes)-1; Ylng := (MaxY DIV Boxes)-1; ShiftX := (MaxX MOD Boxes) DIV 2; ShiftY := (MaxY MOD Boxes) DIV 2; For X := 0 to Boxes-1 DO For Y := 0 to Boxes-1 do Begin FillBox(ShiftX+(X*Xlng)+X, ShiftY+(Y*Ylng)+Y, ShiftX+(Xlng*succ(X))+X, ShiftY+(Ylng*succ(Y))+Y); End; End; { MakeBoxes } BEGIN { main } Randomize; InitGraphics; ClearDevice; Boxes := 0; Repeat Inc(Boxes); MakeBoxes; Until (KeyPressed) OR (Boxes = 400); DeInitGraphics; END. Program Boxes2; Uses EasyGraf; { Filename: BOXES2.PAS } { Coder : JVP. } { Coded : 1-8-1990 } { Purpose : Example } { The mouse is not shown if you enter .TOS in the OPTIONS/Linker dialog } Const XStep = 2; { Step value for horizontal lines. } YStep = 3; { Step value for vertical lines. } MaxTimes = 3; { How many screens will be made? } Var Times : Byte; { Screen counter. } Direc : Boolean; { Direction indicator. } { Make boxes, by using resursive calls. } Procedure Recursive_Boxes( X1,Y1, X2,Y2 : Integer ); Begin If (KeyPressed) then Exit; LineColor(Random(MaxColor+1)); Box(X1,Y1,X2,Y2); If (Y1 >= MaxY DIV 2) OR (X1 >= MaxX DIV 2) then Inc(Times); If (Times < MaxTimes) then Begin If (X1 >= MaxX DIV 2) OR (Y1 >= MaxY DIV 2) then Direc := FALSE ELSE If (X1 <= 0) OR (Y1 <= 0) then Direc := TRUE; If (Direc = TRUE) then Recursive_Boxes( X1+XStep, Y1+YStep, X2-XStep, Y2-YStep ) ELSE Recursive_Boxes( X1-XStep, Y1-YStep, X2+XStep, Y2+YStep ); End; End; { Recursive_Boxes } BEGIN { main } Randomize; InitGraphics; ClearDevice; Repeat Times := 0; Direc := True; Recursive_Boxes(0,0,MaxX,MaxY); Until KeyPressed; DeInitGraphics; END. Program RanLines; Uses EasyGraf; { Filename: RanLines.pas } { Coder : Jacob V. Pedersen } { Coded : 1-8-1990 } { Purpose : Example } { The mouse is not shown if you enter .TOS in the OPTIONS/Linker dialog } Procedure Make_Lines; Const Extra=-20; Begin Repeat LineColor(Random(MaxColor+1)); Line( Random(MaxX+Extra*2)-Extra, Random(MaxY+Extra*2)-Extra, Random(MaxX+Extra*2)-Extra, Random(MaxY+Extra*2)-Extra); Until (KeyPressed); End; { Make_Lines } BEGIN { main } Randomize; InitGraphics; ClearDevice; Make_Lines; DeInitGraphics; END. >HELPARC&BARBAR3DCIRCLED CLEARDEVICE CLEARVIEWPORT CLOSEGRAPH DETECTGRAPHvDRAWPOLYELLIPSEl FILLELLIPSEFILLPOLY( FLOODFILL GETARCCOORDS GETASPECTRATIOw GETBKCOLORGETCOLOR4GETDEFAULTPALETTE_ GETDRIVERNAMEGETFILLPATTERN2GETFILLSETTINGS GETGRAPHMODEGETIMAGEnGETLINESETTINGS  GETMAXCOLOR GETMAXMODE GETMAXX DGETMAXY GETMODENAME GETMODERANGE 4 GETPALETTE GETPALETTESIZE GETPIXEL ?GETTEXTSETTINGS OGETVIEWSETTINGS GETX GETY GRAPHDEFAULTS: GRAPHERRORMSG GRAPHRESULT0 IMAGESIZE INITGRAPH.LINE-LINERELtLINETOMOVEREL MOVETOXOUTTEXT OUTTEXTXYPIESLICE8PUTIMAGEPUTPIXEL RECTANGLETRESTORECRTMODESECTOR SETACTIVEPAGER SETALLPALETTE~SETASPECTRATIO SETBKCOLORSETCOLORSETFILLPATTERNF SETFILLSTYLE SETGRAPHMODE SETLINESTYLEz SETPALETTE5 SETRGBPALETTESETTEXTJUSTIFY9 SETTEXTSTYLE[ SETVIEWPORT SETVISUALPAGE SETWRITEMODE TEXTHEIGHTH TEXTWIDTHINSTALLUSERDRIVERSETGRAPHBUFSIZEREGISTERBGIDRIVER INSTALLUSERFONT REGISTERBGIFONT =SETUSERCHARSIZE \GRAPH { GRAPHVERSION {GROK { GRNOINITGRAPH { GRNOTDETECTED {GRFILENOTFOUND {GRINVALIDDRIVER { GRNOLOADMEM { GRNOSCANMEM { GRNOFLOODMEM {GRFONTNOTFOUND { GRNOFONTMEM { GRINVALIDMODE {GRERROR { GRIOERROR { GRINVALIDFONT {GRINVALIDFONTNUM {DETECT {CGA {MCGA {EGA {EGA64 {EGAMONO {IBM8514 {HERCMONO {ATT400 {VGA {PC3270 {STCOLOR {STMONO {STLOW {STMEDIUM {STHIGH {CGAC0 {CGAC1 {CGAC2 {CGAC3 {CGAHI {MCGAC0 {MCGAC1 {MCGAC2 {MCGAC3 {MCGAMED {MCGAHI {EGALO {EGAHI {EGA64LO {EGA64HI { EGAMONOHI { HERCMONOHI {ATT400C0 {ATT400C1 {ATT400C2 {ATT400C3 { ATT400MED {ATT400HI {VGALO {VGAMED {VGAHI {PC3270HI { IBM8514LO { IBM8514HI {BLACK {BLUE {GREEN {CYAN {RED {MAGENTA {BROWN { LIGHTGRAY {DARKGRAY { LIGHTBLUE { LIGHTGREEN { LIGHTCYAN {LIGHTRED { LIGHTMAGENTA {YELLOW {WHITE {EGABLACK {EGABLUE {EGAGREEN {EGACYAN {EGARED { EGAMAGENTA {EGABROWN { EGALIGHTGRAY { EGADARKGRAY { EGALIGHTBLUE { EGALIGHTGREEN { EGALIGHTCYAN { EGALIGHTRED {EGALIGHTMAGENTA { EGAYELLOW {EGAWHITE {SOLIDLN {DOTTEDLN {CENTERLN {DASHEDLN { USERBITLN { NORMWIDTH { THICKWIDTH { DEFAULTFONT { TRIPLEXFONT { SMALLFONT { SANSSERIFFONT { GOTHICFONT {HORIZDIR {VERTDIR { USERCHARSIZE {LEFTTEXT { CENTERTEXT { RIGHTTEXT { BOTTOMTEXT {TOPTEXT {CLIPON {CLIPOFF {TOPON {TOPOFF { EMPTYFILL { SOLIDFILL {LINEFILL { LTSLASHFILL { SLASHFILL { BKSLASHFILL { LTBKSLASHFILL { HATCHFILL { XHATCHFILL {INTERLEAVEFILL { WIDEDOTFILL { CLOSEDOTFILL {USERFILL { NORMALPUT {COPYPUT {XORPUT {ORPUT {ANDPUT {NOTPUT { MAXCOLORS { PALETTETYPE {LINESETTINGSTYPE {TEXTSETTINGSTYPE {FILLSETTINGSTYPE {FILLPATTERNTYPE { POINTTYPE { VIEWPORTTYPE { ARCCOORDSTYPE {GEMAES% MU_KEYBD% MU_BUTTON% MU_M1% MU_M2% MU_MESAG% MU_TIMER% K_RSHIFT% K_LSHIFT% K_CTRL% K_ALT% MN_SELECTED% WM_REDRAW% WM_TOPPED% WM_CLOSED% WM_FULLED% WM_ARROWED% WM_HSLID% WM_VSLID% WM_SIZED% WM_MOVED% WM_NEWTOP% AC_OPEN% AC_CLOSE% FMD_START% FMD_GROW% FMD_SHRINK% FMD_FINISH% R_TREE% R_OBJECT% R_TEDINFO% R_ICONBLK% R_BITBLK% R_STRING% R_IMAGEDATA% R_OBSPEC% R_TEPTEXT% R_TEPTMPLT% R_TEPVALID% R_IBPMASK% R_IBPDATA% R_IBPTEXT% R_BIPDATA% R_FRSTR% R_FRIMG% NAME% CLOSER% FULLER% MOVER% INFO% SIZER% UPARROW% DNARROW% VSLIDE% LFARROW% RTARROW% HSLIDE% WC_BORDER% WC_WORK% WF_KIND% WF_NAME% WF_INFO% WF_WORKXYWH% WF_CURRXYWH% WF_PREVXYWH% WF_FULLXYWH% WF_HSLIDE% WF_VSLIDE% WF_TOP% WF_FIRSTXYWH% WF_NEXTXYWH% WF_RESVD% WF_NEWDESK% WF_HSLSIZE% WF_VSLSIZE% WF_SCREEN% END_UPDATE% BEG_UPDATE% END_MCTRL% BEG_MCTRL% ARROW% TEXT_CRSR% BUSYBEE% HOURGLASS% POINT_HAND% FLAT_HAND% THIN_CROSS% THICK_CROSS% OUTLN_CROSS% USER_DEF% M_OFF% M_ON% G_BOX% G_TEXT% G_BOXTEXT% G_IMAGE% G_USERDEF% G_IBOX% G_BUTTON% G_BOXCHAR% G_STRING% G_FTEXT% G_FBOXTEXT% G_ICON% G_TITLE% NONE% SELECTABLE% DEFAULT% F_EXIT% EDITABLE% RBUTTON% LASTOB% TOUCHEXIT% HIDETREE% INDIRECT% SELECTED% CROSSED% CHECKED% DISABLED% OUTLINED% SHADOWED% LWHITE% LBLACK% LRED% LGREEN% LBLUE% LCYAN% LYELLOW% LMAGENTA% EDSTART% EDINIT% EDCHAR% EDEND% TE_LEFT% TE_RIGHT% TE_CNTR% BACKSPACE% TAB% S_DELETE% S_INSERT% SHIFT_INS% RETURN% ENTER% UNDO% HOME% CUR_UP% CUR_DOWN% CUR_LEFT% CUR_RIGHT% SHIFT_HOME% SHIFT_CU% SHIFT_CD% SHIFT_CL% SHIFT_CR% ESC% CTRL_A% CTRL_B% CTRL_C% CTRL_D% CTRL_E% CTRL_F% CTRL_G% CTRL_H% CTRL_I% CTRL_J% CTRL_K% CTRL_L% CTRL_M% CTRL_N% CTRL_O% CTRL_P% CTRL_Q% CTRL_R% CTRL_S% CTRL_T% CTRL_U% CTRL_V% CTRL_W% CTRL_X% CTRL_Y% CTRL_Z% CTRL_1% CTRL_2% CTRL_3% CTRL_4% CTRL_5% CTRL_6% CTRL_7% CTRL_8% CTRL_9% CTRL_0% ALT_A% ALT_B% ALT_C% ALT_D% ALT_E% ALT_F% ALT_G% ALT_H% ALT_I% ALT_J% ALT_K% ALT_L% ALT_M% ALT_N% ALT_O% ALT_P% ALT_Q% ALT_R% ALT_S% ALT_T% ALT_U% ALT_V% ALT_W% ALT_X% ALT_Y% ALT_Z% ALT_1% ALT_2% ALT_3% ALT_4% ALT_5% ALT_6% ALT_7% ALT_8% ALT_9% ALT_0% F1% F2% F3% F4% F5% F6% F7% F8% F9% F10% SHIFT_F1% SHIFT_F2% SHIFT_F3% SHIFT_F4% SHIFT_F5% SHIFT_F6% SHIFT_F7% SHIFT_F8% SHIFT_F9% SHIFT_F10% CTRL_AE% CTRL_OE% CTRL_UE% ALT_AE% ALT_OE% ALT_UE% SH_ALT_AE% SH_ALT_OE% SH_ALT_UE% GEMDECL,z CONTROL_MAX,z INTIN_MAX,z INTOUT_MAX,z WORKOUT_MAX,z ADDRIN_MAX,z ADDROUT_MAX,z GLOBAL_MAX,zPTS_MAX,z AES_PARAM,z VDI_PARAM,z GLOBAL_ARRAY,z CONTROL_ARRAY,z INTIN_ARRAY,z INTOUT_ARRAY,z PTSIN_ARRAY,z PTSOUT_ARRAY,z ADDRIN_ARRAY,z ADDROUT_ARRAY,z WORKOUT_ARRAY,zARRAY_2,zARRAY_3,zARRAY_4,zARRAY_5,zARRAY_6,zARRAY_8,zARRAY_10,zARRAY_16,zARRAY_37,zGRECT,zAES_PB,zVDI_PB,zCONTROL,zINTIN,zINTOUT,zPTSIN,zPTSOUT,zADDRIN,zADDROUT,zGLOBAL,zGEMVDI-HOLLOW-SOLID-PATTERN-HATCH- UDFILLSTYLE-DOTS-GRID-BRICKS-WEAVE-LDASHED-DOTTED-DASHDOT-DASHED- DASHDOTDOT-SQUARED-ARROWED-ROUNDED-NORMAL-BOLD-SHADED-SKEWED- UNDERLINED-OUTLINE-SHADOW- MD_REPLACE-MD_TRANS-MD_XOR-MD_ERASE- ALL_WHITE-S_AND_D- S_AND_NOTD-S_ONLY- NOTS_AND_D-D_ONLY-S_XOR_D-S_OR_D-NOT_SORD- NOT_SXORD-NOT_D- S_OR_NOTD-NOT_S- NOTS_OR_D- NOT_SANDD- ALL_BLACK-REQUEST-SAMPLE-MFDB-STRING80- STRING125-GEMERROR3 APPL_INIT3 APPL_READ3 APPL_WRITE4* APPL_FIND4W APPL_TPLAY4 APPL_TRECORD4 APPL_EXIT5 EVNT_KEYBD5* EVNT_BUTTON5C EVNT_MOUSE5 EVNT_MESAG6 EVNT_TIMER6! EVNT_MULTI6j EVNT_DCLICK7_MENU_BAR7 MENU_ICHECK7 MENU_IENABLE7 MENU_TNORMAL8 MENU_TEXT8o MENU_REGISTER8OBJC_ADD8 OBJC_DELETE9 OBJC_DRAW94 OBJC_FIND9s OBJC_OFFSET9 OBJC_ORDER9 OBJC_EDIT:% OBJC_CHANGE:FORM_DO: FORM_DIAL; FORM_ALERT;l FORM_ERROR< FORM_CENTER< GRAF_RUBBOX; GRAF_SLIDEBOX> GRAF_HANDLE> GRAF_MOUSE?^ GRAF_MKSTATE? SCRP_READ@ SCRP_WRITE@, FSEL_INPUT@B FSEL_EXINPUTAD WIND_CREATEA WIND_OPENB WIND_CLOSEB WIND_DELETEBWIND_GETBWIND_SETC WIND_FINDD WIND_UPDATEDc WIND_CALCDWIND_NEWE RSRC_LOADE RSRC_FREEE RSRC_GADDRF RSRC_SADDRF RSRC_OBFIXF SHEL_READG SHEL_WRITEG4SHEL_GETGSHEL_PUTG SHEL_FINDG SHEL_ENVRNH%MINHFMAXHYHIPTRHlLOPTRH}BITTESTH INTERSECTH EMPTYRECTIMAKEXYXYI(MAKEXYWHITV_OPNWKIfV_CLSWKIV_OPNVWKIV_CLSVWKJ)V_CLRWKJLV_UPDWKJ{VST_LOAD_FONTSJVST_UNLOAD_FONTSJVS_CLIPKV_PLINEKj V_PMARKERKV_GTEXTK V_FILLAREAL/ V_CELLARRAYLl V_CONTOURFILLLVR_RECFLLV_BARM8V_ARCM_ V_PIESLICEMV_CIRCLEMV_ELLARCNV_ELLPIEN@ V_ELLIPSENV_RBOXNV_RFBOXN V_JUSTIFIEDO VSWR_MODEOXVS_COLORO}VSL_TYPEO VSL_UDSTYO VSL_WIDTHP, VSL_COLORPTVSL_ENDSPwVSM_TYPEP VSM_HEIGHTP VSM_COLORP VST_HEIGHTQ VST_POINTQu VST_ROTATIONQVST_FONTQ VST_COLORR VST_EFFECTSR9 VST_ALIGNMENTR~ VSF_INTERIORR VSF_STYLES VSF_COLORS^ VSF_PERIMETERS VSF_UDPATS VRO_CPYFMS VRT_CPYFMTYVR_TRNFMT V_GET_PIXELT VSIN_MODET VRQ_LOCATORU VSM_LOCATORUP VRQ_VALUATORU VSM_VALUATORU VRQ_CHOICEU VSM_CHOICEU VRQ_STRINGV VSM_STRINGVDVSC_FORMVvVEX_TIMVVV_SHOW_CVV_HIDE_CW)VQ_MOUSEW;VEX_BUTVW]VEX_MOTVWVEX_CURVWVQ_KEY_SX VQ_EXTENDXTVQ_COLORXVQL_ATTRIBUTESXVQM_ATTRIBUTESXVQF_ATTRIBUTESXVQT_ATTRIBUTESY VQT_EXTENTY VQT_WIDTHYJVQT_NAMEYr VQ_CELLARRAYY VQIN_MODEY VQT_FONTINFOZ VQ_CHCELLSZP V_EXIT_CURZz V_ENTER_CURZV_CURUPZ V_CURDOWNZ V_CURRIGHTZ V_CURLEFTZ V_CURHOMEZV_EEOS[V_EEOL[% VS_CURADDRESS[6 V_CURTEXT[`V_RVON[wV_RVOFF[ VQ_CURADDRESS[ VQ_TABSTATUS[ V_HARDCOPY[V_DSPCUR[V_RMCUR[ V_FORM_ADV\V_OUTPUT_WINDOW\&V_CLEAR_DISP_LIST\L V_BIT_IMAGE\c VS_PALETTE\ VQP_FILMS\ VQP_STATE\ VSP_STATE]8VSP_SAVE]z VSP_MESSAGE] VQP_ERROR]V_META_EXTENTS] V_WRITE_META] VM_FILENAME^"ST_SHL^<ST_SHR^pREADV^WRITEV^PUT_@GET_ ASSIGNMENTS_ ASSIGNMENT_ STATEMENT` STATEMENTS`SET`-TEXT`LABELaCGOTOaNILaPOINTERaBOOLEANbTRUEbFALSEbRESERVED_WORDSbJASMb ASSEMBLERbINSTRUCTIONSETbCONSTcrTYPEcrVARcr PROCEDUREc PROCEDUREScFUNCTIONdG FUNCTIONSdGBYTEdSHORTINTdINTEGERdLONGINTdWORDdREALdSINGLEdDOUBLEdEXTENDEDdPROGRAMdUSESe UNITeDIMPLEMENTATIONe INTERFACEeBEGINf:ENDfeCASEfCHARg#ARRAYgdRECORDgSTRINGhLREPEAThUNTILh REPEAT_UNTILhWHILEhWHILE_DOhFORiFOR_DOiTOiDOWNTOiIFi]THENi]ELSEiDOiOFiEXTERNALiINLINEj PACKEDj6FORWARDk WITHkGDIVkMODkNOTkANDkORkXORkSHLkSHRkINk OPERATORSkOPERATORkSTPASCALl LONG_MAXINTl SCREEN_DEVICElPRINTER_DEVICEl MAX_C_STRINGlMAX_FNlMAX_PATHlALFAl SHORT_INTEGERl LONG_INTEGERlC_STRINGl STRING_PTRl FILE_NAMEl PATH_NAMEl SHORT_ROUNDl SHORT_TRUNCl LONG_ROUNDl LONG_TRUNClCTOPSTRlPTOCSTRlPWROFTENlCMD_ARGSl CMD_GETARGlOPTIONlFILENAMElKEYPRESSl IO_RESULTlPEEKlWPEEKlLPEEKlPOKElWPOKElLPOKElMOVE_BlMOVE_WlMOVE_LlCLOCKlCUR_ONlCUR_OFFl CUR_UP_SCROLLlCUR_DOWN_SCROLLlCUR_HOMEl CLEAR_HOMEl SAVE_CURSORlRESTORE_CURSORl SELECT_COLORlSELECT_BACKGROUNDlINV_ONlINV_OFFl DELETE_LINEl CLEAR_LINEl INSERT_LINEl START_OF_LINEl END_OF_LINEl END_OF_SCREENlSTART_OF_SCREENlWRAP_ONlWRAP_OFFlINSUPERlSCRLEN_BlSCRLEN_WlSCRLEN_LlERR_CODElSCREEN_BlSCREEN_IlSCREEN_Ll PTR_SCREENlPALETTEl RESOLUTIONl SCREEN_TYPEl GET_SCREENl PUT_SCREENl READ_SCREENl WRITE_SCREENlNO_PORTlROOTl NULL_INDEXlMAX_LENl MAX_DEPTHlMAX_TREEl NO_WINDOWl MAX_WTITLEl E_KEYBOARDlE_BUTTONlE_MOUSE1lE_MOUSE2l E_MESSAGElE_TIMERl REPLACE_MODEl TRANS_MODElXOR_MODElREV_TRANS_MODElPAT1lPAT2lPAT3lPAT4lPAT5lPAT6lPAT7lPAT8lPAT9lPAT10lPAT11lPAT12lPAT13lPAT14lPAT15lPAT16lPAT17lPAT18lPAT19lPAT20lPAT21lPAT22lPAT23lPAT24lHATCH1lHATCH2lHATCH3lHATCH4lHATCH5lHATCH6lHATCH7lHATCH8lHATCH9lHATCH10lHATCH11lHATCH12lLONGDASHl THICKENEDl LIGHTENEDlSLANTEDl SYSTEM_FONTl SMALL_FONTl G_PROGDEFlEXIT_BTNl RADIO_BTNlLAST_OBl TOUCH_EXITl HIDE_TREElG_NAMElG_CLOSElG_FULLlG_MOVElG_INFOlG_SIZEl G_UPARROWl G_DNARROWlG_VSLIDElG_LARROWlG_RARROWlG_HSLIDElG_ALLlL_WHITElL_BLACKlL_REDlL_GREENlL_BLUElL_CYANlL_YELLOWl L_MAGENTAl COLOR_REGl DRAW_MODESl LINE_TYPESl PAINT_TYPESl GEM_DEVICElINQ_TYPEl OPEN_VALSlEXT_VALSl MOUSE_TYPElM_ARROWl M_TEXT_CURSlM_BEEl M_POINT_HANDl M_FLAT_HANDl M_THIN_CROSSl M_THICK_CROSSl M_OUTLN_CROSSlTEXT_PTRlWORD16l MOUSE_FORMl WINDOW_TITLElMESSAGE_BUFFERl CTRL_PARMSl INT_IN_PARMSl INT_OUT_PARMSl PTS_IN_PARMSl PTS_OUT_PARMSl ADDR_IN_PARMSlADDR_OUT_PARMSlPOINTlSTR30lSTR255lTE_JUSTl TE_CENTERl TREE_RANGEl TREE_INDEXlOB_TYPEl TEXT_ED_INFOlTED_PTRl SPEC_INFOlOBJECTlTREElTREE_PTRlMENU_PTRl DIALOG_PTRl ICON_BLOCKl BIT_BLOCKlUSER_BLKlPARM_BLKl ADD_DITEMl ADD_MITEMl ADD_MTITLElAES_CALLl AES_VERSIONl BEGIN_MOUSEl BEGIN_UPDATEl BORDER_RECTlBRING_TO_FRONTl CENTER_DIALOGl CLEAR_SCREENl CLOSE_WINDOWl DELETE_DIALOGl DELETE_MENUl DELETE_WINDOWlDO_ALERTl DO_DIALOGlDRAGBOXl DRAW_MENUl DRAW_MODEl DRAW_STRINGlD_COLORl END_DIALOGl END_MOUSEl ERASE_MENUlEXIT_GEMl FIND_ALERTl FIND_DIALOGl FIND_MENUl FIND_RESOURCEl FIND_WINDOWl FIRST_RECTl FRAME_ARCl FRAME_OVALl FRAME_RECTlFRAME_ROUND_RECTl FREE_RESOURCEl FRONT_WINDOWl GET_DEDITl GET_EVENTlGET_EX_IN_FILEl GET_IN_FILEl GET_OUT_FILEl GET_WINDOWlGROWBOXl HIDE_MOUSElINIT_GEMl INIT_MOUSElJUSTIFIED_TEXTl LINE_COLORl LINE_ENDSTYLEl LINE_STYLElLINE_TOl LINE_WIDTHl LOAD_RESOURCEl MENU_CHECKl MENU_DISABLEl MENU_ENABLEl MENU_HILIGHTl MENU_NORMALlMOVEBOXlMOVE_TOl NEW_DIALOGlNEW_MENUl NEW_WINDOWl NEXT_RECTlOBJ_DRAWlOBJ_FINDl OBJ_FLAGSl OBJ_OFFSETl OBJ_REDRAWl OBJ_SETFLAGSl OBJ_SETSTATElOBJ_SIZEl OBJ_STATEl OPEN_WINDOWl PAINT_ARCl PAINT_COLORl PAINT_OUTLINEl PAINT_OVALl PAINT_RECTlPAINT_ROUND_RECTl PAINT_STYLElPLINElPLOTlRECT_INTERSECTl REDO_DIALOGl RUBBERBOXlSET_CLIPl SET_COLORl SET_DEDITl SET_DTEXTl SET_MFORMl SET_MOUSEl SET_WINDOWl SET_WINFOl SET_WNAMEl SET_WSIZEl SHOW_DIALOGl SHOW_MOUSEl SHRINKBOXl SYS_FONT_SIZElTEXT_ALIGNMENTl TEXT_COLORl TEXT_HEIGTHl TEXT_ROTATIONl TEXT_STYLElVDI_CALLl WORK_RECTlBIOSt XBIOSt INITMOUSt SSBRKt PHYSBASEt LOGBASEt GETREZt SETSCREENt FLOPRDt FLOPWRt FLOPFMTt MIDIWSt MFPINTt IORECt RSCONFt KEYTBLt X_RANDOMt PROTOBTt FLOPVERt SCRDMPt CURSCONFt XSETTIMEt XGETTIMEt BIOSKEYSt IKBDWSt JDISINTt JENABINTt GIACCESSt OFFGIBITt ONGIBITt XBTIMERt DOSOUNDt SETPRTt KBDVBASEt KBRATEt PRTBLKt VSYNCt SUPEXECt PUNTAESt GETMPBt BCONSTATt BCONINt CONOUTt RWABSt SETEXCt TICKCALt GETBPBt BCOSTATt MEDIACHt DRVMAPt KBSHIFTt DMAREADt DMAWRITEt NVMACCESSt BCONMAPt ESETSHIFTt EGETSHIFTt ESETBANKt ESETCOLORt ESETPALETTEt EGETPALETTEt ESETGRAYt ESETSMEARt COMPILEw@COMPILERwEDITxFEDITORxFILExGENERALydLINKERySEARCHyOPTIONSzDRUNzaDOSzREADONLYzHIDDENzSYSFILEzVOLUMEIDz DIRECTORYzARCHIVEzANYFILEzCOMSTRzPATHSTRzDIRSTRzNAMESTRzEXTSTRz SEARCHRECzDATETIMEzEINVFNzEFILNFzEPTHNFzENHNDLzEACCDNzEIHNDLzENSMEMzEIMBAzEDRIVEzENSAMEzENMFILzERANGEzEINTRNzEPLFMTzEGSBFzSYSTEM{PTRLEN{FPUMODE{ PBASEPAGE{ RBASEPAGE{P_LOWTPA{P_HITPA{DATA{BSS{P_DTA{P_PARENT{ P_RESRVD0{P_ENV{P_STDFH{ P_RESRVD1{P_CURDRV{ P_RESRVD2{P_CMDLIN{INPUT{OUTPUT{IORESVAR{APPFLAG{BASEPAGE{HEAPORG{DEVCHAIN{HIGHSTAK{LOWSTACK{EXITCODE{ERRORADD{STRAP5{STRAP102{LASTPC{SHFTSHFT{SYSTEM2|QTEXTREC|QFINPFLAG|QFOUTFLAG|QFHANDLE|QFBUFSIZE|QFBUFPOS|QFBUFEND|QFBUFPTR|Q FINOUTPROC|QFUSER|QFNAME|QFBUFFER|QFILEREC|QFPRIVATE|QABS|ADDR}&APPEND}OARCTAN}ASSIGN} BLOCKREAD~ BLOCKWRITE~CHDIR~CHRCLOSE&CLREOL>CLREOSmCLRSCRCONCATCOPYCOS#DECEDELAY{DELETEDELLINEDISKFREEDISKSIZE<DISPOSEmDOSERRORENVCOUNT&ENVSTRREOFEOLNERASEEXEC.EXITtEXITPROCEXPFEXPAND>FILEPOSFILESIZEFILLCHAR FINDFIRSTSFINDNEXTFREEMEM-FSPLITuGETDATEGETDIR8GETDRIVEwGETENVGETFATTRGETFTIME5GETMEMGETTIME GETVERIFY?GOTOXYHALTHIHIWORDINC INCLUDECINSERTqINSLINEINTIORESULT KEYPRESSED;LENGTHcLNLOLOWORDMAXAVAILMEMAVAILMKDIRMOVE6NEWODDOMITORD9ORD4{PACKTIMEPAGE+ PARAMCOUNT[PARAMSTRPIPOS PREDdPTRRANDOM RANDOMIZERANDSEEDqREADREADKEY READLN>RENAME{RESETREWRITERMDIRROUND RUNFROMMEMORYSEEKSEEKEOFSEEKEOLN^SETDATESETDRIVESETFATTR SETFTIMEE SETTEXTBUFSETTIME$ SETVERIFYSINSIZEOFSPTRISQR_SQRTSTRSUCCSUPERSWAPF SWAPVECTORS`SWAPWORD TOSVERSIONTRUNC UNPACKTIMEUPCASE:VALf VALIDREALWHEREXWHEREYWRITEWRITELNrPRINTERLST BIOSERRORSE_OKERROREDRVNREUNCMDE_CRCEBADRGE_SEEKEMEDIAESECNFEPAPEREWRITEFEREADFEWRPROE_CHNGEUNDEVEBADSFOTHER RUNTIMEERRORS3 RUNTIMEERROR3COMPILERERRORS DIRECTIVEO DIRECTIVESO r              MAXON Pascal 1.5 On-line help Units:GemDecl, GemAES, GemVDI, Dos, Graph, Printer, Bios, STPascal, System, System2, Other:Editor, Directives, Reserved_Words CompilerErrors, RuntimeErrors, BiosErrors, DosError     # + 5  # 1Procedure Arc(X,Y : Integer; StAngle, EndAngle, Radius : Word); Draws a circular arc. (X,Y) specifies the center point, StAngle the start angle, EndAngle the end angle and Radius the radius of the arc. The arc is drawn using the current aspect ratio settings. The center point, the starting point and the ending point of the arc will be returned by a call to GetArcCoords. See also: SetAspectRatio, Sector, Circle, PieSlice, Rectangle, DrawPoly, Ellipse, Bar, GetArcCoords, Graph Program Arc_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Arc(GetMaxX DIV 2,GetMaxY DIV 2,30,330,45); C := ReadKey; CloseGraph; End.  + 8   + 0 :   Procedure Bar(x1, y1, x2, y2 : Integer); Fills a bar in the current fill color and style. The bar is filled, starting in the upper-left corner specified by (x1,y1), ending in the lower-right corner specified by (x2,y2). The bar is not outlined. To do that, call Rectangle or Bar3D. See also: Bar3D, SetFillStyle, Rectangle, Arc, PieSlice, Sector, DrawPoly, Ellipse, Graph Program Bar_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Patt : Word; Begin Driver := DETECT; InitGraph(Driver,Mode,''); For Patt := EmptyFill To CloseDotFill Do Begin SetFillStyle(Patt,Random(GetMaxColor+1)); Bar(Patt*10,Patt*10,GetMaxX-(Patt*10),GetMaxY-(Patt*10)); End; C := ReadKey; CloseGraph; End. #     * 2  Procedure Bar3D(x1,y1,x2,y2 : Integer; Depth : Word; Top : Boolean); Draws and fills a 3-dimensional bar. The Depth parameter specifies the depth of the bar, Top specifies whether or not the top of the bar is to be drawn. The bar is drawn in the current line color, and filled using the current fill pattern and fill color. See also: Bar, Rectangle, Arc, PieSlice, Sector, DrawPoly, Ellipse, Graph Program Bar3D_Demo; Uses Graph; Var Driver,Mode,X,W : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); W := GetMaxX DIV 10; For X := 1 to 7 Do Begin SetFillStyle(Random(CloseDotFill+1),Random(GetMaxColor)+1); Bar3D(0+(W*X),Random(GetMaxY),W-15+(W*X),GetMaxY,20,TopOn); End; C := ReadKey; CloseGraph; End.     ( 2    #Procedure Circle(X,Y : Integer; Radius : Word); Draws a circle. (X,Y) specifies the center point and Radius the radius of the circle. The circle is drawn in the current color, using the current aspect ratio settings. See also: SetAspectRatio, Arc, Sector, PieSlice, Rectangle, DrawPoly, Ellipse, Bar, Graph Program Circle_Demo; Uses Graph; Var Driver,Mode,X : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); For X := 0 to 100 Do Begin SetColor(Random(GetMaxColor+1)); Circle(GetMaxX DIV 2, GetMaxY DIV 2, X); End; SetColor(Black); For X := 100 Downto 0 Do Circle(GetMaxX DIV 2, GetMaxY DIV 2, X); C := ReadKey; CloseGraph; End. gw Procedure ClearDevice; Clears the entire screen and moves the current pointer to point (0,0). See also: ClearViewPort, Graph Program ClearDevice_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat Line(0,0,Random(GetMaxX),Random(GetMaxY)); Until (Random(999) = 1); ClearDevice; CloseGraph; End. O  %6Procedure ClearViewPort; Clears the viewport and moves the current pointer to point (0,0). The viewport is filled in the current background color, with the fill pattern set to EmptyFill. See also: ClearDevice, SetViewPort, GetViewSettings, Graph Program ClearViewPort_Demo; Uses Graph; Var Driver,Mode, RanX,RanY: Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); FloodFill(1,1,1); Repeat RanX := Random(GetMaxX); RanY := Random(GetMaxY); SetViewPort(RanX,RanY,RanX+10,RanY+10,ClipOn); ClearViewport; Until KeyPressed; C := ReadKey; CloseGraph; End. -   Procedure CloseGraph; De-initializes and shuts down the Graph unit. CloseGraph should always be called at the end of your programs if a successful call has previously been made to InitGraph. CloseGraph does the following: Restores the original screen mode, if it has been changed by a call to InitGraph or SetGraphMode. If InitGraph was able to allocate space for an extra screen page, this space is de-allocated. Restores the contents of the palette, as it was on entry to InitGraph. See also: InitGraph, Graph Program CloseGraph_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); { Make use of the Graph unit routines. } CloseGraph; End. x $   #Procedure DetectGraph(var GraphDriver, GraphMode : Integer); Checks the hardware to find a legal graphics driver and mode. If DetectGraph fails to detect a graphics adapter, which is highly unlikely, the GraphDriver and GraphMode parameters will be set to the value -2 (GrNotDetected). Otherwise GraphDriver and GraphMode will be set to the detected driver and mode. Note: DetectGraph is called by the InitGraph procedure if InitGraph receives a driver value equaling DETECT. See also: InitGraph, GraphResult, Graph Program DetectGraph_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Write('You can call InitGraph with: '); DetectGraph(Driver,Mode); Case Driver Of StColor : Begin Write('StColor, '); Case Mode Of StLow: Write('StLow'); StMedium : Write('StMedium'); End; End; StMono: Write('StMono, StHigh') Else Write('UNKNOWN?'); End; WriteLn('.'); End. K   #(0:  !Procedure DrawPoly(NumPoints : Word; var PolyPoints); Draws a polygon. PolyPoints contains the polygon coordinates. NumPoints specifies the number of coordinates contained in PolyPoints. Each coordinate in PolyPoints consists of an X and a Y value, both of type integer. Note: In order to draw a closed polygon, the last coordinate in PolyPoints must be the same as the first one. See also: FillPoly, SetWriteMode, Arc, Circle, PieSlice, Rectangle, Sector, Ellipse, Bar, Graph Program DrawPoly_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Poly : Array[1..4] Of PointType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Poly[1].X := GetMaxX DIV 2;{ Top middle point of triangle } Poly[1].Y := GetMaxY DIV 10; Poly[2].X := GetMaxX DIV 10;{ Bottom left point } Poly[2].Y := GetMaxY-Poly[1].Y; Poly[3].X := GetMaxX-Poly[2].X; { Bottom right point } Poly[3].Y := Poly[2].Y; Poly[4]:= Poly[1];{ Connect to top point } DrawPoly(4,Poly); C := ReadKey; CloseGraph; End. 4    % / :  (Procedure Ellipse(X, Y: Integer; StAngle, EndAngle, XRad, YRad: Word); Draws an elliptical arc. (X,Y) specifies the center point, StAngle the start angle, EndAngle the end angle, XRad the x-radius and YRad the y-radius of the arc. The arc is drawn in the current color. The center point, the starting point and the ending point of the arc will be returned by a call to GetArcCoords. See also: FillEllipse, Arc, Circle, PieSlice, Rectangle, Sector, DrawPoly, Bar, GetArcCoords, Graph Program Ellipse_Demo; Uses Graph; Var Rad, Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Rad := 0; Repeat Ellipse(GetMaxX DIV 2,GetMaxY DIV 2,0,360,300-Rad,Rad); Inc(Rad,10); Until (Rad = 300); C := ReadKey; CloseGraph; End. o  ) 2 7    ( 2 7Procedure FillEllipse(X, Y: Integer; XRadius, YRadius: Word); Draws and fills an ellipse. (X,Y) specifies the center point, XRadius the x-radius and YRadius the y-radius of the ellipse. The ellipse is drawn using the current color, and filled using the current fill pattern and fill color. See also: SetFillStyle, SetFillPattern, Ellipse, Arc, Circle, PieSlice, Rectangle, Sector, DrawPoly, Bar, Graph Program FillEllipse_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); FillEllipse(GetMaxX DIV 2,GetMaxY DIV 2,50,100); C := ReadKey; CloseGraph; End.    #(0:  !Procedure FillPoly(NumPoints : Word; var PolyPoints); Draws and fills a polygon. PolyPoints contains the polygon coordinates. NumPoints specifies the number of coordinates contained in PolyPoints. Each coordinate in PolyPoints consists of an X and a Y value, both of type Integer. The polygon is drawn in the current color, and filled using the current fill settings. See also: DrawPoly, SetFillStyle, Arc, Circle, PieSlice, Rectangle, Sector, Ellipse, Bar, Graph Program FillPoly_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Poly : Array[1..3] Of PointType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetFillStyle(XHatchFill,GetMaxColor); Poly[1].X := GetMaxX DIV 2;{ Top middle point of triangle } Poly[1].Y := GetMaxY DIV 10; Poly[2].X := GetMaxX DIV 10;{ Bottom left point } Poly[2].Y := GetMaxY-Poly[1].Y; Poly[3].X := GetMaxX-Poly[2].X; { Bottom right point } Poly[3].Y := Poly[2].Y; FillPoly(3,Poly); C := ReadKey; CloseGraph; End.   " ' .   )  Procedure FloodFill(X, Y : Integer; Border : Word); Fills an area surrounded by a specified color. (X,Y) specifies the point that is first filled. Border specifies the color that surrounds the area to fill. The area is filled in the current fill color, using the current fill pattern. See also: FillEllipse, FillPoly, Bar, Bar3D, PieSlice, SetFillPattern, SetFillStyle, GetFillPattern, GetFillSettings, Graph Program FloodFill_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetColor(Blue); Rectangle(10,10,100,100);{ Make BLUE rectangle } SetFillStyle(SolidFill,Green); FloodFill(11,11,Blue);{ Flood until BLUE is found } C := ReadKey; CloseGraph; End. ?; !+Procedure GetArcCoords(var ArcCoords : ArcCoordsType); Returns information about the last call to Arc or Ellipse. The ArcCoordsType record is declared in the Graph unit as: Type ArcCoordsType= Record X,Y : Integer; XStart: Integer; YStart: Integer; XEnd: Integer; YEnd: Integer; End; (X,Y) is the center point, (XStart,YStart) is the starting point and (XEnd,YEnd) is the ending point of the last drawn arc or ellipse. See also: Arc, Ellipse, Sector, PieSlice, Graph Program GetArcCoords_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; ArcInfo: ArcCoordsType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Arc(GetMaxX DIV 2,GetMaxY DIV 2,30,330,45); GetArcCoords(ArcInfo); With ArcInfo Do Begin Line(X,Y,XStart,YStart); Line(X,Y,XEnd,YEnd); End; C := ReadKey; CloseGraph; End. y"-  (2Procedure GetAspectRatio(var Xasp, Yasp : Word); Returns the X and Y value used to calculate the aspect ratio. The aspect ratio is used by Arc, Circle and PieSlice to ensure that the circular figures will appear on the screen as being round and not egg-shaped. These are the default aspect values for the 3 graphic modes: ModeXaspYasp ---------------------------- StLow878810000 StMedium 439410000 StHigh967210000 See also: SetAspectRatio, Arc, Circle, PieSlice, Graph Program GetAspectRatio_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Xasp,Yasp: Word; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetTextJustify(CenterText,CenterText); OutTextXY(100,100,'Circle'); Circle(100,100,45); GetAspectRatio(Xasp,Yasp); Dec(Yasp,5000); SetAspectRatio(Xasp,Yasp); OutTextXY(200,100,'Egg'); Circle(200,100,45); C := ReadKey; CloseGraph; End. 1 !Function GetBkColor : Word; Returns the number of the current background color. The range of the returned value depends on the current graphics driver and mode: DriverModeColor range ------------------------------ StColorStLow0..15 StColorStMedium 0..3 StMonoStHigh0..1 See also: GetBkColor, GetColor, Graph Program GetBkColor_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText('Current background color is '+Int2Str(GetBkColor)); C := ReadKey; CloseGraph; End. Fc  !Function GetColor : Word; Returns the current foreground color. See also: SetColor, GetBkColor, Graph Program GetColor_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText('Current color is: '+Int2Str(GetColor)); C := ReadKey; CloseGraph; End.   & 2 AProcedure GetDefaultPalette(var Palette :PaletteType); Returns the Graph unit default palette. The PaletteType record is declared in the Graph unit as: Type PaletteType= Record Size: Integer; Colors: Array[0..15] Of ShortInt; End; Upon return from GetDefaultPalette the Palette parameter will contain the palette color numbers, as they were when the Graph unit was initialized. See also: GetPalette, SetAllPalette, SetPalette, SetRGBPalette, Graph Program GetDefaultPalette_Demo; Uses Graph; Var Driver,Mode,X : Integer; C: Char; PalData: PaletteType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); { Draw lines in random colors } For X := 1 to 200 Do Begin SetColor(Random(GetMaxColor+1)); Line(0,0,Random(GetMaxX),Random(GetMaxY)); End; { Change the palette colors } Repeat SetPalette(Random(GetMaxColor)+1,Random(GetMaxColor)+1); Until KeyPressed; C := ReadKey; GetDefaultPalette(PalData);{ Get original palette } SetAllPalette(PalData);{ Restore palette } C := ReadKey; CloseGraph; End. Gn  $ 2 Function GetDriverName : string; Returns the name of the active graphics driver. When working with the StColor driver the returned string will be "STColor". When working with the StMono driver, the returned string will be "STMono". See also: GetModeName, GetMaxMode, GetGraphMode, GetModeRange, SetGraphMode, Graph Program GetDriverName_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetTextJustify(CenterText,CenterText); OutTextXY(GetMaxX DIV 2,GetMaxY DIV 2,GetDriverName); C := ReadKey; CloseGraph; End.    , :  " ' . 8Procedure GetFillPattern(var FillPattern : FillPatternType); Returns the current user-defined fill pattern. The FillPatternType array is declared in the Graph unit as: Type FillPatternType = Packed Array[1..8] Of Byte; See also: GetFillSettings, GetFillPattern, SetFillStyle, FloodFill, FillEllipse, FillPoly, Bar, Bar3D, PieSlice, Graph Program GetFillPattern_Demo; Uses Graph; Var Driver,Mode,X : Integer; C: Char; PatternData: FillPatternType; Procedure WriteBinaryByte( Byt : Byte ); Var Bit : Byte; Begin For Bit := 0 to 7 Do Begin If (Byt AND 1 > 0) then OutText('1') Else OutText('0'); Byt := Byt SHR 1; End; End; Begin Driver := DETECT; InitGraph(Driver,Mode,''); GetFillPattern(PatternData); OutText('User-defined fill pattern is: '); For X := 1 to 8 Do Begin MoveTo(0,(X+2)*TextHeight('1')); WriteBinaryByte(PatternData[x]); End; C := ReadKey; CloseGraph; End. `   )9  "'.8Procedure GetFillSettings(var FillInfo : FillSettingsType); Returns the current fill settings. The FillSettingsType record is declared in the Graph unit as: Type FillSettingsType= Record Pattern: Word; Color: Word; End; Upon return from GetFillSettings, FillInfo will contain the currently active fill pattern and fill color. See also: GetFillPattern, SetFillStyle, SetFillPattern, FloodFill, FillEllipse, FillPoly, Bar, Bar3D, PieSlice, Graph Program GetFillSettings_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; FillInfo: FillSettingsType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); GetFillSettings(FillInfo); With FillInfo Do Begin OutTextXY(0,0,'Current fill pattern is: '+Int2Str(Pattern)); OutTextXY(0,TextHeight('M'), 'Current fill color is: '+Int2Str(Color)); End; C := ReadKey; CloseGraph; End. z  & 3 Function GetGraphMode : Integer; Returns the current graphics mode. When working with the StColor driver, the returned result will be either StLow or StMedium. When working with the StMono driver the result will always be StHigh. See also: GetMaxMode, GetDriverName, GetModeName, GetModeRange, SetGraphMode, Graph Program GetGraphMode_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText('Current mode is: '); Case GetGraphMode Of StLow : OutText('StLow'); StMedium : OutText('StMedium'); StHigh: OutText('StHigh'); End; C := ReadKey; CloseGraph; End.   %   Procedure GetImage(x1, y1, x2, y2 : Integer; var BitMap); Stores a specified screen area in a buffer. (x1,y1),(x2,y2) defines the rectangular area to store. BitMap is the buffer to use for the storage. If BitMap is too small to hold the defined area, other data or code will be overwritten. Therefore you should ALWAYS use the ImageSize function to determine the required size of BitMap. See also: ImageSize, PutImage, Graph Program Image_Demo; Uses Graph; Const DelayTime= 10; Var Driver,Mode : Integer; C: Char; Storage: Pointer; Size : LongInt; Procedure DrawImage; Var ArcInfo : ArcCoordsType; Begin Arc(30,30,30,330,30); GetArcCoords(ArcInfo); With ArcInfo Do Begin Line(X,Y,XStart,YStart); Line(X,Y,XEnd,YEnd); End; End; { DrawImage } Procedure MoveImage; Var X : Integer; Begin ClearDevice; X := 60; Repeat PutImage(X,GetMaxY DIV 2,Storage^, CopyPut); Delay(DelayTime); PutImage(X,GetMaxY DIV 2,Storage^, XorPut); If (X >= GetMaxX - 60) then X := 60; Inc(X,10); Until KeyPressed; End; { MoveImage } Begin Driver := DETECT; InitGraph(Driver,Mode,''); DrawImage; Size := ImageSize(0,0,60,60); If (MaxAvail > Size) then GetMem(Storage,Size) Else Halt; GetImage(0,0,60,60,Storage^); MoveImage; FreeMem(Storage,Size); CloseGraph; End. C   '-5>Procedure GetLineSettings(var LineInfo : LineSettingsType); Returns the current style, pattern and width of lines. The LineSettingsType record is declared in the Graph unit as: Type LineSettingsType= Record LineStyle: Word; Pattern: Word; ThickNess: Word; End; LineStyle contains the number of the current line style. It will always be in the range SolidLn..UserBitLn. Pattern specifies the user-defined line pattern. ThickNess specifies the thickness of lines. If will always be either NormWidth or ThickWidth. See also: SetLineStyle, SetWriteMode, Line, LineTo, LineRel, Graph Program GetLineSettings_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; LineInfo: LineSettingsType; Th: Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Th := TextHeight('M'); GetLineSettings(LineInfo); With LineInfo Do Begin OutTextXY(0,Th*1,'Current style is: '+Int2Str(LineStyle)); OutTextXY(0,Th*2,'Current pattern is: '+Int2Str(Pattern)); OutTextXY(0,Th*3,'Current thickness is: '+Int2Str(ThickNess)); End; C := ReadKey; CloseGraph; End.    !Function GetMaxColor : Word; Returns the highest legal color number. The range of the returned value depends on the current graphics driver and mode: DriverModeGetMaxColor -------------------------------- StColorStLow0..15 StColorStMedium0..3 StMonoStHigh0..1 See also: SetColor, SetBkColor, Graph Program GetMaxColor_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText('Maximum color is: '+Int2Str(GetMaxColor)); C := ReadKey; CloseGraph; End. &   ( 5  Function GetMaxMode : Integer; Returns the highest mode number for the currently active driver. GetMaxMode can be used together with SetGraphMode, to determine the highest possible graphics mode for the currently active driver. The result returned by GetMaxMode depends on the current driver: DriverGetMaxMode -------------------- StColorStMedium StMono StHigh See also: GetGraphMode, GetDriverName, GetModeName, GetModeRange, SetGraphMode, Graph Program GetMaxMode_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText('Maximum mode for '+GetDriverName+' is '+Int2Str(GetMaxMode)); C := ReadKey; CloseGraph; End. U  Function GetMaxX : Integer; Returns the highest possible X coordinate. The result returned by GetMaxX depends on the current graphics driver and mode: DriverModeGetMaxX --------------------------- StColorStLow319 StColorStMedium639 StMonoStHigh 639 The result can be different from the above listed, if a special monitor is being used (Big-Screen monitor). See also: GetMaxY, GetX, GetY, Graph Program GetMaxX_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Line(0,0,GetMaxX,0); C := ReadKey; CloseGraph; End. U  Function GetMaxY : Integer; Returns the highest possible Y coordinate. The result returned by GetMaxY depends on the current graphics driver and mode: DriverModeGetMaxY --------------------------- StColorStLow199 StColorStMedium199 StMonoStHigh 399 The result can be different from the above listed, if a special monitor is being used (Big-Screen monitor). See also: GetMaxX, GetX, GetY, Graph Program GetMaxY_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Line(0,0,0,GetMaxY); C := ReadKey; CloseGraph; End.   & 4  Function GetModeName(ModeNumber : Integer) : string; Returns the name of the active graphics mode. GetModeName will return a string consisting of: The horizontal resolution The vertical resolution The number of colors If the current driver is StColor, and the mode is StLow, the returned string will be: "ATARI 320x200, 16 color" See also: GetDriverName, GetMaxMode, GetGraphMode, GetModeRange, SetGraphMode, Graph Program GetModeName_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText('Current mode is: '+GetModeName(Mode)); C := ReadKey; CloseGraph; End. 4  % 4  Procedure GetModeRange(GraphDriver:Integer;var LoMode,HiMode:Integer); Returns the mode limits for a graphics driver. GetModeRange returns the minimum and the maximum graphics mode for a specified graphics driver. If GraphDriver contains an unknown driver, LoMode and HiMode will both be set to the value -1 (GrNoInitGraph). Otherwise LoMode and HiMode will be set to: DriverLoMode HiMode -------------------------------------- StColor StLowStMedium StMonoStHigh StHigh See also: GetMaxMode, GetGraphMode, GetDriverName, GetModeName, SetGraphMode, Graph Program GetModeRange_Demo; Uses Graph; Var Min,Max, Driver,Mode : Integer; C: Char; Begin DetectGraph(Driver,Mode); WriteLn('Driver is: ',Driver); GetModeRange(Driver,Min,Max); WriteLn('Range is : ',Min,'..',Max); C := ReadKey; End.   - 9  Procedure GetPalette(var Palette : PaletteType); Returns the current palette, and it's size. The PaletteType record is declared in the Graph unit as: Type PaletteType= Record Size: Integer; Colors: Array[0..15] Of ShortInt; End; Upon return from GetPalette, the Size field equals the number of colors in the current palette and Colors contains the actual colors. See also: GetDefaultPalette, SetAllPalette, SetPalette, SetRGBPalette, Graph Program GetPalette_Demo; Uses Graph; Var Driver,Mode : Integer; Palette: PaletteType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); GetPalette(Palette); CloseGraph; End. G  & 5Function GetPaletteSize : Integer; Returns the number of entries in the palette. The range of the returned result depends on the current graphics driver and mode: DriverModeGetPaletteSize ---------------------------------- StColorStLow16 StColorStMedium4 StMonoStHigh2 See also: SetPalette, SetAllPalette, SetRGBPalette, Graph Program GetPaletteSize_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); OutText(Int2Str(GetPaletteSize)+' colors in the palette.'); C := ReadKey; CloseGraph; End. oo Function GetPixel(X,Y : Integer) : Word; Returns the color of the specified pixel. See also: PutPixel, Graph   # )Procedure GetTextSettings(var TextInfo : TextSettingsType); Returns the current text settings. The TextSettingsType record is declared in the Graph unit as: Type TextSettingsType= Record Font: Word; Direction: Word; CharSize: Word; Horiz: Word; Vert: Word; End; Upon return from GetTextSettings, TextInfo will contain the current values as set by SetTextStyle and SetTextJustify: Font is the text appearance (DefaultFont..GothicFont). Direction is the text direction (HorizDir,VertDir). CharSize is the size of text. Horiz is the horizontal justification (LeftText..RightText). Vert is the vertical justification (BottomText..TopText). See also: SetTextStyle, SetTextJustify, Graph Program GetTextSettings_Demo; Uses Graph,UtilUnit; Var Driver,Mode,Th : Integer; C: Char; TextInfo: TextSettingsType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Th := TextHeight('M'); GetTextSettings(TextInfo); With TextInfo Do Begin OutTextXY(0,Th*1,'Current font: '+Int2Str(Font)); OutTextXY(0,Th*2,'Current direction: '+Int2Str(Direction)); OutTextXY(0,Th*3,'Current charsize : '+Int2Str(CharSize)); OutTextXY(0,Th*4,'Horizontal just. : '+Int2Str(Horiz)); OutTextXY(0,Th*5,'Vertical just.: '+Int2Str(Vert)); End; C := ReadKey; CloseGraph; End. n  'Procedure GetViewSettings(var ViewPort : ViewPortType); Returns information about the viewport. The ViewPortType record is declared in the Graph unit as: Type ViewPortType= Record X1,Y1,X2,Y2 : Integer; Clip: Boolean; End; Upon return from GetViewSettings, ViewPort will contain the current viewport settings: X1,Y1 specifies the upper-left corner of the viewport. X2,Y2 specifies the lower-right corner of the viewport. Clip specifies the clipping state of the viewport. See also: SetViewPort, ClearViewPort, Graph Program GetViewSettings_Demo; Uses Graph,UtilUnit; Var Th, Driver,Mode : Integer; C: Char; ViewPortInfo: ViewPortType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Th := TextHeight('M'); GetViewSettings(ViewPortInfo); With ViewPortInfo Do Begin OutTextXY(0,Th*0,'Minimum X coordinate : '+Int2Str(X1)); OutTextXY(0,Th*1,'Minimum Y coordinate : '+Int2Str(Y1)); OutTextXY(0,Th*2,'Maximum X coordinate : '+Int2Str(X2)); OutTextXY(0,Th*3,'Maximum Y coordinate : '+Int2Str(Y2)); MoveTo(0,Th*4); OutText('Clipping is currently: '); Case Clip Of True: OutText('ON'); False : OutText('OFF'); End; End; C := ReadKey; CloseGraph; End.  "*3  Function GetX : Integer; Returns the X part of the current pointer. The current pointer, also referred to as the CP, specifies the current position of the graphic cursor inside the current viewport. See also: GetY, MoveTo, MoveRel, LineTo, LineRel, GetMaxX, GetMaxY, Graph Program GetX_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Procedure CurrentPos; Var Gx,Gy : String; Begin Str(GetX,Gx); Str(GetY,Gy); OutText('This is position '+Gx+','+Gy); End; Begin Driver := DETECT; InitGraph(Driver,Mode,''); MoveTo(10,10); CurrentPos; MoveTo(100,100); CurrentPos; MoveTo(200,200); CurrentPos; C := ReadKey; CloseGraph; End.  "*3  Function GetY : Integer; Returns the Y part of the current pointer. The current pointer, also referred to as the CP, specifies the current position of the graphic cursor inside the current viewport. See also: GetX, MoveTo, MoveRel, LineTo, LineRel, GetMaxX, GetMaxY, Graph Program GetY_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Procedure CurrentPos; Var Gx,Gy : String; Begin Str(GetX,Gx); Str(GetY,Gy); OutText('This is position '+Gx+','+Gy); End; Begin Driver := DETECT; InitGraph(Driver,Mode,''); MoveTo(10,10); CurrentPos; MoveTo(100,100); CurrentPos; MoveTo(200,200); CurrentPos; C := ReadKey; CloseGraph; End. T Procedure GraphDefaults; Resets the Graph unit to its default values. GraphDefaults does the following: Sets the viewport to the entire screen, with clipping on. Restores the Graph unit default palette, and sets the foreground color to 1. Sets the line style to be solid and the line width to be 1 pixel. Sets the fill pattern to be solid, and the fill color to be the highest possible color. Sets the text font to be the default font, the direction to be horizontal and the size to be 1. See also: InitGraph, Graph q- " "Function GraphErrorMsg(ErrorCode : Integer) : string; Returns an error message corresponding to a Graph unit error code. GraphErrorMsg can be used together with the GraphResult function to obtain a string with an explanation to one of the Graph unit error codes. Graph contains 15 predefined error messages: { # 0} 'No error' { #-1} 'Graph not initialized. Use InitGraph.' { #-2} 'Graphics hardware not detected.' { #-3} 'Device driver not found.' { #-4} 'Invalid device driver.' { #-5} 'Not enough memory to load driver.' { #-6} 'Out of memory in scan fill.' { #-7} 'Out of memory in flood fill.' { #-8} 'Font file not found.' { #-9} 'Not enough memory to load font.' { #-10 } 'Invalid graphics mode for selected driver.' { #-11 } 'Graphics error.' { #-12 } 'Graphics I/O error.' { #-13 } 'Invalid font file.' { #-14 } 'Invalid font number.' If the ErrorCode parameter lies outside the range -14..0, the returned string will contain: 'Graph error #xx' Otherwise the returned string will contain one of the above listed error messages. See also: GraphResult, Graph Program GraphErrorMsg_Demo; Uses Graph; Var Driver,Mode,X : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); For X := GrOK Downto GrInvalidFontNum Do Begin OutText(GraphErrorMsg(x)); MoveTo(0,Succ(Abs(X))*TextHeight('M')); End; C := ReadKey; CloseGraph; End.  7  .  .  .  .   !# #Function GraphResult : Integer; Returns the error status of the last executed Graph command. The following error codes are declared in the Graph unit: Const GrOK=0; { No error } GrNoInitGraph= -1; { Graph not initialized. Use InitGraph } GrNotDetected= -2; { Graphics hardware not detected } GrFileNotFound = -3; { Device driver not found } GrInvalidDriver = -4; { Invalid device driver } GrNoLoadMem= -5; { Not enough memory to load driver } GrNoScanMem= -6; { Out of memory in scan fill } GrNoFloodMem= -7; { Out of memory in flood fill } GrFontNotFound = -8; { Font file not found } GrNoFontMem= -9; { Not enough memory to load font } GrInvalidMode= -10; { Invalid graphics mode for selected driver } GrError= -11; { Graphics error } GrIOError= -12; { Graphics I/O error } GrInvalidFont= -13; { Invalid font file } GrInvalidFontNum= -14; { Invalid font number } The following procedures updates GraphResult: DetectGraphDrawPolyFillPoly SetActivePageSetAllPaletteSetFillPattern SetFillStyleSetGraphModeSetLineStyle SetPalette SetTextJustifySetTextStyle SetViewPortSetVisualPage It should be noted, that GraphResult is cleared every time it is called, just like the IOresult function. See also: GraphErrorMsg, Graph Program GraphResult_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetActivePage(22222); If GraphResult = GrOK then OutText('Impossible!') Else OutText('Only page 0 and 1 available.'); C := ReadKey; CloseGraph; End. ff   Function ImageSize(x1, y1, x2, y2 : Integer) : LongInt; Returns the size, i bytes, of a specified screen area. ImageSize calculates the storage needed to save a rectangular area of the screen, using the GetImage procedure. The point (x1,y1) is the upper-left, and (x2,y2) is the lower-right corner of the screen area. See also: GetImage, PutImage, Graph , , ,$ ,2 - - -' -6Procedure InitGraph(var GraphDriver, GraphMode: Integer; Path: string); Initializes and starts up the Graph unit. GraphDriver specifies the graphics driver to use. The legal drivers are declared in the Graph unit as: Const DETECT=0; StColor=11; { If you have a color monitor } StMono=12; { If you have a monochrome monitor } GraphMode specifies the mode of the selected driver. The legal modes are declared in the Graph unit as: Const StLow=0;{ 320x200 in 16 colors} StMedium =1;{ 640x200 in 4 colors} StHigh=2;{ 640x400 in monochrome} Path is ignored by InitGraph. There are two different ways of initializing the Graph unit: Auto detection: When using auto detection, InitGraph will automatically find out what driver and mode to use. Auto detection is activated when the GraphDriver parameter equals DETECT. User selection: User selection is activated if GraphDriver does not equal DETECT. When user selection has been requested, it is imperative that a legal driver and graphics mode are passed to InitGraph through the GraphDriver and GraphMode parameters. If InitGraph finds that the chosen driver does not match your monitor type, or that the chosen driver and mode cannot be used together, the program will halt, and an error message will be displayed. See also: DetectGraph, CloseGraph, GetModeRange, SetGraphMode, GraphResult, GraphErrorMsg, GraphDefaults, Graph Program InitGraph_Demo; Uses Graph,UtilUnit; Var Driver,Mode,Th : Integer; C: Char; Begin { Auto detection. } Driver := DETECT; InitGraph(Driver,Mode,''); Th := TextHeight('M'); OutTextXY(0,0,'The detected driver is: '+Int2Str(Driver)); OutTextXY(0,Th,'The detected mode is : '+Int2Str(Mode)); C := ReadKey; CloseGraph; { User selection. } Driver := StColor; Mode:= StLow; InitGraph(Driver,Mode,''); OutTextXY(0,0,'The selected driver is: '+Int2Str(Driver)); OutTextXY(0,Th,'The selected mode is : '+Int2Str(Mode)); C := ReadKey; CloseGraph; End. ,   *  Procedure Line(x1, y1, x2, y2 : Integer); Draws a line from point (x1,y1) to point (x2,y2). The line is drawn in the current color and line pattern, using the write mode defined by the SetWriteMode procedure. See also: LineTo, LineRel, SetWriteMode, SetLineStyle, GetLineSettings, Graph Program Line_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat SetColor(Random(GetMaxColor)+1); Line(0,0,Random(GetMaxX),Random(GetMaxY)); Until KeyPressed; CloseGraph; End. Jg   ' 5 Procedure LineRel(Dx, Dy : Integer); Draws a line from the CP to a point relative to it's current location. The line is drawn in the current color and line pattern, using the write mode defined by the SetWriteMode procedure. See also: LineTo, Line, SetWriteMode, SetLineStyle, GetLineSettings, Graph Program LineRel_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); MoveTo(GetMaxX DIV 2,GetMaxY DIV 2); Randomize; Repeat SetColor(Random(GetMaxColor)+1); LineRel(Random(3)-1,Random(3)-1); Until KeyPressed; CloseGraph; End. :   ( 6 Procedure LineTo(X,Y : Integer); Draws a line from the current pointer (CP) to point (X,Y). The line is drawn in the current color and line pattern, using the write mode defined by the SetWriteMode procedure. See also: LineRel, Line, SetWriteMode, SetLineStyle, GetLineSettings, Graph Program LineTo_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat SetColor(Random(GetMaxColor)+1); LineTo(Random(GetMaxX),Random(GetMaxY)); Delay(500); Until KeyPressed; CloseGraph; End. Mg (0Procedure MoveRel(Dx, Dy : Integer); Moves the current pointer to a point relative to it's current location. The current pointer can be moved backwards by assigning a negative value to Dx, and upwards by assigning a negative value to Dy. See also: MoveTo, GetX, GetY, LineRel, LineTo, Graph Program MoveRel_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat MoveRel(Random(5)-2,Random(3)); PutPixel(GetX,GetY,Random(GetMaxColor+1)); If (GetY >= GetMaxY) then MoveTo(Random(GetMaxX),0); Until KeyPressed; CloseGraph; End. Pn  (1Procedure MoveTo(X, Y : Integer); Moves the current pointer to a new position. See also: MoveRel, GetX, GetY, LineTo, LineRel, Graph Program MoveTo_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); MoveTo(GetMaxX,GetMaxY); LineTo(0,0); C := ReadKey; CloseGraph; End.   " -  Procedure OutText(TextString : string); Outputs a string of text at the current pointer (CP). TextString is written at the current pointer, using the current text style, direction and justification. If the direction is HorizDir and the justification is LeftText, the X part of the current pointer will be updated according to the length of the output string. See also: OutTextXY, TextHeight, TextWidth, SetTextStyle, SetTextJustify, Graph Program OutText_Demo; Uses Graph,UtilUnit; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat MoveTo(Random(GetMaxX),Random(GetMaxY)); OutText('('+Int2Str(GetX)+','+Int2Str(GetY)+')'); Until KeyPressed; CloseGraph; End.    +  Procedure OutTextXY(X,Y : Integer; TextString : string); Outputs a string of text at the specified coordinates. (X,Y) is the point where the text is written. TextString is the string to write. The current pointer is not updated by a call to OutTextXY. See also: OutText, TextHeight, TextWidth, SetTextStyle, SetTextJustify, Graph Program OutTextXY_Demo; Uses Graph,UtilUnit; Var Driver,Mode,P : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); P := 0; Repeat OutTextXY(P,P,'('+Int2Str(P)+','+Int2Str(P)+')'); Inc(P,TextHeight('X')); Until (P > GetMaxY) Or (P > GetMaxX); C := ReadKey; CloseGraph; End.    ).6  &+Procedure PieSlice(X, Y : Integer; StAngle, EndAngle, Radius : Word); Draws and fills a pie slice. (X,Y) specifies the center point, StAngle the start angle, EndAngle the end angle and Radius the radius of the pie slice. The pie slice is drawn in the current color, and filled using the current fill settings. The shape of the pie slice is effected by the current aspect ratio settings. See also: SetAspectRatio, SetFillStyle, Arc, Circle, Rectangle, Sector, DrawPoly, Ellipse, Bar, Graph Program PieSlice_Demo; Uses Graph; Var Slice,F,Hy, Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); F := 360 DIV 12; Hy := GetMaxY DIV 2; For Slice := EmptyFill to CloseDotFill Do Begin SetFillStyle(Slice,Random(GetMaxColor)+1); SetColor(Random(GetMaxColor)+1); PieSlice(GetMaxX DIV 2,Hy,(Slice*F)+2,(Succ(Slice)*F)-2,Hy); End; C := ReadKey; CloseGraph; End. }  Procedure PutImage(X, Y : Integer; var BitMap; BitBlt : Word); Puts a stored image onto the screen. (X,Y) specifies where on the screen to put the stored image. BitMap contains the image. BitBlt specifies the binary operation to use, when putting the image onto the screen. The legal values for BitBlt are declared in the Graph unit as: Const NormalPut=0; CopyPut=0; XorPut=1; OrPut=2; AndPut=3; NotPut=4; NormalPut and CopyPut will simply put the stored image onto the screen. XorPut will XOR (EOR), OrPut will OR and AndPut will AND the stored image with the current screen contents. NotPut will NOT (Invert) the stored image onto the screen. If BitBlt contains an illegal value, the image will not be put onto the screen. See also: GetImage, Graph   Procedure PutPixel(X, Y : Integer; Pixel : Word); Plots a pixel in the specified color at the specified point. See also: GetPixel, GetColor, Graph Program Pixel_Demo; Uses Graph; Var Rx,Ry, Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Randomize; SetFillStyle(LtBkSlashFill,Random(GetMaxColor)+1); Bar3D(0,0,100,100,0,TopOff); Repeat Rx := Random(101); Ry := Random(101); PutPixel(100+Rx,100+Ry,GetPixel(Rx,Ry)); Until KeyPressed; CloseGraph; End. T|   # + 5   Procedure Rectangle(x1, y1, x2, y2 : Integer); Draws a rectangle. (x1,y1) specifies the upper-left and (x2,y2) the lower-right corner of the rectangle. The rectangle is drawn in the current color, using the current line style. See also: SetWriteMode, Bar, Arc, Circle, PieSlice, Sector, DrawPoly, Ellipse, Graph Program Rectangle_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat SetColor(Random(GetMaxColor)+1); Rectangle(Random(GetMaxX),Random(GetMaxY), Random(GetMaxX),Random(GetMaxY)); Until KeyPressed; CloseGraph; End. '[7  Procedure RestoreCrtMode; Clears the screen and turns on the text cursor. When the text cursor is no longer required, a call to SetGraphMode will turn it off. See also: SetGraphMode, Graph Program RestoreCrtMode_Demo; Uses Graph; Var Height, Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); RestoreCrtMode;{ Turn on text cursor } Write('Enter height of bar 0-',GetMaxY,': '); ReadLn(Height); SetGraphMode(GetGraphMode); { Turn off text cursor } Bar(10,0,30,Height); C := ReadKey; CloseGraph; End. (   & 0 ; Procedure Sector(x,y: Integer; StAngle,EndAngle,XRadius,YRadius: Word); Draws and fills an elliptical sector. (X,Y) specifies the center point of the sector. StAngle, EndAngle specifies the starting and ending angle and XRadius, YRadius specifies the x and y radius of the sector. The sector is drawn in the current color, and filled using the current fill settings. See also: SetFillStyle, Arc, Circle, PieSlice, Rectangle, DrawPoly, Ellipse, Bar, Graph Program Sector_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Randomize; SetColor(Random(GetMaxColor)); SetFillStyle(SolidFill,Random(GetMaxColor)); Sector(GetMaxX DIV 2,GetMaxY DIV 2,30,330,100,100); C := ReadKey; CloseGraph; End. B * 3    'Procedure SetActivePage(Page : Word); Specifies what screen page to work on. Page must be either 0 or 1. Note: Page 0 will always be available since it is the default screen page, created by the operating system. Page 1 is a virtual screen page, created by the InitGraph procedure. If InitGraph could not create page 1, due to insufficient space in the heap, any reference to this page will be ignored, and the GraphResult function will return -11 (GrError). See also: SetVisualPage, GraphResult, Graph Program ScreenPage_Demo; Uses Graph; Const Mess = 'Press any key to look at page '; Var Driver,Mode : Integer; C: Char; Function RandX : Integer; Begin RandX := Random(GetMaxX); End; Function RandY : Integer; Begin RandY := Random(GetMaxY); End; Procedure Many_Triangles; Var Poly: Array[1..3] Of PointType; Extra : Byte; Begin Repeat Extra := Random(100); SetFillStyle(Random(UserFill),Random(GetMaxColor+1)); Poly[1].X := RandX; Poly[1].Y := RandY; Poly[2].X := Poly[1].X-Extra; Poly[2].Y := Poly[1].Y+Extra; Poly[3].X := Poly[1].X+Extra; Poly[3].Y := Poly[2].Y; FillPoly(3,Poly); Until KeyPressed; C := ReadKey; End; Procedure Many_Bars; Begin Repeat SetFillStyle(Random(CloseDotFill)+1,Random(GetMaxColor+1)); Bar3D(RandX,RandY,RandX,RandY,0,TopOff); Until KeyPressed; C := ReadKey; End; Procedure Message( Line1, Line2 : String ); Var Th,Hx,Hy,W : Integer; Begin Th := TextHeight('M')*2; Hx := GetMaxX DIV 2; Hy := GetMaxY DIV 2; W := (8+TextWidth(Line2) DIV 2); SetFillStyle(EmptyFill,GetMaxColor); Bar3D(Hx-W,Hy-Th*1,Hx+W,Hy+Th*2,0,TopOff); SetTextJustify(CenterText,CenterText); OutTextXY(Hx,Hy,'PAGE '+Line1); OutTextXY(Hx,Hy+Th,Line2); End; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetActivePage(1);{ Does page 1 exist ? } If (GraphResult = GrOK) then Begin SetActivePage(0); Message('0',Mess+'1');{ Display message on page 0. } SetActivePage(1);{ Start working on page 1. } Many_Triangles;{ Work, until a key is pressed. } Message('1',Mess+'0');{ Write a message. } SetVisualPage(1);{ Now display page 1. } SetActivePage(0);{ Start working on page 0. } Many_Bars;{ Work, until a key is pressed. } Message('0','The end'); { Write a message. } SetVisualPage(0);{ Now display page 0. } End Else OutText('Paging not possible.'); C := ReadKey; CloseGraph; End. wT  & 2 Procedure SetAllPalette(var Palette); Sets a number of palette entries to a new color. Palette is a typeless variable, but it's structure resembles the structure of the PaletteType record: Type PaletteType = Record Size: Integer; Colors: Array[0..15] Of ShortInt; End; The first integer specifies the number of colors in Palette. The following N bytes (ShortInt's) are the replacement colors to put into the palette. The number of colors that Palette may contain, depends on the current graphics driver and mode: DriverModePalette entries ---------------------------------- StColorStLow16 StColorStMedium4 StMonoStHigh2 If one of the color values in Palette equals -1, the palette entry for that color will not be changed. See also: SetPalette, SetRGBPalette, GetPalette, GetPaletteSize, GetDefaultPalette, Graph Program SetAllPalette_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; PalData: PaletteType; Begin Driver := DETECT; InitGraph(Driver,Mode,''); GetPalette(PalData); PalData.Colors[0] := Red; { No reaction on a mono screen } SetAllPalette(PalData); C := ReadKey; CloseGraph; End. x"-  *2Procedure SetAspectRatio(Xasp, Yasp : Word); Selects the X and Y value used in the aspect ratio calculations. The aspect ratio is used by Arc, Circle and PieSlice to ensure that the circular figures will appear on the screen as being round and not egg-shaped. These are the default aspect values for the 3 graphic modes: ModeXaspYasp ---------------------------- StLow878810000 StMedium 439410000 StHigh967210000 See also: GetAspectRatio, Arc, PieSlice, Circle, Graph Program SetAspectRatio_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Xasp,Yasp: Word; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetTextJustify(CenterText,CenterText); OutTextXY(100,100,'Circle'); Circle(100,100,45); GetAspectRatio(Xasp,Yasp); Dec(Yasp,5000); SetAspectRatio(Xasp,Yasp); OutTextXY(200,100,'Egg'); Circle(200,100,45); C := ReadKey; CloseGraph; End.  ! . :Procedure SetBkColor( Color : Word ); Selects the background color. The range of the Color parameter depends on the current graphics driver and mode: DriverModeColor range ------------------------------ StColorStLow0..15 StColorStMedium 0..3 StMonoStHigh0..1 See also: GetBkColor, SetColor, GetMaxColor, SetPalette, Graph Program SetBkColor_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetTextJustify(CenterText,CenterText); OutTextXY(GetMaxX DIV 2,GetMaxY DIV 2,'Hello'); Repeat SetBkColor(Random(GetMaxColor)); { No reaction on a mono screen } Until KeyPressed; CloseGraph; End. :=   " . :Procedure SetColor(Color : Word); Selects the foreground color. Color specifies what entry in the palette that is to be used as the foreground color. The range of Color depends on the current graphics driver and mode: DriverModeRange of Color ------------------------------------ StColorStLow0..15 StColorStMedium0..3 StMonoStHigh0..1 If an illegal value is passed to SetColor, the foreground color will not be changed. The highest legal color number is returned by a call to the GetMaxColor function. See also: GetColor, GetMaxColor, SetBkColor, SetPalette, Graph Program SetColor_Demo; Uses Graph; Var Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat SetColor(Random(GetMaxColor+1)); Line(0,0,Random(GetMaxX),Random(GetMaxY)); Until KeyPressed; CloseGraph; End.  1 # ##)#: $ $ $#$-$2$9% Procedure SetFillPattern(Pattern : FillPatternType; Color : Word); Specifies the appearance of the user-defined fill pattern. The FillPatternType array is declared in the Graph unit as: Type FillPatternType = Packed Array[1..8] Of Byte; Fill patterns are made up of 8*8 bits. When filling is done, a pixel will be lit on the screen when a bit in the pattern is on. To fill the screen with small circles, the following fill pattern would have to be defined: Binary patternPattern[1..8] ------------------------------- 0001110028 { Pattern[1] } 0010001034 { Pattern[2] } 0100000165 { Pattern[3] } 0100000165 { Pattern[4] } 0100000165 { Pattern[5] } 0010001034 { Pattern[6] } 0001110028 { Pattern[7] } 00000000 0 { Pattern[8] } Color specifies what fill color to use. If illegal values are passed to SetFillPattern, GraphResult will return -11 (GrError), and the current fill settings will not be changed. Otherwise the current fill pattern and fill color will be set equal to the Pattern and Color parameters. See also: SetFillStyle, GetFillPattern, GetFillSettings, GraphResult, FloodFill, FillEllipse, FillPoly, Bar, Bar3D, PieSlice, Graph Program SetFillPattern_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; NewPattern: FillPatternType; Begin NewPattern[1] := 28; NewPattern[2] := 34; NewPattern[3] := 65; NewPattern[4] := 65; NewPattern[5] := 65; NewPattern[6] := 34; NewPattern[7] := 28; NewPattern[8] := 0; Driver := DETECT; InitGraph(Driver,Mode,''); SetColor(GetColor); Rectangle(0,0,GetMaxX,GetMaxY); SetFillPattern(NewPattern,GetColor); FloodFill(1,1,GetColor); C := ReadKey; CloseGraph; End. H? 3 / # ##,#< $ $ $#$-$2$9% Procedure SetFillStyle(Pattern, Color : Word); Selects the pattern and the color to use in fill operations. Pattern specifies the fill pattern to use. The legal values are declared in the Graph unit as: Const EmptyFill=0;{ Background color is used. } SolidFill=1;{ Solid fill. } LineFill =2;{ --- } LtSlashFill=3;{ \\\ thin lines. } SlashFill=4;{ \\\ thick lines. } BkSlashFill=5;{ /// thick lines. } LtBkSlashFill=6;{ /// thin lines. } HatchFill=7;{ Hatch fill. } XHatchFill=8;{ Cross fill. } InterLeaveFill=9; { Very close dots. } WideDotFill=10;{ Widely dotted fill. } CloseDotFill=11;{ Close dots. } UserFill =12;{ User defined fill. } EmptyFill..CloseDotFill selects one of the predefined fill patterns. UserFill selects the pattern defined in a call to SetFillPattern. If no such call has been made, the user-defined pattern will default to SolidFill. Color specifies what fill color to use. The range of Color depends on the current graphics driver and mode. If illegal values are passed to SetFillStyle, GraphResult will return -11 (GrError), and the current fill settings will not be changed. See also: SetFillPattern, GetFillSettings, GetFillPattern, GetMaxColor, FloodFill, FillEllipse, FillPoly, Bar, Bar3D, PieSlice, Graph Program SetFillStyle_Demo; Uses Graph; Var Sx,Sy, Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat SetFillStyle(Random(UserFill),Random(GetMaxColor)+1); Sx := Random(GetMaxX-20); Sy := Random(GetMaxY-20); Bar(Sx,Sy,Sx+20,Sy+20); Until KeyPressed; CloseGraph; End. ' 5   %5   &Procedure SetGraphMode(Mode : Integer); Sets the active driver to operate in the specified mode. Mode specifies the mode to change to. The range of Mode depends on the current driver: DriverPossible modes --------------------------------- StColorStLow and StMedium StMonoStHigh SetGraphMode can also be used to turn off the text cursor, after a call has been made to RestoreCrtMode. If an invalid mode value is passed to SetGraphMode, GraphResult will return -10 (GrInvalidMode) and the current mode will not be changed. See also: GetMaxMode, GetGraphMode, RestoreCrtMode, GetDriverName, GetModeName, GetModeRange, Graph Program SetGraphMode_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); If (Driver = StColor) then Begin OutText(GetModeName(Mode)); C := ReadKey; If (Mode = StLow) then SetGraphMode(StMedium) Else SetGraphMode(StLow); OutText(GetModeName(Mode)); End{ Change resolution } Else OutText('Can''t change the resolution.'); C := ReadKey; CloseGraph; End. 3 ! ! !*!0!8" Procedure SetLineStyle(LineStyle, Pattern, Thickness : Word); Specifies the pattern and width of lines. LineStyle specifies what line pattern to use. The legal values are declared in the Graph unit as: Const{ Bit-pattern used: } SolidLn=0; { 1111111111111111} DottedLn =1; { 1110000011100000} CenterLn =2; { 1111111000111000} DashedLn =3; { 1111111111110000} UserBitLn=4; If LineStyle equals UserBitLn, the 16 bits passed in the Pattern parameter will be used as the line pattern. Otherwise one of the predefined line patterns will be used. Thickness specifies how thick lines are to be. The legal values are declared in the Graph unit as: Const NormWidth=1; { Width is 1 pixel } ThickWidth=3; { Width is 3 pixels } If the VDI in your machine does not support thick lines with different patterns, the width will default to NormWidth, even if the Thickness parameter equals ThickWidth. If illegal values are passed to SetLineStyle, the GraphResult function will return -11 (GrError), and the current settings will not be changed. See also: GetLineSettings, SetWriteMode, Line, LineTo, LineRel, Graph Program SetLineStyle_Demo; Uses Graph; Var Driver,Mode,X : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetWriteMode(XorPut); Repeat For X := SolidLn to DashedLn Do Begin SetLineStyle(X,0,NormWidth); Line(0,0,GetMaxX,GetMaxY); End; Until KeyPressed; C := ReadKey; CloseGraph; End. A  )9Procedure SetPalette( PalEntry, NewColor : Integer ); Sets a specified palette entry to a new color. PalEntry is the palette entry to change. The range of PalEntry depends on the current driver and mode: DriverModePalEntry range ---------------------------------- StColorStLow0..15 StColorStMedium0..3 StMonoStHigh0..1 NewColor is the new color to put into the palette. The range of NewColor is 0..15. See also: SetAllPalette, SetRGBPalette, GetPaletteSize, Graph Program SetPalette_Demo; Uses Graph; Var Driver,Mode,X : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Repeat SetColor(Random(GetMaxColor+1)); Line(0,0,Random(GetMaxX),Random(GetMaxY)); Until KeyPressed; For X := 0 to GetMaxColor Do Begin SetPalette(X,0); { Remove color X from screen } Delay(100); End; CloseGraph; End. l  &6Procedure SetRGBPalette( PalEntry, Red, Green, Blue : Integer ); Changes the Red-Green-Blue color mix for a specified palette entry. PalEntry specifies the palette entry to change. The range of PalEntry depends on the current graphics driver and mode: DriverModeRange of PalEntry ------------------------------------- StColorStLow0..15 StColorStMedium0..3 StMonoStHigh0..1 The Red, Green and Blue parameters represents the intensity of the three basic colors, and must all be in the range 0..63. If illegal values are passed to SetRGBPalette, no change will be made to the palette. See also: SetPalette, SetAllPalette, GetPaletteSize, Graph Program SetRGBPalette_Demo; Uses Graph; Var RGB, Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetTextJustify(CenterText,CenterText); MoveTo(GetMaxX DIV 2,GetMaxY DIV 2); OutTextXY(GetX,GetY-10,'HighSpeed Pascal'); OutTextXY(GetX,GetY+10,'programming'); Repeat For RGB := 0 to 63 Do Begin SetRGBPalette(GetColor,RGB,RGB,RGB); Delay(5); End; For RGB := 63 Downto 0 Do Begin SetRGBPalette(GetColor,RGB,RGB,RGB); Delay(5); End; Until KeyPressed; C := ReadKey; CloseGraph; End.  ; '1 + ++*+3 +>Procedure SetTextJustify(Horiz, Vert : Word); Sets the justification for graphic text output. Horiz specifies the horizontal justification. The legal values are declared in the Graph unit as: Const LeftText =0; CenterText=1; RightText=2; Vert specifies the vertical justification: Const BottomText=0; {CenterText=1;} TopText=2; Text is always centered around a, so called, base-point. When using OutText the base-point is the current pointer, when using OutTextXY the base-point is the point defined by the specified X and Y coordi- nates. This is a listing of the various justification settings: Horizontal justification: ---------------------------------------------------------- LeftText Text is output to the left of the base-point. CenterTextText is output right on top of the base-point. RightTextText is output to the right of the base-point. Vertical justification: ---------------------------------------------------------- TopTextText is output with it's top on the base-point. CenterTextSame as above. BottomTextText is output with it's bottom on the base-point. If illegal values are passed to SetTextJustify, GraphResult will return -11 (GrError), and the current justification settings will not be changed. See also: SetTextStyle, GetTextSettings, OutText, OutTextXY, Graph Program SetTextJustify_Demo; Uses Graph; Var ExtraX, Driver,Mode : Integer; C: Char; Procedure OutPutX( Data : String ); Begin OutText(Data); MoveRel(ExtraX,0); End; Procedure OutPutY( Data : String ); Begin OutText(Data); MoveTo(GetMaxX DIV 2,GetY+TextHeight('M')); End; Begin Driver := DETECT; InitGraph(Driver,Mode,''); SetTextStyle(DefaultFont,HorizDir,2); ExtraX := TextWidth('M')*12; Line(0,30,GetMaxX,30); MoveTo((GetMaxX DIV 2)-ExtraX ,30); SetTextJustify(CenterText,TopText); OutPutX('TopText'); SetTextJustify(CenterText,CenterText); OutPutX('CenterText'); SetTextJustify(CenterText,BottomText); OutPutX('BottomText'); Line(GetMaxX DIV 2, 100,GetMaxX DIV 2, 200); MoveTo(GetMaxX DIV 2,100); SetTextJustify(LeftText ,CenterText); OutPutY('LeftText'); SetTextJustify(CenterText,CenterText); OutPutY('CenterText'); SetTextJustify(RightText ,CenterText); OutPutY('RightText'); C := ReadKey; CloseGraph; End. 3  ,5 @Procedure SetTextStyle(Font, Direction, CharSize : Word); Selects the style, direction and size of graphic text. Font specifies the appearance of text. The legal values are declared in the Graph unit as: Const DefaultFont=0; TriplexFont=1; SmallFont=2; SansSerifFont=3; GothicFont=4; Direction specifies the direction of text: Const HorizDir =0; { From left to right } VertDir=1; { From bottom towards the top } CharSize specifies the size of text. The range of CharSize should be 1..7. If Font is illegal, GraphResult will return -14 (GrInvalidFontNum). If Direction is illegal -11 (GrError) will be returned. See also: SetTextJustify, GetTextSettings, OutText, OutTextXY, Graph Program SetTextStyle_Demo; Uses Graph,UtilUnit; Var Xc,Yc,Size: Word; Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Xc := 40; Yc := GetMaxY-40; MoveTo(Xc,0); LineTo(GetX,Yc); LineTo(GetMaxX,GetY); SetTextJustify(LeftText,BottomText); SetTextStyle(DefaultFont,VertDir,2); OutTextXY(Xc,Yc,'Vertical'); SetTextJustify(LeftText,TopText); SetTextStyle(DefaultFont,HorizDir,2); OutTextXY(Xc,Yc,'Horizontal'); SetTextJustify(CenterText,TopText); MoveTo(GetMaxX DIV 2,0); For Size := 1 to 7 Do Begin SetTextStyle(DefaultFont,HorizDir,Size); OutText('Size '+Int2Str(Size)); MoveRel(0,TextHeight('S')); End; C := ReadKey; CloseGraph; End.  .   +Procedure SetViewPort(x1, y1, x2, y2 : Integer; newClip : Boolean); Specifies the boundaries and clipping state of the viewport. (x1,y1) specifies the upper-left corner, and (x2,y2) the lower-right corner of the viewport. newClip specifies whether or not to clip off any graphic output that exceeds the boundaries of the viewport. If illegal values are passed to SetViewPort, GraphResult will return -11 (GrError), and the current viewport settings will not be changed. Otherwise GraphResult will return 0 (GrOK), and the current pointer will be placed in the upper-left corner of the new viewport. See also: GetViewSettings, ClearViewPort, Graph Program SetViewPort_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); Rectangle(0,0,10,10); SetViewPort(20,20,GetMaxX,GetMaxY,ClipOn); Rectangle(0,0,10,10); SetViewPort(200,200,GetMaxX,GetMaxY,ClipOn); Rectangle(0,0,10,10); C := ReadKey; CloseGraph; End.   3    'Procedure SetVisualPage(Page : Word); Specifies what screen page to display. Page must be either 0 or 1. Note: Page 0 will always be available since it is the default screen page, created by the operating system. Page 1 is a virtual screen page, created by the InitGraph procedure. If InitGraph could not create page 1, due to insufficient space in the heap, any reference to this page will be ignored, and the GraphResult function will return -11 (GrError). See also: SetActivePage, GraphResult, Graph  #, 7Procedure SetWriteMode(WritMode : Integer); Specifies the way in which lines are to be put on the screen. The legal values for WritMode are declared in the Graph unit as: Const CopyPut=0; XorPut=1; When the write mode is set to CopyPut, it means that lines are simply put on the screen. When using XorPut, the lines will be XOR'ed (EOR'ed) onto the screen, which means that if the line is drawn twice at the same coordinates, the original contents of the screen will be restored. See also: DrawPoly, Line, LineTo, LineRel, Rectangle, Graph Program SetWriteMode_Demo; Uses Graph; Var C, Driver,Mode : Integer; Begin Driver := DETECT; InitGraph(Driver,Mode,''); C := 1; SetWriteMode(XorPut); Repeat Rectangle(C,C,GetMaxX-C,GetMaxY-C); { Draw rectangle } Rectangle(C,C,GetMaxX-C,GetMaxY-C); { Remove it } If (C > GetMaxY DIV 2) then C := 0 Else Inc(C,2); Until KeyPressed; CloseGraph; End. S{   *Function TextHeight(TextString : string) : Word; Returns the height, in pixels, of a text string. The value returned by TextHeight depends on the current font settings. TextHeight, together with the TextWidth function, is useful when centering text on the screen. See also: TextWidth, OutText, OutTextXY, Graph Program TextDimension_Demo; Uses Graph; Var Driver,Mode : Integer; C: Char; Begin Driver := DETECT; InitGraph(Driver,Mode,''); C := 'A'; Repeat OutText(C); MoveRel(TextWidth(C),TextHeight(C)); C := Succ(C); Until (GetY >= GetMaxY); C := ReadKey; CloseGraph; End. ::  +Function TextWidth(TextString : string) : Word; Returns the width, in pixels, of a text string. The value returned by TextWidth depends on the current font settings. TextWidth, together with the TextHeight function, is useful when centering text on the screen. See also: TextHeight, OutText, OutTextXY, Graph  / Function InstallUserDriver(Name:String;AutoDetectPtr:Pointer):Integer; InstallUserDriver is not implemented in this Graph unit version. See also: SetGraphBufSize, RegisterBGIDriver, InstallUserFont, RegisterBGIFont, SetUserCharSize  1 Procedure SetGraphBufSize(BufSize : Word); SetGraphBufSize is not implemented in this Graph unit version. See also: InstallUserDriver, RegisterBGIDriver, InstallUserFont, RegisterBGIFont, SetUserCharSize  / Function RegisterBGIdriver(Driver : Pointer) : Integer; RegisterBGIdriver is not implemented in this Graph unit version. See also: InstallUserDriver, SetGraphBufSize, InstallUserFont, RegisterBGIFont, SetUserCharSize  / Function (FontFileName : String) : Integer; InstallUserFont is not implemented in this Graph unit version. See also: InstallUserDriver, SetGraphBufSize, RegisterBGIDriver, RegisterBGIFont, SetUserCharSize  / FunctionRegisterBGIfont(Font : Pointer) : Integer; RegisterBGIfont is not implemented in this Graph unit version. See also: InstallUserDriver, SetGraphBufSize, RegisterBGIDriver, InstallUserFont, SetUserCharSize  / Procedure SetUserCharSize(MultX,DivX,MultY,DivY : Word); SetUserCharSize is not implemented in this Graph unit version. See also: InstallUserDriver, SetGraphBufSize, RegisterBGIDriver, InstallUserFont, RegisterBGIFont #~-i !*'8  ' 8 ' 8  '8   ' 8   ' 8   ' 8   ' 8   ' 8 ' 8   '8'8 '8 '8  ' 8 ' 8   '8   ' 8   - - 3/ *  , /        These are the routines implemented in the Graph unit: See also: Dos, Printer, System, System2, STPascal ArcBarBar3DCircle ClearDeviceClearViewPort CloseGraphDetectGraph DrawPolyEllipseFillEllipseFillPoly FloodFillGetArcCoordsGetAspectRatioGetBkColor GetColorGetDefaultPalette GetDriverNameGetFillPattern GetFillSettings GetGraphModeGetImageGetLineSettings GetMaxColorGetMaxModeGetMaxXGetMaxY GetModeNameGetModeRangeGetPalette GetPaletteSize GetPixelGetTextSettingsGetViewSettings GetX GetYGraphDefaultsGraphErrorMsgGraphResult ImageSizeInitGraphLineLineRel LineToMoveRelMoveTo OutText OutTextXYPieSlicePutImagePutPixel RectangleRestoreCrtModeSectorSetActivePage SetAllPaletteSetAspectRatioSetBkColorSetColor SetFillPatternSetFillStyleSetGraphModeSetLineStyle SetPaletteSetRGBPaletteSetTextJustifySetTextStyle SetViewPortSetVisualPage SetWriteMode TextHeight TextWidth UNIT Graph; INTERFACE Uses STPascal, GemDecl, GemAES, GemVDI, BIOS; Const { GraphResult return values. } GrOK=0;{ No error } GrNoInitGraph= -1;{ Graph has not been initialized } GrNotDetected= -2;{ No graphics adapter detected } GrFileNotFound =-3; GrInvalidDriver =-4;{ Bad driver for hardware configuration } GrNoLoadMem=-5; GrNoScanMem=-6; GrNoFloodMem=-7; GrFontNotFound =-8; GrNoFontMem=-9; GrInvalidMode= -10;{ Bad mode for graphics driver } GrError= -11;{ Generic error } GrIOError= -12; GrInvalidFont= -13; GrInvalidFontNum= -14;{ Invalid font number requested } { Driver numbers. } DETECT=0; CGA=1; MCGA=2; EGA=3; EGA64=4; EGAMono=5; IBM8514=6; HercMono=7; ATT400=8; VGA=9; PC3270=10; StColor=11; { If you have a color monitor. } StMono=12; { If you have a monochrome monitor. } { Mode numbers. } StLow=0; { 320 x 200, 4 bitplanes, Color } StMedium=1; { 640 x 200, 2 bitplanes, Color } StHigh=2; { 640 x 400, 1 bitplane , Mono } CGAC0=0; CGAC1=1; CGAC2=2; CGAC3=3; CGAHi=4; MCGAC0=0; MCGAC1=1; MCGAC2=2; MCGAC3=3; MCGAMed=4; MCGAHi=5; EGALo=0; EGAHi=1; EGA64Lo=0; EGA64Hi=1; EGAMonoHi=3; HercMonoHi=0; ATT400C0=0; ATT400C1=1; ATT400C2=2; ATT400C3=3; ATT400Med=4; ATT400Hi=5; VGALo=0; VGAMed=1; VGAHi=2; PC3270Hi=0; IBM8514Lo=0; IBM8514Hi=1; { Color numbers. } Black=0; Blue=1; Green=2; Cyan=3; Red=4; Magenta=5; Brown=6; LightGray=7; DarkGray=8; LightBlue=9; LightGreen=10; LightCyan=11; LightRed=12; LightMagenta=13; Yellow=14; White=15; { EGA colors on the IBM8514. } EGABlack=0; EGABlue=1; EGAGreen=2; EGACyan=3; EGARed=4; EGAMagenta=5; EGABrown=20; EGALightGray= 7; EGADarkGray=56; EGALightBlue=57; EGALightGreen= 58; EGALightCyan=59; EGALightRed=60; EGALightMagenta =61; EGAYellow=62; EGAWhite=63; { Line styles used by GetLineSettings and SetLineStyle. } SolidLn=0; DottedLn=1; CenterLn=2; DashedLn=3; UserBitLn=4; NormWidth=1; ThickWidth=3; { Font styles used by GetTextSettings and SetTextStyle. } DefaultFont=0; TriplexFont=1; SmallFont=2; SansSerifFont=3; GothicFont=4; HorizDir=0; VertDir=1; UserCharSize= 0; { Horizontal and vertical justification used by SetTextJustify. } LeftText=0; CenterText=1; RightText=2; BottomText=0; TopText=2; { Clipping status controls. } ClipOn= True; ClipOff= False; { Bar3D status controls. } TopOn= True; TopOff= False; { Fill patterns used by GetFillSettings and SetFillStyle. } EmptyFill=0; { Background color is used. } SolidFill=1; { Solid fill. } LineFill=2; { --- } LtSlashFill=3; { \\\ thin lines. } SlashFill=4; { \\\ thick lines. } BkSlashFill=5; { /// thick lines. } LtBkSlashFill=6; { /// thin lines. } HatchFill=7; { Hatch fill. } XHatchFill=8; { Cross fill. } InterLeaveFill =9; { Very close dots. } WideDotFill=10; { Widely dotted fill. } CloseDotFill=11; { Close dots. } UserFill=12; { User defined fill. } { Status controls used by PutImage and SetWriteMode. } NormalPut=0; { = MOV } CopyPut=0; { = MOV } XorPut=1; { = XOR } { Status controls used by PutImage. } OrPut=2; { = OR } AndPut=3; { = AND } NotPut=4; { = NOT } { Used by GetPalette, GetDefaultPalette, SetAllPalette. } MaxColors=15; Type { Used by GetPalette, GetDefaultPalette and SetAllPalette. } PaletteType= Record Size: Integer; Colors: Array[0..MaxColors] Of ShortInt;  End; { Used by GetLineSettings. } LineSettingsType= Record LineStyle, Pattern, ThickNess : Word;  End; { Used by GetTextSettings. } TextSettingsType= Record Font, Direction, CharSize, Horiz, Vert: Word;  End; { Used by GetFillSettings. } FillSettingsType= Record Pattern, Color: Word;  End; { Used by GetFillPattern and SetFillPattern. } FillPatternType = Packed Array[1..8] Of Byte; { Used by DrawPoly and FillPoly. } PointType= Record X,Y: Integer;  End; { Used by GetViewSettings. } ViewPortType= Record X1,Y1,X2,Y2 : Integer; Clip: Boolean;  End; { Used by GetArcCoords. } ArcCoordsType= Record X,Y, XStart, YStart, XEnd, YEnd: Integer;  End; { Aspect Routines } Procedure GetAspectRatio(var Xasp, Yasp : Word); Procedure SetAspectRatio(Xasp, Yasp : Word); { Bar Routines } Procedure Bar(x1, y1, x2, y2 : Integer); Procedure Bar3D(x1, y1, x2, y2 : Integer; Depth : Word; Top : Boolean); { Color and Palette Routines } FunctionGetBkColor : Word; FunctionGetColor : Word; Procedure GetDefaultPalette(var Palette :PaletteType); FunctionGetMaxColor : Word; Procedure GetPalette(var Palette : PaletteType); FunctionGetPaletteSize : Integer; Procedure SetAllPalette(var Palette); Procedure SetBkColor( Color : Word ); Procedure SetColor(Color : Word); Procedure SetPalette( PalEntry, NewColor : Integer ); Procedure SetRGBPalette( PalEntry, Red, Green, Blue : Integer ); { Device Routines } Procedure ClearDevice; Procedure CloseGraph; Procedure DetectGraph(var GraphDriver, GraphMode : Integer); FunctionGetDriverName : string; FunctionGetGraphMode : Integer; FunctionGetMaxMode : Integer; FunctionGetMaxX : Integer; FunctionGetMaxY : Integer; FunctionGetModeName(ModeNumber : Integer) : string; Procedure GetModeRange(GraphDriver :Integer; var LoMode, HiMode :Integer); Procedure GraphDefaults; Procedure InitGraph(var GraphDriver, GraphMode: Integer; Path: string); Procedure RestoreCrtMode; Procedure SetActivePage(Page : Word); Procedure SetGraphMode(Mode : Integer); Procedure SetVisualPage(Page : Word); { Error-Handling Routines } FunctionGraphErrorMsg(ErrorCode : Integer) : string; FunctionGraphResult : Integer; { Fill Routines } Procedure FillEllipse(X, Y: Integer; XRadius, YRadius: Word); Procedure FloodFill(X, Y : Integer; Border : Word); Procedure GetFillPattern(var FillPattern : FillPatternType); Procedure GetFillSettings(var FillInfo : FillSettingsType); Procedure SetFillPattern(Pattern : FillPatternType; Color : Word); Procedure SetFillStyle(Pattern : Word; Color : Word); { Image Routines } FunctionImageSize(x1, y1, x2, y2 : Integer) : LongInt; Procedure GetImage(x1, y1, x2, y2 : Integer; var BitMap); Procedure PutImage(X, Y : Integer; var BitMap; BitBlt : Word); { Line Routines } Procedure GetLineSettings(var LineInfo : LineSettingsType); Procedure Line(x1, y1, x2, y2 : Integer); Procedure LineRel(Dx, Dy : Integer); Procedure LineTo(X,Y : Integer); Procedure SetLineStyle(LineStyle, Pattern, Thickness : Word); { Pixel Routines } FunctionGetPixel(X,Y : Integer) : Word; Procedure PutPixel(X, Y : Integer; Pixel : Word); { Poly Routines } Procedure DrawPoly(NumPoints : Word; var PolyPoints); Procedure FillPoly(NumPoints : Word; var PolyPoints); { Text Routines } Procedure GetTextSettings(var TextInfo : TextSettingsType); Procedure OutText(TextString : string); Procedure OutTextXY(X,Y : Integer; TextString : string); Procedure SetTextJustify(Horiz, Vert : Word); Procedure SetTextStyle(Font, Direction, CharSize : Word); FunctionTextHeight(TextString : string) : Word; FunctionTextWidth(TextString : string) : Word; { Viewport Routines } Procedure ClearViewPort; Procedure GetViewSettings(var ViewPort : ViewPortType); Procedure SetViewPort(x1, y1, x2, y2 : Integer; newClip : Boolean); { Miscellaneous Routines } Procedure Arc(X,Y : Integer; StAngle, EndAngle, Radius : Word); Procedure Circle(X,Y : Integer; Radius : Word); Procedure Ellipse(X, Y : Integer; StAngle, EndAngle, XRad, YRad : Word); Procedure GetArcCoords(var ArcCoords : ArcCoordsType); FunctionGetX : Integer; FunctionGetY : Integer; Procedure MoveRel(Dx, Dy : Integer); Procedure MoveTo(X, Y : Integer); Procedure PieSlice(X, Y : Integer; StAngle, EndAngle, Radius : Word); Procedure Rectangle(x1, y1, x2, y2 : Integer); Procedure Sector(x, y: Integer; StAngle,EndAngle, XRadius, YRadius: Word); Procedure SetWriteMode(WritMode : Integer); 9BB   # 3   # 3   # 3   #3   # 3   # 3   # 3   # 3   # 3   # 3   # 3   # 3   #3  # 3   # 3 # These are the routines implemented in the GemAES unit: See also: GemDecl, GemVDI, Graph appl_findappl_readappl_tplayappl_trecord appl_writeevnt_button evnt_dclick evnt_mesag evnt_mouseevnt_multievnt_timer form_alert form_centerform_dialform_doform_error fsel_exinputfsel_inputgraf_dragbox graf_growbox graf_handlegraf_mkstate graf_mousegraf_movebox graf_rubboxgraf_shrinkboxgraf_slidebox graf_watchbox menu_barmenu_icheckmenu_ienablemenu_register menu_textmenu_tnormalobjc_addobjc_change objc_deleteobjc_drawobjc_editobjc_find objc_offsetobjc_orderrsrc_gaddrrsrc_load rsrc_obfixrsrc_saddrscrp_readscrp_write shel_envrnshel_findshel_get shel_put shel_readshel_write wind_calcwind_close wind_createwind_deletewind_findwind_get wind_openwind_setwind_update Unit GemAES; INTERFACE Uses GemDecl; Const { EVENT manager definitions : } { Flags for evnt_multi : } MU_KEYBD= 1; { Wait for keyboard message } MU_BUTTON= 2;{ Wait for mouse button message } MU_M1= 4;{ Wait for mouse to enter/leave rectangle 1 } MU_M2= 8;{ Wait for mouse to enter/leave rectangle 2 } MU_MESAG= 16;{ Wait for a message to be ready in pipe } MU_TIMER= 32;{ Wait for timer message } { Keyboard states : } K_RSHIFT= 1; { Right key } K_LSHIFT= 2; { Left key } K_CTRL= 4;{ key } K_ALT= 8;{ key } { Message types : } MN_SELECTED = 10;{ Menu item selected } WM_REDRAW= 20; { Window redraw requested } WM_TOPPED= 21; { Window topped } WM_CLOSED= 22; { Window close "button" was hit } WM_FULLED= 23; { Window full "button" was hit } WM_ARROWED = 24;{ One of the slider bar arrows was hit } WM_HSLID= 25;{ Horizontal slider moved } WM_VSLID= 26;{ Vertical slider moved } WM_SIZED= 27;{ Window re-sized } WM_MOVED= 28;{ Window moved } WM_NEWTOP= 29; { New window on top (activated) } AC_OPEN= 40;{ Accessory opened } AC_CLOSE= 41;{ Accessory closed } { FORM Manager definitions } { Form flags (for form_dial) : } FMD_START= 0;{ Start form (reserve memory) } FMD_GROW= 1; { Draw "growing box" image } FMD_SHRINK = 2;{ Draw "shrinking box" image } FMD_FINISH = 3;{ Finish form (release memory) } { RESOURCE Manager Definitions } { Resource data structure types : } R_TREE= 0;{ An entire tree } R_OBJECT= 1; { An object } R_TEDINFO= 2;{ Text info block (TEDINFO) } R_ICONBLK= 3;{ Icon data block (ICONBLK) } R_BITBLK= 4; { Raster block (BITBLK) } R_STRING= 5; { String } R_IMAGEDATA = 6;{ Image } R_OBSPEC= 7; { Object specification } R_TEPTEXT= 8;{ Text } R_TEPTMPLT = 9;{ Text template } R_TEPVALID = 10;{ Text validation } R_IBPMASK= 11; { Icon display mask } R_IBPDATA= 12; { Icon bit map } R_IBPTEXT= 13; { Icon text string } R_BIPDATA= 14; { Pointer to bit mapped graphics } R_FRSTR= 15;{ Address of pointer to free string } R_FRIMG= 16;{ Address of pointer to free image } { WINDOW Manager Definitions } { Window elements : } NAME=1; { Window name field } CLOSER=2; { Close fields } FULLER=4; { Full field } MOVER=8; { Movable } INFO=16; { Info line } SIZER=32; { Size field } UPARROW=64; { UpArrow at vertical slider field } DNARROW= 128; { DownArrow at vertical slider field } VSLIDE= 256; { Vertical slider field } LFARROW= 512; { LeftArrow at horizontal slider field } RTARROW= 1024; { RightArrow at horizontal slider field } HSLIDE= 2048; { Horizontal slider } { wind_calc flags : } WC_BORDER= 0; { Calculate border area from known work area } WC_WORK= 1;{ Calculate work area from known border area } { wind_get flags } WF_KIND= 1;{ Window kind } WF_NAME= 2;{ Window name } WF_INFO= 3;{ Window info } WF_WORKXYWH = 4;{ Window work area x, y, w, h } WF_CURRXYWH = 5;{ Current border area x, y, w, h } WF_PREVXYWH = 6;{ Previous border area x, y, w, h } WF_FULLXYWH = 7;{ Max border area size x, y, w, h } WF_HSLIDE= 8; { Horizontal slider position [0..1000] } WF_VSLIDE= 9; { Vertical slider position [0..1000] } WF_TOP= 10;{ Active window's handle } WF_FIRSTXYWH= 11;{ First rectangle in rectangle list } WF_NEXTXYWH = 12;{ Next rectangle in rectangle list } WF_RESVD= 13;{ Reserved! } WF_NEWDESK = 14; WF_HSLSIZE = 15;{ Relative size of horizontal slider } WF_VSLSIZE = 16;{ Relative size of vertical slider } WF_SCREEN= 17; { wind_update flags } END_UPDATE = 0;{ End update } BEG_UPDATE = 1;{ Begin update } END_MCTRL= 2; { End mouse control } BEG_MCTRL= 3; { Begin mouse control } { GRAPHICS Manager Definitions } { Mouse Forms : } ARROW=0; { The normal arrow } TEXT_CRSR= 1; { Text cursor } BUSYBEE=2; { The busy bee } HOURGLASS= 2; { Same as BUSYBEE } POINT_HAND =3; { Pointing hand } FLAT_HAND= 4; { Flat hand } THIN_CROSS =5; { Thin cross } THICK_CROSS =6; { Thick cross } OUTLN_CROSS =7; { Outlined cross } USER_DEF= 255; { User defined mouse pattern } M_OFF= 256; { Turn mouse off } M_ON= 257; { Turn mouse on } { Graphic objects : } G_BOX= 20;{ A box } G_TEXT= 21;{ Text } G_BOXTEXT= 22; { Text within a box } G_IMAGE= 23;{ Raster image } G_USERDEF= 24; { User defined object } G_IBOX= 25;{ Invisible (transparent) box } G_BUTTON= 26;{ Centered text in a box } G_BOXCHAR= 27; { Char within a box } G_STRING= 28;{ Text (menu item) } G_FTEXT= 29;{ Formatted text } G_FBOXTEXT = 30;{ Text within a box } G_ICON= 31;{ Icon } G_TITLE= 32;{ Text (menu title) } { Object flags : } NONE=0; { No flags } SELECTABLE =1; { Object is selectable } DEFAULT=2; { Object is default } F_EXIT=4; { Object causes exit } EDITABLE=8; { Object is editable } RBUTTON= 16; { Object is radiobutton } LASTOB= 32; { Object is last in tree } TOUCHEXIT= 64; { Object touch causes exit } HIDETREE= 128; { Hide subordinate objects } INDIRECT= 256; { Object specification is a pointer } { Object states : } NORMAL= 0;{ Normal state } SELECTED= 1;{ Object is selected } CROSSED= 2;{ Object is crossed } CHECKED= 4;{ Object is checked } DISABLED= 8;{ Object is disabled } OUTLINED= 16;{ Object is outlined } SHADOWED= 32;{ Object is shadowed } { Object color numbers : } White= 0; Black= 1; Red= 2; Green= 3; Blue= 4; Cyan= 5; Yellow= 6; Magenta= 7; LWhite= 8; LBlack= 9; LRed= 10; LGreen= 11; LBlue= 12; LCyan= 13; LYellow= 14; LMagenta= 15; { Editable text field definitions : } EDSTART= 0; EDINIT= 1; EDCHAR= 2; EDEND= 3; { Editable text justification : } TE_LEFT= 0;{ Left justified } TE_RIGHT= 1; { Right justified } TE_CNTR= 2;{ Centered } { Scancodes for evnt_multi and evnt_keybd : } BackSpace = $0E08; Tab= $0F09; S_Delete = $537F; S_Insert = $5200; Shift_Ins = $5230; Return= $1C0D; Enter= $720D; Undo= $6100; Help = $6200; Home= $4700; Cur_Up= $4800; Cur_Down = $5000; Cur_Left = $4B00; Cur_Right = $4D00; Shift_Home= $4737; Shift_CU = $4838; Shift_CD = $5032; Shift_CL = $4B34; Shift_CR = $4D36; Esc= $011B; Ctrl_A = $1E01; Ctrl_B = $3002; Ctrl_C = $2E03; Ctrl_D = $2004; Ctrl_E = $1205; Ctrl_F = $2106; Ctrl_G = $2207; Ctrl_H = $2308; Ctrl_I = $1709; Ctrl_J = $240A; Ctrl_K = $250B; Ctrl_L = $260C; Ctrl_M = $320D; Ctrl_N = $310E; Ctrl_O = $180F; Ctrl_P = $1910; Ctrl_Q = $1011; Ctrl_R = $1312; Ctrl_S = $1F13; Ctrl_T = $1414; Ctrl_U = $1615; Ctrl_V = $2F16; Ctrl_W = $1117; Ctrl_X = $2D18; Ctrl_Y = $2C19; Ctrl_Z = $151A; Ctrl_1 = $0211; Ctrl_2 = $0300; Ctrl_3 = $0413; Ctrl_4 = $0514; Ctrl_5 = $0615; Ctrl_6 = $071E; Ctrl_7 = $0817; Ctrl_8 = $0918; Ctrl_9 = $0A19; Ctrl_0 = $0B10; Alt_A = $1E00; Alt_B = $3000; Alt_C = $2E00; Alt_D = $2000; Alt_E = $1200; Alt_F = $2100; Alt_G = $2200; Alt_H = $2300; Alt_I = $1700; Alt_J = $2400; Alt_K = $2500; Alt_L = $2600; Alt_M = $3200; Alt_N = $3100; Alt_O = $1800; Alt_P = $1900; Alt_Q = $1000; Alt_R = $1300; Alt_S = $1F00; Alt_T = $1400; Alt_U = $1600; Alt_V = $2F00; Alt_W = $1100; Alt_X = $2D00; Alt_Y = $2C00; Alt_Z = $1500; Alt_1 = $7800; Alt_2 = $7900; Alt_3 = $7A00; Alt_4 = $7B00; Alt_5 = $7C00; Alt_6 = $7D00; Alt_7 = $7E00; Alt_8 = $7F00; Alt_9 = $8000; Alt_0 = $8100; F1 = $3B00; F2 = $3C00; F3 = $3D00; F4 = $3E00; F5 = $3F00; F6 = $4000; F7 = $4100; F8 = $4200; F9 = $4300; F10 = $4400; Shift_F1 = $5400; Shift_F2 = $5500; Shift_F3 = $5600; Shift_F4 = $5700; Shift_F5 = $5800; Shift_F6 = $5900; Shift_F7 = $5A00; Shift_F8 = $5B00; Shift_F9 = $5C00; Shift_F10 = $5D00; { Language dependent scan codes : } Ctrl_AE= $2804; Ctrl_OE = $2714; Ctrl_UE= $1A01; Alt_AE= $285D; Alt_OE= $275B; Alt_UE = $1A40; SH_Alt_AE = $287D; SH_Alt_OE = $277B; SH_Alt_UE = $1A5C; Function GemError : Integer; (*** APPLICATION LIBRARY ***) Function appl_init: Integer; Function appl_find(Var ap_fpname): Integer; Function appl_trecord(Var ap_trmem; ap_trcount: Integer): Integer; Procedure appl_read(ap_rid, ap_rlength: Integer; Var ap_rpbuff); Procedure appl_write(ap_wid, ap_wlength: Integer; Var ap_wpbuff); Procedure appl_tplay(Var ap_tpmem; ap_tpnum, ap_tpscale: Integer); Procedure appl_exit; (*** EVENT LIBRARY ****) Function evnt_keybd: Integer; Function evnt_dclick(ev_dnew, ev_dgtest: Integer): Integer; Procedure evnt_mesag(Var ev_mgpbuff); Procedure evnt_timer(ev_tlocount, ev_thicount: Integer); Function evnt_multi( ev_mflags, ev_mbclicks, ev_mbmask, ev_mbstate, ev_mm1flags, ev_mm1x, ev_mm1y, ev_mm1width, ev_mm1height, ev_mm2flags, ev_mm2x, ev_mm2y, ev_mm2width, ev_mm2height: Integer; Var ev_mmgpbuff; ev_mtlocount, ev_mthicount: Integer; VAR ev_mmox, ev_mmoy, ev_mmobutton, ev_mmokstate, ev_mkreturn, ev_mbreturn: Integer): Integer; Function evnt_button(ev_bclicks, ev_bmask, ev_bstate: Integer; VAR ev_bmx,ev_bmy,ev_bmb,ev_bks: Integer): Integer; Procedure evnt_mouse(ev_moflags, ev_mox, ev_moy, ev_mowidth, ev_moheight: Integer; VAR ev_momx, ev_momy, ev_momb, ev_momks : Integer); (*** MENU LIBRARY ***) Procedure menu_bar(me_btree: Pointer; me_bshow: Integer); Procedure menu_icheck(me_ctree: Pointer; me_citem, me_ccheck: Integer); Procedure menu_ienable(me_etree: Pointer; me_eitem, me_eenable: Integer); Procedure menu_tnormal(me_ntree: Pointer; me_ntitle,me_nnormal: Integer); Procedure menu_text(me_ttree: Pointer; me_titem: Integer; Var me_ttext); Function menu_register(me_raccapid: Integer; Var me_rpstring): Integer; (*** OBJECT LIBRARY ***) Procedure objc_add(ob_atree: Pointer; ob_aparent, ob_achild: Integer); Procedure objc_delete(ob_dltree: Pointer; ob_dlobject: Integer); Procedure objc_draw(ob_dtree: Pointer;  ob_drstartob, ob_drdepth, ob_drxclip,  ob_dryclip, ob_drwclip, ob_drhclip: Integer); Function objc_find(ob_ftree: Pointer; ob_fstartob, ob_fdepth, ob_fmx, ob_fmy: Integer): Integer; Procedure objc_offset(ob_oftree: Pointer; ob_ofobject: Integer; VAR ob_ofxoff, ob_ofyoff: Integer); Procedure objc_order(ob_ortree: Pointer; ob_orobject, ob_ornewpos: Integer); Procedure objc_edit(ob_edtree: Pointer;  ob_edobject: Integer;  ob_edchar: Char;  ob_edidx, ob_edkind: Integer;  VAR ob_ednewidx: Integer); Procedure objc_change(ob_ctree: Pointer; ob_cobject, ob_cresvd, ob_cxclip, ob_cyclip, ob_cwclip, ob_chclip, ob_cnewstate, ob_credraw: Integer); (*** FORM LIBRARY ***) Function form_do(fo_dotree: Pointer; fo_dostartob: Integer): Integer; Function form_alert(fo_adefbttn: Integer; Var fo_aastring): Integer; Function form_error(fo_enum: Integer): Integer; Procedure form_center(fo_ctree: Pointer; VAR fo_cx, fo_cy, fo_cw, fo_ch: Integer); Procedure form_dial(fo_diflag, fo_dilx, fo_dily, fo_dilw,fo_dilh,  fo_dibigx, fo_dibigy,fo_dibigw, fo_dibigh: Integer); (*** GRAPHICS LIBRARY ****) Procedure graf_mouse(gr_monumber: Integer; gr_mofaddr: Pointer); Procedure graf_mkstate(VAR gr_mkmx,gr_mkmy,gr_mkmstate,gr_mkkstate: Integer); Procedure graf_rubbox(gr_rx, gr_ry, gr_rminwidth, gr_rminheight: Integer; VAR gr_rlastwidth, gr_rlastheight: Integer); Procedure graf_dragbox(gr_dwidth, gr_dheight, gr_dstx, gr_dsty, gr_dbndx, gr_dbndy, gr_dbndw, gr_dbndh: Integer; VAR gr_dfinx, gr_dfiny: Integer); Procedure graf_movebox(gr_mwidth, gr_mheight, gr_msrcex, gr_msrcey,gr_mdestx, gr_mdesty: Integer); Procedure graf_growbox(gr_gstx, gr_gsty, gr_gstwidth, gr_gstheight,gr_gfinx, gr_gfiny, gr_gfinwidth, gr_gfinheight: Integer); Procedure graf_shrinkbox(gr_sstx, gr_ssty, gr_sstwidth, gr_sstheight,gr_sfinx, gr_sfiny, gr_sfinwidth, gr_sfinheight: Integer); Function graf_watchbox(gr_wptree: Pointer; gr_wobject, gr_winstate, gr_woutstate: Integer): Integer; Function graf_slidebox(gr_slptree: Pointer; gr_slparent, gr_slobject, gr_slvh: Integer): Integer; Function graf_handle(VAR gr_hwchar, gr_hhchar, gr_hwbox, gr_hhbox: Integer): Integer; (*** SCRAP LIBRARY ****) Procedure scrp_read(Var sc_rpbuff); Procedure scrp_write(Var sc_wpbuff); (*** FILE SELECTOR LIBRARY ****) Procedure fsel_input(Var fs_iinpath, fs_iinsel; VAR fs_iexbutton: Integer); Procedure fsel_exinput(Var fs_iinpath, fs_iinsel; VAR fs_iexbutton: Integer; fs_label: Pointer); (*** WINDOW LIBRARY ***) Procedure wind_close(wi_clhandle: Integer); Procedure wind_delete(wi_dhandle: Integer); Function wind_find(wi_fmx, wi_fmy: Integer): Integer; Procedure wind_update(wi_ubegend: Integer); Procedure wind_new; Procedure wind_open(wi_ohandle, wi_owx, wi_owy, wi_oww, wi_owh: Integer); Function wind_create(wi_crkind, wi_crwx, wi_crwy, wi_crww, wi_crwh: Integer): Integer; Procedure wind_get(wi_ghandle, wi_gfield: Integer; VAR wi_gw1, wi_gw2, wi_gw3, wi_gw4: Integer); Procedure wind_set(wi_shandle, wi_sfield, wi_sw1, wi_sw2, wi_sw3, wi_sw4: Integer); Procedure wind_calc(wi_ctype, wi_ckind,wi_cx, wi_cy,  wi_cinwidth, wi_cinheight: Integer;  VAR wi_coutx, wi_couty, wi_coutwidth,  wi_coutheight: Integer); (*** RESOURCE LIBRARY ****) Procedure rsrc_load(Var re_lpfname); Procedure rsrc_free; Procedure rsrc_gaddr(re_gttype, re_gtindex: Integer; VAR re_gtaddr); Procedure rsrc_saddr(re_sttype, re_stindex: Integer; re_staddr: Pointer); Procedure rsrc_obfix(re_oobject: Integer; re_otree: Pointer); (*** SHELL LIBRARY ****) Procedure shel_read(Var sh_rpcmd, sh_rptail); Procedure shel_get(Var sh_gbuff; sh_glen: Integer); Procedure shel_put(Var sh_pbuff; sh_plen: Integer); Procedure shel_find(Var sh_fpbuff); Procedure shel_envrn(Var sh_epvalue : pointer; Var sh_eparm); Procedure shel_write(sh_wdoex, sh_wisgr, sh_wiscr: Integer; Var sh_wpcmd, sh_wptail); ( ( ((   These are the routines implemented in the GemDecl unit: BitTestEmptyRect HiPtr Intersect LoPtr MakeXYWH MakeXYXYMax Min See also: GemAES, GemVDI, Graph Unit GemDecl; INTERFACE Const { High-indices for arrays. Low-indice = 0 } control_max= 11; { Max size of control array } intin_max= 131; { Max size of intin array } intout_max= 139; { Max size of intout array } workout_max= 56; { Max size of workout array = 44+control_max } addrin_max= 15; { Max size of addrin array } addrout_max= 15; { Max size of addrout array } global_max= 14; { Max size of global array } pts_max= 144; { Max size of ptsin/ptsout arrays } Type { Parameter blocks } AES_param= Array[0..5] Of ^global_Array; { AES } VDI_param= Array[0..4] Of ^global_Array; { VDI } { Other strictly GEM-related arrays } global_Array = Array[0..global_max] Of Integer; control_Array = Array[0..control_max] Of Integer; intin_Array= Array[0..intin_max] Of Integer; intout_Array = Array[0..intout_max] Of Integer; ptsin_Array= Array[0..pts_max]Of Integer; ptsout_Array = Array[0..pts_max]Of Integer; addrin_Array = Array[0..addrin_max] Of Pointer; addrout_Array = Array[0..addrout_max] Of Pointer; workout_Array = Array[0..workout_max] Of Integer; { Multipurpose } Array_2= Array[0..1] Of Integer; Array_3= Array[0..2] Of Integer; Array_4= Array[0..3] Of Integer; Array_5= Array[0..4] Of Integer; Array_6= Array[0..5] Of Integer; Array_8= Array[0..7] Of Integer; Array_10= Array[0..9] Of Integer; Array_16= Array[0..15] Of Integer; Array_37= Array[0..36] Of Integer; { A graphic rectangle } GRect= Record  x,y,w,h: Integer End; Var { Global GEM & VDI arrays } AES_pb: AES_param;{ AES parameter block } VDI_pb: VDI_param;{ VDI parameter block } control: control_Array; { General arrays : } intin: intin_Array;{ Input parameters } intout: intout_Array;{ Output parameters } ptsin: ptsin_Array;{ VDI arrays : } ptsout: ptsout_Array; addrin: addrin_Array;{ AES arrays } addrout: addrout_Array; global: global_Array;{ Global information } Function Min(a,b: Integer): Integer; Function Max(a,b: Integer): Integer; Function HiPtr(VAR V): Integer; Function LoPtr(VAR V): Integer; Function BitTest(No: Integer; Value: LongInt): Boolean; Function Intersect(R1: GRect; VAR R2: GRect): Boolean; Function EmptyRect(R: GRect): Boolean; Procedure MakeXYXY(xywh: GRect; VAR xyxy: Array_4); Procedure MakeXYWH(xyxy: Array_4; VAR xywh: GRect); .;Gv #6 # 6 # 6  # 6   # 6   # 6   # 6   # 6   # 6   # 6  #6   # 6   #6  # 6   #6  # 6 #6  #6  #6# 6   # 6 #6 #6   # 6  #6 #6 # 6   # 6!!!# These are the routines implemented in the GemVDI unit: See also: GemAES, GemDecl, Graph vex_butvvex_curvvex_motvvex_timv vm_filenamevqf_attributesvqin_modevql_attributes vqm_attributesvqp_errorvqp_filmsvqp_state vqt_attributesvqt_extentvqt_fontinfovqt_name vqt_widthvq_cellarrayvq_chcellsvq_color vq_curaddressvq_extendvq_key_svq_mouse vq_tabstatusvro_cpyfmvrq_choicevrq_locator vrq_stringvrq_valuatorvrt_cpyfmvr_recfl vr_trnfmvsc_formvsf_colorvsf_interior vsf_perimetervsf_stylevsf_udpatvsin_mode vsl_colorvsl_ends vsl_typevsl_udsty vsl_widthvsm_choicevsm_colorvsm_height vsm_locatorvsm_string vsm_typevsm_valuator vsp_messagevsp_savevsp_statevst_alignment vst_colorvst_effectsvst_fontvst_height vst_load_fontsvst_pointvst_rotation vst_unload_fonts vswr_modevs_clipvs_colorvs_curaddress vs_palettev_arcv_barv_bit_image v_cellarrayv_circlev_clear_disp_listv_clrwk v_clsvwkv_clswk v_contourfillv_curdown v_curhomev_curleftv_currightv_curtext v_curupv_dspcurv_eeolv_eeos v_ellarcv_ellipsev_ellpiev_enter_cur v_exit_curv_fillareav_form_advv_get_pixel v_gtextv_hardcopyv_hide_cv_justified v_meta_extentsv_opnvwkv_opnwkv_output_window v_pieslicev_plinev_pmarkerv_rbox v_rfboxv_rmcurv_rvoffv_rvon v_show_cv_updwk v_write_meta Unit GemVDI; INTERFACE Uses GemDecl; Const  { Fill interior styles : } HOLLOW= 0;{ no fill } SOLID= 1;{ solid fill in current color } PATTERN= 2;{ bit pattern } HATCH= 3;{ hatch } UDFILLSTYLE= 4;{ user defined }  { Some fill patterns : } DOTS= 3; GRID= 6; BRICKS= 9; WEAVE= 16;  { PolyLine line styles : } { SOLID= 1;same as above } LDASHED= 2;{ ************.... bit layout } DOTTED= 3;{ ***.....***..... } DASHDOT= 4;{ *******...***... } DASHED= 5;{ ********........ } DASHDOTDOT = 6;{ ****...**..**... }  { PolyLine end styles : } SQUARED= 0; ARROWED= 1; ROUNDED= 2;  { Text effects : } NORMAL= 0;{ normal appearance } BOLD= 1;{ boldface } SHADED= 2;{ shaded } SKEWED= 4;{ italic } UNDERLINED = 8;{ underlined } OUTLINE= 16; { outlined } SHADOW= 32; { shadowed }  { Writing modes : } MD_REPLACE = 1;{ replace } MD_TRANS= 2; { transparent } MD_XOR= 3;{ XOR } MD_ERASE= 4; { erase }  { Bit-Blit flags : } ALL_WHITE = 0; S_AND_D= 1; S_AND_NOTD = 2; S_ONLY= 3; NOTS_AND_D = 4; D_ONLY= 5; S_XOR_D= 6; S_OR_D= 7; NOT_SORD= 8; NOT_SXORD = 9; NOT_D= 10; S_OR_NOTD = 11; NOT_S= 12; NOTS_OR_D = 13; NOT_SANDD = 14; ALL_BLACK = 15;  { Input modes : } REQUEST= 1;{ request mode } SAMPLE= 2;{ sample mode } Type MFDB = Record{ MFDB layout (MemoryForm) } mptr: Pointer;{ raster address } formwidth,{ width of raster in pixels } formheight,{ height of raster in pixels } widthword,{ width in terms of 16-bit words } formatflag,{ device specific/standard : 0/1 } memplanes,{ raster planes } res1,{ reserved... } res2, res3: Integer; End; String80 = String[80]; String125 = String[125]; {*** CONTROL FUNCTIONS ***} Procedure v_clswk(handle : Integer); Procedure v_clsvwk(handle : Integer); Procedure v_clrwk(handle : Integer); Procedure v_updwk(handle : Integer); Procedure vst_unload_fonts(handle, select : Integer); Procedure vs_clip(handle, clipflag: Integer; Var pxyarray : Array_4); Function vst_load_fonts(handle, select : Integer) : Integer; Procedure v_opnwk(workin: intin_Array; Var handle: Integer; Var workout : workout_Array); Procedure v_opnvwk(workin: intin_Array; Var handle: Integer; Var workout : workout_Array); {*** OUTPUT FUNCTIONS ***} Procedure v_pline(handle, count : Integer; Var pxyarray : ptsin_Array); Procedure v_pmarker(handle, count : Integer; Var pxyarray : ptsin_Array); Procedure v_gtext(handle, x, y : Integer; chstring : String80); Procedure v_fillarea(handle, count : Integer; Var pxyarray : ptsin_Array); Procedure v_contourfill(handle, x, y, index : Integer); Procedure vr_recfl(handle : Integer; Var pxyarray : Array_4); Procedure v_cellarray(handle: Integer; Var pxyarray: Array_4; rowlength, elused, numrows, wrtmode : Integer; Var colarray: intin_Array); {*** GDP 's ***} Procedure v_bar(handle : Integer; Var pxyarray : Array_4); Procedure v_arc(handle, x, y, radius, begang, endang : Integer); Procedure v_pieslice(handle, x, y, radius, begang, endang : Integer); Procedure v_circle(handle, x, y, radius : Integer); Procedure v_ellipse(handle, x, y, xradius, yradius : Integer); Procedure v_rbox(handle : Integer; Var xyarray : Array_4); Procedure v_rfbox(handle : Integer; Var xyarray : Array_4); Procedure v_ellarc(handle, x, y, xradius, yradius, begang, endang : Integer); Procedure v_ellpie(handle, x, y, xradius, yradius, begang, endang: Integer); Procedure v_justified(handle, x, y : Integer; gstring: String80; jlength, wordspace, charspace: Integer); {*** SET ATTRIBUTE FUNCTIONS ***} { In the proper GEM definition, most of the below procedures are defined as functions returning the actual mode set. This has a meaning, if the user requests a mode not available on the device. However, these function definitions have been changed to procedures in this library, because most - if not all - applications written for the ST will use the screen, and the programmer will most often be aware of the parameters, he can use to obtain the desired results. If the return values are desired, they can be found via the GemAES.GemError function, as most of them are returned in intout[0]. A few of them also return a value in ptsout[1], but consult a dedi- cated GEM book for a discussion of this. } Procedure vswr_mode(handle, mode : Integer); Procedure vs_color(handle, index : Integer; Var rgbin : Array_3); Procedure vsl_type(handle, style : Integer); Procedure vsl_udsty(handle, pattern : Integer); Procedure vsl_color(handle, colindex : Integer); Procedure vsl_ends(handle, begstyle, endstyle : Integer); Procedure vsm_type(handle, symbol : Integer); Procedure vsm_color(handle, colindex : Integer); Procedure vst_rotation(handle, angle : Integer); Procedure vst_font(handle, font : Integer); Procedure vst_color(handle, colindex : Integer); Procedure vst_effects(handle, effect : Integer); Procedure vsf_interior(handle, style : Integer); Procedure vsf_style(handle, styleindex : Integer); Procedure vsf_color(handle, colorindex : Integer); Procedure vsf_perimeter(handle, pervis : Integer); Procedure vsf_udpat(handle : Integer; Var pfillpat; planes : Integer); Procedure vr_trnfm(handle : Integer; Var psrcMFDB, pdesMFDB : MFDB); Procedure v_get_pixel(handle, x, y : Integer; Var pel, index : Integer); Procedure vsm_height(handle, height : Integer); Procedure vsl_width(handle, width : Integer); Procedure vst_height(handle, height: Integer; Var charwidth, charheight, cellwidth, cellheight: Integer); Procedure vst_point(handle, point: Integer;  Var charwidth, charheight, cellwidth, cellheight : Integer); Procedure vst_alignment(handle, horin, vertin : Integer; Var horout, vertout: Integer); {*** RASTER OPS ***} Procedure vro_cpyfm(handle, wrmode: Integer;  Var pxyarray: Array_8;  Var psrcMFDB, pdesMFDB : MFDB); Procedure vrt_cpyfm(handle, wrmode: Integer;  Var pxyarray: Array_8;  Var psrcMFDB, pdesMFDB : MFDB;  Var color_index: Array_2); {*** INPUT FUNCTIONS ***} Procedure vsin_mode(handle, devtype, mode : Integer); Procedure vrq_choice(handle, ch_in : Integer; Var ch_out : Integer); Procedure vsc_form(handle : Integer; Var pcurform: Array_37); Procedure v_show_c(handle, Reset : Integer); Procedure v_hide_c(handle : Integer); Procedure vq_key_s(handle : Integer; Var pstatus : Integer); Procedure vq_mouse(handle : Integer; Var pstatus, x, y : Integer); Function vsm_choice(handle : Integer; Var choice : Integer) : Integer; Procedure vrq_valuator(handle, valin: Integer; Var valout, term : Integer); Procedure vrq_locator(handle, x, y: Integer; Var xout, yout, term : Integer); Function vsm_locator(handle, x, y: Integer; Var xout, yout, term : Integer) : Integer; Procedure vsm_valuator(handle, valin: Integer; Var valout, term, status : Integer); Procedure vrq_string(handle, maxlen, echomode : Integer; Var echo_xy: Array_2; Var instring: String80); Function vsm_string(handle, maxlen, echomode : Integer;  Var echo_xy: Array_2;  Var instring: String80) : Integer; Procedure vex_timv(handle: Integer; timaddr: Pointer; Var otimaddr : Pointer; Var timconv: Integer); Procedure vex_butv(handle: Integer; pusrcode: Pointer; Var psavcode : Pointer); Procedure vex_motv(handle: Integer; pusrcode: Pointer; Var psavcode : Pointer); Procedure vex_curv(handle: Integer; pusrcode: Pointer; Var psavcode : Pointer); {*** INQUIRE FUNCTIONS ***} Procedure vq_extend(handle, owflag: Integer; Var workout : workout_Array); Procedure vql_attributes(handle : Integer; Var attrib : Array_6); Procedure vqm_attributes(handle : Integer; Var attrib : Array_5); Procedure vqf_attributes(handle : Integer; Var attrib : Array_5); Procedure vqt_attributes(handle : Integer; Var attrib : Array_10); Function vq_color(handle, colorindex, setflag: Integer; Var rgb: Array_3) : Integer; Procedure vqt_extent(handle: Integer; chstring: String80; Var extent : Array_8); Function vqt_width(handle: Integer; character: Char; Var cellwidth, leftdelta, rightdelta : Integer) : Integer; Function vqt_name(handle, elementnum : Integer; Var name: String80) : Integer; Procedure vq_cellarray(handle: Integer; Var pxyarray : Array_4; rowlen, numrows: Integer; Var elused, rowsused : Integer; status: Integer; Var colarray : intout_Array); Procedure vqin_mode(handle, dev_type : Integer;  Var inputmode: Integer); Procedure vqt_fontinfo(handle: Integer; Var minADE, maxADE: Integer; Var distances : Array_4; Var maxwidth: Integer; Var effects: Array_3); {***ESCAPES ***} Procedure vq_chcells(handle : Integer; Var rows, columns : Integer); Procedure v_exit_cur(handle : Integer); Procedure v_enter_cur(handle : Integer); Procedure v_curup(handle : Integer); Procedure v_curdown(handle : Integer); Procedure v_curright(handle : Integer); Procedure v_curleft(handle : Integer); Procedure v_curhome(handle : Integer); Procedure v_eeos(handle : Integer); Procedure v_eeol(handle : Integer); Procedure vs_curaddress(handle, row, column : Integer); Procedure v_curtext(handle : Integer; chstring : String80); Procedure v_rvon(handle : Integer); Procedure v_rvoff(handle : Integer); Procedure vq_curaddress(handle : Integer; Var row, column : Integer); Procedure v_hardcopy(handle : Integer); Procedure v_dspcur(handle, x, y : Integer); Procedure v_rmcur(handle : Integer); Procedure v_form_adv(handle : Integer); Procedure v_output_window(handle : Integer; Var xyarray : Array_4); Procedure v_clear_disp_list(handle : Integer); Procedure vqp_films(handle : Integer; Var filmnames : String125); Procedure vsp_save(handle : Integer); Procedure vsp_message(handle : Integer); Procedure v_meta_extents(handle, minx, miny, maxx, maxy : Integer); Procedure vm_filename(handle : Integer; filename: String80); Function vq_tabstatus(handle : Integer) : Integer; Function vs_palette(handle, palette : Integer) : Integer; Function vqp_error(handle : Integer) : Integer; Procedure vqp_state(handle: Integer;  Var port, filmname, lightness, interlace, planes : Integer;  Var indexes: Array_16); Procedure vsp_state(handle,  port,  filmnum,  lightness,  interlace,  planes: Integer;  Var indexes: Array_16); Procedure v_write_meta(handle, numintin : Integer; Var int_in: intin_Array; numptsin: Integer; Var pts_in: ptsin_Array); Procedure v_bit_image(handle: Integer; filename: String80; aspect, scaling, num_pts: Integer; Var xyarray: Array_4);  Function GemError : Integer; GemError returns the value of intout[0] which GEM uses to report error messages most of the time. See also: GemAES    * 5   Function appl_init : Integer; Initialize application and return application's identification. This call must be made before staring using GEM! See also: GemAES, appl_read, appl_write, appl_find, appl_tplay, appl_trecord, appl_exit =]    * 5  Procedure appl_read(ap_rid, ap_rlength : Integer;  Var ap_rpbuff); Read a number of bytes from the event buffer. ap_rpbuff: event buffer to read from ap_rid: receiving application's id ap_rlength : number of bytes to read See also: GemAES, appl_init, appl_write, appl_find, appl_tplay, appl_trecord, appl_exit ?`    ) 4  Procedure appl_write(ap_wid, ap_wlength : Integer; Var ap_wpbuff); Write a number of bytes to the event buffer. ap_wpbuff: event buffer to store in ap_wid: the receiving application's id ap_wlength : number of bytes to read See also: GemAES, appl_init, appl_read, appl_find, appl_tplay, appl_trecord, appl_exit     ) 5  Function appl_find(Var ap_fpname) : Integer; Find the application id of another application in the system. ap_fpname: points to a string ("C" format, null terminated) which have to be eight characters long, i.e. it might be necessary to fill up with spaces. The string is the application's file name Return value : application's id or -1 if not found See also: GemAES, appl_init, appl_read, appl_write, appl_tplay, appl_trecord, appl_exit :   ) 5   Procedure appl_tplay(Var ap_tpmem; ap_tpnum, ap_tpscale : Integer); Replay user actions. The AES is capable of recording user actions and "replaying" them. The latter is exactly what appl_tplay does : Replays a piece of a recording. ap_tpmem: address of recorded data ap_tpnum: number of actions to play ap_tpscale : play back speed : Range 0..10000 : 0 = slowest speed 10000 = highest speed 100 = normal speed See also: GemAES, appl_init, appl_read, appl_write, appl_find, appl_trecord, appl_exit m    ) 5  Function appl_trecord(Var ap_trmem; ap_trcount:Integer) : Integer; Records user actions. ap_trmem: address of recording buffer ap_trcount: max number of recordings, the buffer can hold = buffer size DIV 6 (size of a recording) Return value : the number of actions recorded See also: GemAES, appl_init, appl_read, appl_write, appl_find, appl_tplay, appl_exit    ) 5  Procedure appl_exit; Exit application. Should be done before returning to the GEM Desktop (or whatever invoked this application). See also: GemAES, appl_init, appl_read, appl_write, appl_find, appl_tplay, appl_trecord    , 8   Function evnt_keybd : Integer; Wait for keypress and return key's code. See also: GemAES, evnt_button, evnt_mouse, evnt_mesag, evnt_timer, evnt_multi, evnt_dclick L   + 7   Function evnt_button(ev_bclicks, ev_bmask, ev_bstate: Integer; VAR ev_bmx, ev_bmy, ev_bmb, ev_bks: Integer) : Integer; Wait for one or more mouse buttons to be pressed. GEM allows a mouse to have as many as 16 buttons, where each bit in ev_bmb represents a button. A set bit represents a pressed button. ev_bclicks : the number of mouse clicks GEM should look for, most often 1 or 2 = double click ev_bmask: the keys allowed to generate the event. A set bit represents a "legal" key ev_bstate: whether the in ev_bmask given keys should be : 0 = released or 1 = pressed in order to generate the event ev_bmb: returned mouse button state ev_bks: keyboard state (CTRL, ALT, etc.) ev_bmx, ev_bmy: mouse position at time of the "click" See also: GemAES, evnt_keybd, evnt_mouse, evnt_mesag, evnt_timer, evnt_multi, evnt_dclick f   , 8   Procedure evnt_mouse(ev_moflags, ev_mox, ev_moy, ev_mowidth, ev_moheight: Integer; VAR ev_momx, ev_momy, ev_momb, ev_momks: Integer); Wait for the mouse to enter or leave a rectangle. ev_moflags: entry/exit flag : 0 = leave; 1 = enter rect. ev_mox, ev_moy: rectangle specification : upper left corner ev_mowidth, ev_moheight : rectangle specification : height and width ev_momx, ev_momy: mouse position at event-time ev_momb: mouse button state at time of event. ev_momks: keyboard state at time of event. See also: GemAES, evnt_keybd, evnt_button, evnt_mesag, evnt_timer, evnt_multi, evnt_dclick    , 8   Procedure evnt_mesag(Var ev_mgpbuff); Wait for a report to be present in the message pipe. ev_mgpbuff : message pipe See also: GemAES, evnt_keybd, evnt_button, evnt_mouse, evnt_timer, evnt_multi, evnt_dclick +    , 8   Procedure evnt_timer(ev_tlocount, ev_thicount : Integer); Wait for a number of milliseconds. The period is given by the four-byte integer value formed by ev_thicount and ev_tlocount. ev_tlocount : low word ev_thicount : high word Total period time = ev_thicount * 2^16 + ev_tlocount milliseconds See also: GemAES, evnt_keybd, evnt_button, evnt_mouse, evnt_mesag, evnt_multi, evnt_dclick VAR time : LongInt; ... Write('How many milliseconds? '); ReadLn(time); evnt_timer(loword(time), hiword(time)); WriteLn('Here we are again...'); A A A A, A8 B B Function evnt_multi ( ev_mflags, ev_mbclicks, ev_mbmask, ev_mbstate, ev_mm1flags, ev_mm1x, ev_mm1y, ev_mm1width, ev_mm1height, ev_mm2flags, ev_mm2x, ev_mm2y, ev_mm2width, ev_mm2height : Integer; Var ev_mmgpbuff; ev_mtlocount, ev_mthicount: Integer; VAR ev_mmox, ev_mmoy, ev_mmobutton, ev_mmokstate, ev_mkreturn, ev_mbreturn: Integer ) : Integer; Wait for one or more events. This is one of the more tough ones! Unlike the other event procedures, evnt_multi allows for any kind of events to occur. The allowed events are given via ev_mflags : ev_mflagsCONSTevent type 1MU_KEYBDwait for keyboard event 2MU_BUTTONwait for mouse button event 4MU_M1wait for mouse to enter/leave one of two rectangles 8MU_M2wait for mouse to enter/leave the second of the two rectangles 16MU_MESAGwait for event message to be present 32MU_TIMERwait for timer event It is suggested for the reader to scan through the other event- procedures, as they give additional information about the para- meters to evnt_multi. ev_mbclicks: mouse button clicks required ev_mbmask: mouse button mask ev_mbstate: mouse button state ev_mm1flags: rectangle 1 entry/exit flag ev_mm1x, ev_mm1y, ev_mm1width, ev_mm1height: rectangle 1 The same layout applies to rectangle 2. ev_mmgpbuff: message pipe address ev_mtlocount, ev_mthicount: time in milliseconds ev_mmox, ev_mmoy: mouse (x,y) at event-time ev_mmobutton: mouse button pressed ev_mmokstate: keyboard state (SHIFT, CTRL etc.) ev_mkreturn: keyboard key pressed ev_mbreturn: number of mouse clicks Return value: "occurred-events" flag evnt_multi is one of the vital functions in a "normal" GEM application using menus, windows, dialog boxes etc. as it allows the user to generate a multitude of events, which the application then can dispatch easily. See also: GemAES, evnt_keybd, evnt_button, evnt_mouse, evnt_mesag, evnt_timer, evnt_dclick     , 8  Function evnt_dclick(ev_dnew, ev_dgtest : Integer) : Integer; Set double click speed. ev_dnew: new value or dummy ev_dgtest: set new speed or return current speed value? 0 = return current (ev_dnew is dummy) 1 = set new Return value : current speed/set speed See also: GemAES, evnt_keybd, evnt_button, evnt_mouse, evnt_mesag, evnt_timer, evnt_multi VAR currentspeed : Integer; ... currentspeed := evnt_dclick(0, 0); { return current speed } "+   . < Procedure menu_bar(me_btree : Pointer; me_bshow : Integer); Display or erase a menu bar. Should always be called before appl_exit. me_btree : menu tree me_bshow : show/erase flag : 0 = erase; 1 = show See also: GemAES, menu_icheck, menu_ienable, menu_tnormal, menu_text, menu_register %f    + 9 Procedure menu_icheck(me_ctree: Pointer; me_citem, me_ccheck : Integer); Check a menu item. me_ctree: menu tree me_citem: item to check me_ccheck : check flag : 0 = erase check mark 1 = set check mark See also: GemAES, menu_bar, menu_ienable, menu_tnormal, menu_text, menu_register %l    * 8 Procedure menu_ienable(me_etree: Pointer; me_eitem, me_eenable : Integer); Enable a menu item. me_etree: menu tree me_eitem: item to enable me_eenable : enable flag : 0 = disable entry 1 = enable entry See also: GemAES, menu_bar, menu_icheck, menu_tnormal, menu_text, menu_register   * 8  Procedure menu_tnormal(me_ntree: Pointer; me_ntitle, me_nnormal : Integer); Normalize a menu title-bar. me_ntree: menu tree me_ntitle: title index me_nnormal : normalize flag : 0 = reverse video 1 = normal video menu_tnormal is used after the application has completed doing an operation requested via a menu. In that case, the menu bar is still drawn in reverse video, so it has to be reset to normal video again. It can also be used to indicate to the user, that he selected a menu item from, say, the "Compile" menu when he pressed the Alt-C key, as in the HighSpeed Pascal shell. See also: GemAES, menu_bar, menu_icheck, menu_ienable, menu_text, menu_register   * 8  Procedure menu_text(me_ttree : Pointer;  me_titem : Integer;  Var me_ttext); Change the text of a menu item (me_titem) in a tree (me_ttree). Note that the string must be of same length as the old one, and that it must be globally declared (very important!). me_ttree : menu tree me_titem : string index me_ttext : address of new text ("C" format) See also: GemAES, menu_bar, menu_icheck, menu_ienable, menu_tnormal, menu_register     * 8 Function menu_register(me_raccapid : Integer; Var me_rpstring) : Integer; Register application as a desk accessory. me_raccapid : application id (from appl_init) me_rpstring : address of the "Desk" menu entry title string menu_register returns the accessory number [0..5] or -1 of no more accessory slots are available. See also: GemAES, menu_bar, menu_icheck, menu_ienable, menu_tnormal, menu_text 6T   + 6  " Procedure objc_add(ob_atree : Pointer; ob_aparent, ob_achild : Integer); Add a new object to an object tree. ob_atree: the object tree ob_aparent : parent object's index ob_achild: child object's index See also: GemAES, objc_delete, objc_draw, objc_find, objc_offset, objc_order, objc_edit, objc_change 2    ( 3  " Procedure objc_delete(ob_dltree: Pointer; ob_dlobject : Integer); Delete an object from an object tree. ob_dltree: object tree ob_dlobject : index of object to delete See also: GemAES, objc_add, objc_draw, objc_find, objc_offset, objc_order, objc_edit, objc_change 3  * 5   " Procedure objc_draw(ob_dtree: Pointer;  ob_drstartob, ob_drdepth,  ob_drxclip, ob_dryclip,  ob_drwclip, ob_drhclip: Integer); Draw part or whole of a tree, possibly clipped. ob_dtree: object tree ob_drstartob : index of starting object ob_drdepth: levels to be drawn ob_drxclip: clipping rectangle x ob_dryclip: y ob_drwclip: width ob_drhclip: height See also: GemAES, objc_add, objc_delete, objc_find, objc_offset, objc_order, objc_edit, objc_change c  * 5   " Function objc_find(ob_ftree: Pointer; ob_fstartob, ob_fdepth, ob_fmx, ob_fmy: Integer) : Integer; Determine, if an element of a given object tree is at the given coordinate. Mainly used for mouse selection. ob_ftree: object tree to check ob_fstartob: object index from where to start search ob_fdepth: levels to search ob_fmx, ob_fmy: coordinate to check Return value : -1 = no object found, otherwise object index See also: GemAES, objc_add, objc_delete, objc_draw, objc_offset, objc_order, objc_edit, objc_change     * 5   " Procedure objc_offset(ob_oftree: Pointer; ob_ofobject: Integer; VAR ob_ofxoff, ob_ofyoff: Integer); Object's offset relative to screen origin. ob_oftree: object tree ob_ofobject : object index ob_ofxoff: object x relative to screen ob_ofyoff: object y relative to screen See also: GemAES, objc_add, objc_delete, objc_draw, objc_find, objc_order, objc_edit, objc_change   * 5   # Procedure objc_order(ob_ortree: Pointer; ob_orobject, ob_ornewpos : Integer); Move a child object to a new position within its parent's child list. ob_ortree: object tree ob_orobject : index of object to move ob_ornewpos : new position : -1 = top 0 = bottom n = n from the bottom See also: GemAES, objc_add, objc_delete, objc_draw, objc_find, objc_offset, objc_edit, objc_change ^  * 5   $ Procedure objc_edit(ob_edtree: Pointer;  ob_edobject: Integer;  ob_edchar: Char;  ob_edidx, ob_edkind : Integer;  VAR ob_ednewidx: Integer); Let the user edit text in objects of types G_TEXT and G_BOXTEXT. ob_edtree: object tree ob_edobject : editable object's index ob_edchar: char typed by the user ob_edidx: next char position in raw text string ob_edkind: how objc_edit should behave : valueCONSToperation 0EDSTARTreserved! 1EDINITTEDINFO fields te_ptext and  te_ptmplt are combined into  a formatted string and the  text cursor is turned on 2EDCHARtest if char is contained  in te_ptext and display  string 3EDENDturn off text cursor ob_ednewidx : index of next char pos in raw string when objc_edit is finished See also: GemAES, objc_add, objc_delete, objc_draw, objc_find, objc_offset, objc_order, objc_change ;  * 5   $ Procedure objc_change(ob_ctree: Pointer; ob_cobject, ob_cresvd, ob_cxclip, ob_cyclip, ob_cwclip, ob_chclip, ob_cnewstate, ob_credraw : Integer); Change an object's state. ob_ctree: object tree ob_cobject: index of object to change ob_cresvd: reserved! Set to zero (0) ob_cxclip: clip rectangle coordinates : x ob_cyclip: y ob_cwclip: width ob_chclip: height ob_cnewstate : the new state value ob_credraw: redraw flag : 0 = no redraw; 1 = redraw object See also: GemAES, objc_add, objc_delete, objc_draw, objc_find, objc_offset, objc_order, objc_edit [    * 6 Function form_do(fo_dotree: Pointer; fo_dostartob : Integer) : Integer; Let the AES handle user input via a dialog box. fo_dotree: dialog box object tree fo_dostartob : starting text input field or 0 Return value : index of object that terminated input (e.g. OK button etc.) See also: GemAES, form_dial, form_alert, form_error, form_center w  ( 4 Procedure form_dial(fo_diflag, fo_dilx,  fo_dily, fo_dilw,  fo_dilh, fo_dibigx,  fo_dibigy, fo_dibigw,  fo_dibigh: Integer); Dialog form handling. Contains four different functions : fo_diflag : operation to perform : valueCONSToperation 0FMD_STARTreserve memory for dialog box 1FMD_GROWdraw growing box outline 2FMD_SHRINKdraw shrinking box outline 3FMD_FINISHrelease dialog box memory fo_dilx, fo_dily: growing/shrinking rectangle's smallest size (x,y) fo_dilw: width fo_dilh: height fo_dibigx, fo_dibigy : growing/shrinking rectangle's largest size (x,y) fo_dibigw : width fo_dibigh : height See also: GemAES, form_do, form_alert, form_error, form_center   ' 3 Function form_alert(fo_adefbttn : Integer;  Var fo_aastring) : Integer; Display an alert box. fo_adefbttn : The default key number; i.e. the one with the thick border around. If 0 then there is no default key. fo_aastring : The address of the string to be output. Note that it must be presented as "C" format, that is, no length element, and it must end with #00. The returned value is the index of the key that terminated the dialog box. The string format is as follows: '[a][b][c]' where : a = 0..3 = the icon to be shown; 0 = no icon; 1 = '!' icon; 2 = '?' icon; 3 = 'STOP' icon. b = the string; c = the keys. The string can contain more lines; they are separated by '|', and so are the different keys, as shown in the examples below : See also: GemAES, form_do, form_dial, form_error, form_center VAR s: String; key : Integer; ... s := '[0][This is a one-line alert][ Ok ]' + #00; key := form_alert(1, addr(s[1])); { Note how the string-length element (s[0]) is skipped in the addr() expression } s := '[1][ This is a multi-line alert | with an icon |' + ' and 3 keys][ Great! | Oh yeah? | So what?! ]' + #00; key := form_alert(2, addr(s[1]));   ' 3 Function form_error(fo_enum : Integer) : Integer; Display an alert box with a TOS error code (fo_enum) in it. See also: GemAES, form_do, form_dial, form_alert, form_center $^    ' 3 Procedure form_center(fo_ctree: Pointer; VAR fo_cx, fo_cy, fo_cw, fo_ch: Integer); Center object tree's representation on screen. fo_ctree: the object tree fo_cx, fo_cy : upper left corner fo_cw, fo_ch : width and height See also: GemAES, form_do, form_dial, form_alert, form_error f   ! /   * 9   Procedure graf_rubbox(gr_rx, gr_ry, gr_rminwidth, gr_rminheight : Integer; VAR gr_rlastwidth, gr_rlastheight: Integer); Draw a "rubber box". The upper left corner is set (used on the GEM desktop to select more than one file). graf_rubbox must be called with the mouse button pressed, as the procedure is ended when the user releases the button. gr_rx: upper left corner x of rectangle gr_ry: upper left corner y of rectangle gr_rminwidth: smallest allowed width of rectangle gr_rminheight: smallest allowed height of rectangle gr_rlastwidth: final width of rectangle gr_rlastheight : final height of rectangle See also: GemAES, graf_dragbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_handle, graf_mouse, graf_mkstate CONST minW = 10; minH = 20; VAR mouseX, mouseY, mouseButton : Integer;{ mouse info} boxW, boxH: Integer;{ rubber box w, h } ... { wait for user to press button : } REPEAT vq_mouse(VDI_handle, mouseButton, mouseX, mouseY) UNTIL mouseButton = 1;{ 1 = button pressed } { drag the box : } graf_rubbox(mouseX, mouseY, minW, minH, boxW, boxH); |    .   * 9   Procedure graf_dragbox(gr_dwidth, gr_dheight, gr_dstx, gr_dsty, gr_dbndx, gr_dbndy, gr_dbndw, gr_dbndh: Integer; VAR gr_dfinx, gr_dfiny : Integer); Drag (move) a rectangle within another rectangle. gr_dwidth: movable rectangle's width gr_dheight : height gr_dstx: starting x position gr_dsty: starting y position gr_dbndx: surrounding rectangle's x gr_dbndy: y gr_dbndw: width gr_dbndh: height gr_dfinx: movable rectangle's finish x position gr_dfiny: finish y position See also: GemAES, graf_rubbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_handle, graf_mouse, graf_mkstate     .   * 9   Procedure graf_movebox(gr_mwidth, gr_mheight, gr_msrcex, gr_msrcey, gr_mdestx, gr_mdesty: Integer); Move box. The AES will all by it self make a rectangle of constant size move from one screen area to the other - fastly! gr_mwidth: rectangle's width gr_mheight : height gr_msrcex: start x (upper left corner) gr_msrcey: start y gr_mdestx: end x(upper left corner) gr_mdesty: end y See also: GemAES, graf_rubbox, graf_dragbox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_handle, graf_mouse, graf_mkstate graf_movebox(10,10, 100,120, 600,380); moves a rectangle of size 10 * 10 from position (100,120) to position (600,380).     .   * 9   Procedure graf_growbox(gr_gstx, gr_gsty, gr_gstwidth, gr_gstheight, gr_gfinx, gr_gfiny, gr_gfinwidth, gr_gfinheight : Integer); Draw a "growing box" outline. Its appearance should be quite familiar, as this procedure is used in the GEM desktop when opening a window. gr_gstx, gr_gsty: upper left corner of smallest box gr_gstwidth: width of smallest box gr_gstheight: height of smallest box gr_gfinx, gr_gfiny: upper left corner of largest box gr_gfinwidth: width of largest box gr_gfinheight : height of largest box See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_handle, graf_mouse, graf_mkstate graf_growbox (310,190,20,20, 0,0,640,400); { grow... } graf_shrinkbox(310,190,20,20, 0,0,640,400); { ...and shrink } /    .   ( 7   Procedure graf_shrinkbox(gr_sstx, gr_ssty, gr_sstwidth, gr_sstheight, gr_sfinx, gr_sfiny, gr_sfinwidth, gr_sfinheight : Integer); Draw shrinking box outline. This is the reverse to graf_growbox. gr_sstx, gr_ssty: upper left corner coordinates of large box gr_sstwidth: width gr_sstheight: height gr_sfinx, gr_sfiny: upper left corner coordinates of small box gr_sfinwidth: width gr_sfinheight : height See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_growbox, graf_watchbox, graf_slidebox, graf_handle, graf_mouse, graf_mkstate     .  ) 8   Function graf_watchbox(gr_wptree : Pointer; gr_wobject, gr_winstate, gr_woutstate : Integer) : Integer; Watch if the mouse enters or leaves a rectangle. The rectangle mentioned above represents an object which will have its state changed accordingly if the mouse button is re- leased. gr_wptree: parent tree gr_wobject: object's index gr_winstate: object's state at entering the rectangle gr_woutstate : object's state when leaving the rectangle Return value : was the mouse inside the rectangle when the button was released? 0 = no; 1 = yes See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_slidebox, graf_handle, graf_mouse, graf_mkstate     .  ) 8   Function graf_slidebox(gr_slptree: Pointer; gr_slparent, gr_slobject, gr_slvh : Integer): Integer; Slide a rectangle within another rectangle with the mouse. Both rectangles (objects) are contained in a resource tree. Call with pressed mouse button only. gr_slptree: parent tree gr_slparent: parent index gr_slobject: movable object's index gr_slvh: direction flag : 0 = horizontal movement only 1 = vertical movement only Return value : movable rectangle's position relative to parent object's border See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_handle, graf_mouse, graf_mkstate 3    .  ) 8   Function graf_handle(VAR gr_hwchar, gr_hhchar, gr_hwbox, gr_hhbox : Integer) : Integer; Return graphics handle (VDI handle). graf_handle is used before a v_opnvwk (Open Virtual Workstation). The returned handle is the one used by all graphics operations. gr_hhchar : height of a character gr_hwchar : width of a character gr_hhbox: height of a character box gr_hwbox: width of a character box See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_mouse, graf_mkstate VAR VDI_handle: Integer; chW, chH, boxW, boxH : Integer; workIn: intin_Array; workOut: workout_Array; ... VDI_handle := graf_handle(chW, chH, boxW, boxH); v_opnvwk(workIn, VDI_handle, workOut); ... v_gtext(VDI_handle, 100,200, 'HighSpeed Pascal is super!'#00); A    .  ) 8   &Procedure graf_mouse(gr_monumber : Integer; gr_mofaddr : Pointer); Change mouse shape. gr_monumber : mouse shape index : valueCONSTshape 0ARROWarrow 1TEXT_CRSRtext cursor 2BUSYBEEthe busy bee 2HOURGLASSalso the busy bee 3POINT_HANDpointing hand 4FLAT_HANDflat hand 5THIN_CROSSthin cross 6THICK_CROSSthick cross 7OUTLN_CROSSoutlined cross 255USER_DEFuser defined shape 256M_OFFturn mouse off 257M_ONturn mouse on gr_mofaddr: mouse form address (or NIL for standard shape) See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_handle, graf_mkstate, vsc_form graf_mouse(BUSYBEE, NIL);{ set bee shape} graf_mouse(M_OFF, NIL);{ turn mouse off } graf_mouse(M_ON, NIL);{ turn it back on } graf_mouse(ARROW, NIL);{ arrow shape} graf_mouse(USER_DEF, addr(MyMouse)); { set user mouse }    .  ) 8   Procedure graf_mkstate(VAR gr_mkmx, gr_mkmy, gr_mkmstate, gr_mkkstate : Integer); Return current mouse position, mouse button status and keyboard status. gr_mkmx: mouse x gr_mkmy: mouse y gr_mkmstate : mouse button status gr_mkkstate : keyboard status : SHIFT left, right, CTRL and ALT See also: GemAES, graf_rubbox, graf_dragbox, graf_movebox, graf_growbox, graf_shrinkbox, graf_watchbox, graf_slidebox, graf_handle, graf_mouse   Procedure scrp_read(Var sc_rpbuff); Read scrap directory from clipboard. sc_rpbuff : address of buffer into which the scrap directory is read See also: GemAES, scrp_write   Procedure scrp_write(Var sc_wpbuff); Write scrap directory to clipboard. sc_wpbuff : address of buffer holding the scrap directory See also: GemAES, scrp_read    Procedure fsel_input(Var fs_iinpath, fs_iinsel; VAR fs_iexbutton: Integer); File selector input. fs_iinpath: default search path/chosen path : #00 terminated fs_iinsel: default file name/chosen name : #00 terminated fs_iexbutton : OK or CANCEL key code : 0 = CANCEL 1 = OK After using fsel_input, you can't just add the two strings, fs_iinpath and fs_iinsel, to obtain a full file name, as two obstructions lay in the way : The #00 string terminators, and the search pattern at the end of the path (e.g. "*.PAS"), so they have to be stripped off first as the example below shows. See also: GemAES, fsel_exinput VAR path: String; name: String[13];{ filename.ext + #00 } code: Integer; fullname : String; i: Integer; ... path := 'D:\PASCAL\SOURCE\*.PAS'#00; name := 'MYPROG.PAS'#00; fsel_input(addr(path[1]), addr(name[1]), code); IF code = 1 THEN BEGIN{ OK button } path[0] := #255;{ fool Pos into believing, we're } { dealing with a big string} path[0] := Chr(Pos(#00, path)-1); { set length} WHILE path[ Length(path) ] <> '\' DO Delete(path, Length(path), 1);{ remove search } { pattern} { now, path contains the "pure" path} name[0] := #255; name[0] := Chr(Pos(#00, name)-1);{ set length } fullname := path + name; { full file specification is now present in fullname} END ELSE { CANCEL button } ; A few "tricks" are used above : First of all, the length of the path string is set to 255 (path[0] := #255) so that the Pos function used below doesn't all of a sudden stops working in the middle of the path string because it believes that the string has an (undefined) length. With a such string length of 255 chars, Pos is guaranteed to find the #00 string terminator, which is used for determining the length of the string. After that, the search pattern is stripped off (e.g. "*.PAS"). Next, the length of the file name is determined, and finally added together with the path to create a full file name. This method has the disadvantage of corrupting the two variables path and name. /  Procedure fsel_exinput(Var fs_iinpath, fs_iinsel; Var fs_iexbutton: Integer; Var fs_label); Extended file selector input. Instead of writing "ITEM SELECTOR" in the file selector box, a user defined message such as "INPUT FILE", "OUTPUT FILE" etc. is written. Requires TOS 1.4. fs_iinpath: default search path/chosen path fs_iinsel: default file name/chosen name fs_iexbutton : exit button : OK (1) or CANCEL (0) fs_label: address of title string (max. 30 chars) See also: GemAES, fsel_input 0 ! ! ! !* !7" " " "- "8Function wind_create(wi_crkind, wi_crwx, wi_crwy, wi_crww, wi_crwh : Integer) : Integer; Create window. Sets type of window border elements and its maximum size. wi_crkind: window border elements : valueCONSTelement type 1NAMEname bar 2CLOSERclose box 4FULLERfull box 8MOVERmovable 16INFOinfo line 32SIZERsize box 64UPARROWup arrow box 128DNARROWdown arrow box 256VSLIDEvertical slider 512LFARROWleft arrow 1024RTARROWright arrow 2048HSLIDEhorizontal slider wi_crwx: upper left corner x of border rectangle wi_crwy: y wi_crww: width wi_crwh: height Return value : window handle or < 0 if no more windows are avail- able See also: GemAES, wind_open, wind_close, wind_delete, wind_get, wind_set, wind_find, wind_update, wind_calc, wind_new VAR window : Integer; ... window := wind_create(NAME + CLOSER + SIZER, 10,20,400,250); IF window < 0 THEN WriteLn('No more windows available!'); creates a window with a NAME bar, a CLOSE box being sizable with upper left corner at (10,20), width of 400 and height of 250.     , 9   - 8Procedure wind_open(wi_ohandle,  wi_owx, wi_owy,  wi_oww, wi_owh: Integer); Open window, i.e. draw it on the screen. wi_ohandle : window handle from wind_create wi_owx: upper left corner x of border rectangle wi_owy: y wi_oww: width wi_owh: height A window can never be opened with a larger size than that given to wind_create. See also: GemAES, wind_create, wind_close, wind_delete, wind_get, wind_set, wind_find, wind_update, wind_calc, wind_new VAR window : Integer; ... window := wind_create(0, 100,100,100,100); { create window } IF window >= 0 THEN BEGIN wind_open(window, 100,100,100,100);{ open with max size } { another example would be this : wind_open(window, 150,150,50,50); upper left corner at (150,150), width and height = 50 but the following would merely result in a max. size draw : wind_open(window,0,0,640,400); upper left = (100,100); width and height = 100 } Zc    + 8   - 8Procedure wind_close(wi_clhandle : Integer); Close window, i.e. remove it from the screen. wi_clhandle : window handle (from wind_create) See also: GemAES, wind_create, wind_open, wind_delete, wind_get, wind_set, wind_find, wind_update, wind_calc, wind_new wind_close(MyTextWindow); wind_close should always be called before a wind_delete.     + 7   - 8Procedure wind_delete(wi_dhandle : Integer); Delete window, i.e. release memory and window handle. wi_dhandle : window handle from wind_create See also: GemAES, wind_create, wind_open, wind_close, wind_get, wind_set, wind_find, wind_update, wind_calc, wind_new wind_close(MyTextWindow);{ remove from screen } wind_delete(MyTextWindow);{ and memory} wind_delete should never be called before a wind_close. z & & & &+ &7 ' ' ' '- '8Procedure wind_get(wi_ghandle, wi_gfield : Integer; VAR wi_gw1, wi_gw2, wi_gw3, wi_gw4 : Integer); Return information about a window (or the desktop). wi_ghandle : window handle wi_gfield: desired information type : valueCONST information returned 1WF_KINDwindow kind 2WF_NAMEwindow name 3WF_INFOinfo line 4WF_WORKXYWHcurrent work area x, y, w, h 5WF_CURRXYWHcurrent border x, y, w, h 6WF_PREVXYWHprevious border x, y, w, h 7WF_FULLXYWHlargest possible border xywh 8WF_HSLIDEhorizontal slider position 9WF_VSLIDEvertical slider position 10WF_TOPactive window's handle 11WF_FIRSTXYWHfirst rectangle from list 12WF_NEXTXYWHnext rectangle from list 13WF_RESVDreserved! 14WF_NEWDESKnew desktop background 15WF_HSLSIZEsize of horizontal slider 16WF_VSLSIZEsize of vertical slider 17WF_SCREEN wi_gw1, wi_gw2, wi_gw3, wi_gw4: return values (operation dependent) A handle of 0 denotes the desktop. Slider measurements are in relative units : 1..1000. See also: GemAES, wind_create, wind_open, wind_close, wind_delete, wind_set, wind_find, wind_update, wind_calc, wind_new VAR x, y, w, h, dummy, window : Integer; { determine maximum possible size, a window can have (useful if } { an application is to run in more resolutions) :} wind_get(0, WF_FULLXYWH, x, y, w, h); { get the position of the vertical slider :} wind_get(window, WF_VSLIDE, x, dummy, dummy, dummy); @    + 7    - 8Procedure wind_set(wi_shandle, wi_sfield, wi_sw1, wi_sw2, wi_sw3, wi_sw4: Integer); Set new window information (title, info line, border appearance etc.). wi_shandle : window handle wi_sfield: set operation required wi_sw1, wi_sw2, wi_sw3, wi_sw4: new values (operation dependent) See also: GemAES, wind_create, wind_open, wind_close, wind_delete, wind_get, wind_find, wind_update, wind_calc, wind_new VAR window : Integer; wname : String; ... window := wind_create(NAME, 100,100,200,200); wname := ' Yeahooo! ' + #00 + #00; { requires two #00 ! } wind_set(window, WF_NAME, HiPtr(wname[1]), LoPtr(wname[1]), 0,0); { set the window title. should be done before opening window } { to avoid flicker } wind_open(window, 100,100,200,200); Xz   + 7    , 7Function wind_find(wi_fmx, wi_fmy : Integer) : Integer; Find window at the given coordinates. wi_fmx, wi_fmy : coordinates to check Return value: 0 = no window; <> 0 = window handle This procedure is mainly used when the mouse is clicked somewhere on the screen, and the application wants to determine, if it's to top a window. See also: GemAES, wind_create, wind_open, wind_close, wind_delete, wind_get, wind_set, wind_update, wind_calc, wind_new VAR x, y, window_handle : Integer; ... window_handle := wind_find(x, y); IF window_handle = 0 THEN NoWindow ELSE TopMyWindow(window_handle);     + 7   * 5Procedure wind_update(wi_ubegend : Integer); Send window update message to the AES. wi_ubegend : message type : valueCONSTfunction 0END_UPDATEend window update 1BEG_UPDATEbegin window update 2END_MCTRLend mouse control 3BEG_MCTRLbegin mouse control The term "update" covers an application's wish to be let alone while it's reconstructing the screen area, whereas "mouse con- trol" is the way of saying to the AES, that the user controls, what's going on. See also: GemAES, wind_create, wind_open, wind_close, wind_delete, wind_get, wind_set, wind_find, wind_calc, wind_new wind_update(BEG_UPDATE);{ do screen recreation} ... wind_update(END_UPDATE);{ completed } ... wind_update(END_MCTRL);{ disallow AES mouse actions} { now the application is on its own - mouse actions won't } { interfere anymore} wind_update(BEG_MCTRL);{ allow the AES to handle mouse } { actions again} Yl    + 7    * 7Procedure wind_calc(wi_ctype, wi_ckind,  wi_cx, wi_cy,  wi_cinwidth, wi_cinheight: Integer;  VAR wi_coutx, wi_couty, wi_coutwidth, wi_coutheight : Integer); Calculate window size. As a window can be viewed at as consisting of two rectangles, the border rectangle and the work rectangle, and as an intimate relation- ship between these two sizes exists, it is possible to calculate the one rectangle if the second is known together with the border elements. wi_ctype: type of operation : valueCONSTcalculates 0WC_BORDERborder rectangle 1WC_WORKwork area rectangle wi_ckind: border elements : NAME, CLOSER etc. wi_cx, wi_cy: upper left corner of known rectangle wi_cinwidth: width wi_cinheight: height wi_coutx, wi_couty: upper left corner of unknown rectangle wi_coutwidth: width wi_coutheight : height See also: GemAES, wind_create, wind_open, wind_close, wind_delete, wind_get, wind_set, wind_find, wind_update, wind_new Assume we've just created a window, and wants to know the work area rectangle : VAR window: Integer; x, y, w, h : Integer;{ work area size } ... window := wind_create(NAME + CLOSER + UPARROW + DNARROW, 10, 10, 200, 200); wind_calc(WC_WORK, NAME + CLOSER + UPARROW + DNARROW, 10, 10, 200, 200, x, y, w, h); { now we know the size of the work area, so now we can clear it, } { set clipping rectangle etc.}    + 7    * 7 Procedure wind_new; Reset internal GEM information. Clears all "left-over" information about the GEM appearance, e.g. the number of v_show_c calls, window handles, etc. Used in shells when the shell wants to make absolutely sure, that its state is what it expects it to be when an applications has been run from the shell and returns. Requires TOS 1.4 or higher. See also: GemAES, wind_create, wind_open, wind_close, wind_delete, wind_get, wind_set, wind_find, wind_update, wind_calc VX   * 6 Procedure rsrc_load(Var re_lpfname); Load a resource file with the name pointed to by re_lpfname. Remember that it must end in #00 ("C" convention). See also: GemAES, rsrc_free, rsrc_gaddr, rsrc_saddr, rsrc_obfix VAR resource_name : String; ... resource_name := 'MYPROG.RSC'#00; rsrc_load( addr(resource_name[1]) ); { note [1] index }    * 6 Procedure rsrc_free; Release memory allocated to the resource file. Well-behaved programs uses this procedure to release the resource memory when they're through using it. See also: GemAES, rsrc_load, rsrc_gaddr, rsrc_saddr, rsrc_obfix d" " " ") "5 Procedure rsrc_gaddr(re_gttype, re_gtindex : Integer; VAR re_gtaddr: Pointer); Get resource data structure address. Used for determining e.g. a menu tree's address. re_gttype: type of data structure : valueCONSTobject type 0R_TREEtree 1R_OBJECTobject 2R_TEDINFOTEDINFO block 3R_ICONBLKICONBLK block 4R_BITBLKBITBLK block 5R_STRINGstring/text 6R_IMAGEDATA image data 7R_OBSPECobject specification 8R_TEPTEXTtext/string 9R_TEPTMPLTtext template 10R_TEPVALIDtext input validator 11R_IBPMASKicon display mask 12R_IBPDATAicon bit map 13R_IBPTEXTicon text 14R_BIPDATAbit-mapped graphics 15R_FRSTRfree string 16R_FRIMGfree bit-mapped graphics re_gtindex : object index re_gtaddr: data structure address See also: GemAES, rsrc_load, rsrc_free, rsrc_saddr, rsrc_obfix Assume, that we've created a resource file with a menu tree containing two menus, DESK and FILE. Now we want to determine the address of the FILE tree : CONST DESK_MENU = 0; FILE_MENU = 1; { menu index, randomly chosen for this example } VAR address: Pointer; ... rsrc_load... rsrc_gaddr(R_TREE, FILE_MENU, address); 7X    ) 5 Procedure rsrc_saddr(re_sttype, re_stindex : Integer; re_staddr: Pointer); Set the address of a resource object. re_sttype: data structure type. See rsrc_gaddr re_stindex : index of element to be changed re_staddr: address of new structure See also: GemAES, rsrc_load, rsrc_free, rsrc_gaddr, rsrc_obfix     ) 5 Procedure rsrc_obfix(re_oobject : Integer; re_otree : Pointer); Convert object's coordinates from char coordinates to pixel coordinates. re_oobject : object to fix re_otree: object tree See also: GemAES, rsrc_load, rsrc_free, rsrc_gaddr, rsrc_saddr p    * 6 Procedure shel_read(Var sh_rpcmd, sh_rptail); Identify command invoking this application. sh_rpcmd: address of area where to put command part of command line (string is in "C" format) sh_rptail : address of area where to put arguments from the command line (string is in Pascal format!!!) See also: GemAES, shel_write, shel_find, shel_envrn, shel_get, shel_put    ) 5 Procedure shel_write(sh_wdoex, sh_wisgr, sh_wiscr : Integer; Var sh_wpcmd, sh_wptail); Run another application or return to the desktop when the user exits the current application. sh_wdoex: what to do when the user exits this application : 0 = exit to desktop 1 = run another application sh_wisgr: is the next application a graphic application? 0 = no (TOS/TTP);1 = yes (PRG/APP) sh_wiscr: is it an AES application? 0 = no;1 = yes Note : is currently ignored on the ST; set to zero sh_wpcmd: address of string containing the next application's filename (remember, "C" format so add #0) sh_wptail : address of string containing the next application's parameters, but this time it's in Pascal format!!! See also: GemAES, shel_read, shel_find, shel_envrn, shel_get, shel_put *>    * 5 Procedure shel_get(Var sh_gbuff; sh_glen : Integer); Read data from the internal AES shell buffer into our own buffer. sh_gbuff : address of our buffer (size >= 4192 bytes (strange size!)) sh_glen: length of the buffer See also: GemAES, shel_read, shel_write, shel_find, shel_envrn, shel_put Fk    * 5 Procedure shel_put(Var sh_pbuff; sh_plen : Integer); Put data into the internal AES shell buffer. sh_pbuff : address of our own buffer sh_plen: bytes to write to the AES buffer on old TOS (<1.4) max 1024 bytes on new TOS (>= 1.4) max 4192 bytes See also: GemAES, shel_read, shel_write, shel_find, shel_envrn, shel_get {    * 6 Procedure shel_find(Var sh_fpbuff); Search for a file in the current directory and in all directories in the path. Returns full DOS specification. sh_fpbuff : address of filename to search for ("C" format). Will also contain the full DOS specification at return. Must be at least 81 characters long. See also: GemAES, shel_read, shel_write, shel_envrn, shel_get, shel_put  Procedure shel_envrn(Var sh_epvalue:pointer; Var sh_eparm); Search for a DOS environment string. sh_epvalue : pointer to address pointing to the first character following the parameter string sh_eparm: the parameter string to search for ("C" format)  Function Min(a, b : Integer) : Integer; Return the smallest number of a and b. See also: GemDecl, Max a := min(5,2)returns a = 2.  Function Max(a, b : Integer) : Integer; Return the largest number of a and b. See also: GemDecl, Min a := max(20,40) returns a = 40. vv Function HiPtr(VAR v) : Integer; Return the high-word of v's address. See also: GemDecl, LoPtr hi_word := HiPtr(a) !!  Function LoPtr(VAR v) : Integer; Return the low-word of v's address. HiPtr and LoPtr especially find their use with GemAES.wind_set, as it - depending on how it is called - requires a four-byte address in the form of two two-byte integers. See also: GemDecl, HiPtr lo_word := LoPtr(a)  Function BitTest(No : Integer; Value : LongInt) : Boolean; Test if bit No in Value is set. See also: GemDecl IF BitTest(3, 200) THEN WriteLn('Bit 3 set') ELSE WriteLn('Bit 3 clear')    Function Intersect(r1 : GRect;VAR r2 : GRect) : Boolean; Test if two rectangles intersect (have an area in common). Used for window redraws. r2's contents are changed to hold the resulting rectangle, and hence contains junk if no intersection was found. See also: GemDecl, EmptyRect PROGRAM Itersection; Uses GemDecl; VAR r1, r2 : GRect; BEGIN r1.x := 10; r1.y := 10; r1.w := 200; r1.h := 100; r2.x := 125; r2.y := 55; r2.w := 100; r2.h := 100; IF Intersect(r1, r2) THEN WITH r2 DO WriteLn('Intersection : x=', x, ' y=', y, ' w=', w,' h=', h) ELSE WriteLn('No intersection!') END. produces as output : Intersection : x=125 y=55 w=85 h=55   Function EmptyRect(r : GRect) : Boolean; Test if the rectangle r is empty, i.e. w <= 0 or h <= 0. See also: GemDecl, Intersect IF NOT EmptyRect(r) THEN DoMyOwnDrawing KO Procedure MakeXYXY(xywh : GRect; VAR xyxy : Array_4); Convert between x1, y1, x2, y2 and x, y, w, h format. See also: GemDecl, MakeXYWH MakeXYXY and MakeXYWH are complementary, as the following example shows : VAR xyxy : Array_4; xywh : GRect; ... MakeXYXY(xywh, xyxy); MakeXYWH(xyxy, xywh) won't bring any change to xywh. }~ Procedure MakeXYWH(xyxy : Array_4;VAR xywh : GRect); Convert from XYXY system to XYWH system. See also: GemDecl, MakeXYXY x &09Procedure v_opnwk(WorkIn: intin_Array; VAR handle: Integer; VAR WorkOut : workout_Array); Open workstation (load device drivers). WorkIn specifies what the workstation should look like, handle is the workstation handle, whereas WorkOut returns what the workstation does look like. Note : This procedure is not properly implemented on all ST-GEM versions and tend to crash system if used. This is due to the ST's missing device drivers for plotters, graphics tablets etc. WorkIn: input parameters handle: workstation/device handle WorkOut : return parameters See also: GemVDI, v_clswk, v_opnvwk, v_clsvwk, v_clrwk, v_updwk  &09Procedure v_clswk(handle : Integer); Close the workstation opened by v_opnwk. handle : workstation/device See also: GemVDI, v_opnwk, v_opnvwk, v_clsvwk, v_clrwk, v_updwk     %/8Procedure v_opnvwk(WorkIn: intin_Array;  VAR handle: Integer;  VAR WorkOut : workout_Array); Open a virtual workstation. On the ST, this means opening the screen. The WorkIn parameters are the same as the ones used by v_opnwk, but they are all ignored by the ST, so all attributes must be set by using the proper attribute procedures. This call must be preceded by a call to GemAES.appl_init. handle is the value obtained by an earlier call to graf_handle. WorkIn: input parameters handle: workstation/device handle (normally from graf_handle) WorkOut : output parameters See also: GemVDI, v_opnwk, v_clswk, v_clsvwk, v_clrwk, v_updwk     % / 8Procedure v_clsvwk(handle : Integer); Close the virtual workstation (screen). This is usually one of the last calls, a program makes before terminating. handle : workstation/device See also: GemVDI, v_opnwk, v_clswk, v_opnvwk, v_clrwk, v_updwk YY    % / 9Procedure v_clrwk(handle : Integer); Clear workstation, i.e. clear the screen and set it to the background color. On a printer or a plotter this would indicate paging, whereas the opcode would be written to a Metafile in case the device was a such. handle : workstation/device See also: GemVDI, v_opnwk, v_clswk, v_opnvwk, v_clsvwk, v_updwk     % / 9Procedure v_updwk(handle : Integer); Update workstation. This procedure is only of interest when using devices such as printers, plotters etc. but not the screen. It flushes the internal output-buffer and thereby makes sure that what the application wrote to the device really is printed. handle : workstation/device See also: GemVDI, v_opnwk, v_clswk, v_opnvwk, v_clsvwk, v_clrwk KW %/9 Function vst_load_fonts(handle, select : Integer) : Integer; Load fonts. It loads a character set (select) from a specified device. It returns 0 if no (other) character set(s) exist. This implies that 0 is returned if it is attempted to load a font for the ST screen, as it has one font only for each resolution. Is mainly used together with GDOS. handle: device select: the character set to load Return value : loaded font, or 0 = no font loaded See also: GemVDI, vst_unload_fonts, vst_font, vqt_name, vqt_fontinfo IF vst_load_fonts(VDI_handle, 2) = 0 THEN WriteLn('No font 2');  #-7 Procedure vst_unload_fonts(handle, select : Integer); Free up memory used by a font. GDOS related. handle : device select : font to remove See also: GemVDI, vst_load_fonts, vst_font, vqt_name, vqt_fontinfo vst_unload_fonts(VDI_handle, 2); V~ Procedure vs_clip(handle, clipflag : Integer; Var pxyarray: Array_4); Turn clipping on/off. Graphical operations are only performed if their coordinates lay inside the clipping rectangle. handle: device clipflag : 0 = no clipping; 1 = clipping pxyarray : corner coordinates See also: GemVDI VAR p: Array_4; BEGIN { GEM initializations goes here... } p[0] := 100; p[1] := 110; { upper left (x,y) = (100, 110) } p[2] := 400; p[3] := 310{ lower right (x,y) = (400, 310) } vs_clip(VDI_handle, 1, p); { turn clipping on } ... vs_clip(VDI_handle, 0, p); { turn clipping off again } :  ( 3  Procedure v_pline(handle, count : Integer; Var pxyarray : ptsin_Array); Draw PolyLine. pxyarray contains coordinates, so that pxyarray[0] = starting x, pxyarray[1] = starting y, pxyarray[2] = to x, pxyarray[3] = to y etc. count contains the number of coordinates used = (highest array element used + 1) DIV 2. handle: device count: number of coordinate sets (x,y) (min. 2) pxyarray : coordinate sets See also: GemVDI, v_pmarker, vsl_type, vsl_udsty, vsl_width, vsl_color, vsl_ends VAR p : ptsin_Array; ... BEGIN { GEM initializations go here... } p[0] := 10; p[1] := 20; p[2] := 30; p[4] := 40; p[5] := 50; p[6] := 60; p[7] := 70; p[8] := 80; v_pline(VDI_handle, 8 DIV 2, p); { try changing it to v_pmarker } draws a line from (10,20) to (30,40) to (50,60) to (70,80). 1    & 2 Procedure v_pmarker(handle, count : Integer;  Var pxyarray: ptsin_Array); Set a series of points. Coordinate setup is as for v_pline. handle: device count: number of coordinate sets (x,y) pxyarray : coordinate sets See also: GemVDI, v_pline, vsm_type, vsm_height, vsm_color    , 7  # Procedure v_gtext(handle, x, y : Integer;chstring : String80); Draw graphic text starting at coordinates (x,y) = lower left corner of the text. handle: device x, y: string coordinate chstring : the string ("C" format : #00 suffix) See also: GemVDI, v_justified, vst_height, vst_point, vst_rotation, vst_color, vst_effects, vst_alignment v_gtext(VDI_handle, 10, 20, 'HighSpeed Pascal'#00);   ", 7   % Procedure v_fillarea(handle, count : Integer; Var pxyarray : ptsin_Array); Fill a polygonwith the color, style, pattern etc. set by the attribute functions. pxyarray holds the polygon's corner coordinates, whereas count holds the number of coordinates. handle: device count: number of coordinate sets pxyarray : corner coordinates See also: GemVDI, v_contourfill, vr_recfl, vsf_style, vsf_color, vsf_perimeter, vsf_udpat, vsf_interior /  Procedure v_cellarray(handle: Integer; Var pxyarray: Array_4; rowlength, elused, numrows, wrtmode : Integer; Var colarray: intin_Array); Create a cell array. A cell array is a rectangle divided into a number of rows and columns, where each of these subareas can be assigned their own point color. The parameters are : handle: Device handle pxyarray: Corner coordinates [0] = lower leftx; [1] = lower left y [2] = upper right x; [3] = upper right y rowlength : Line length in colarray elused: Number of zones in colarray lines numrows: Number of lines in colarray wrtmode: Character mode colarray: Color specifications See also: GemVDI, vq_cellarray IU    ) 4  % Procedure v_contourfill(handle, x, y, index : Integer); Fill an area with the current fill color, style etc. until the color given by index is met. handle : device x, y: point within area to be filled index: contour color See also: GemVDI, v_fillarea, vr_recfl, vsf_style, vsf_color, vsf_perimeter, vsf_udpat, vsf_interior     . 9  % Procedure vr_recfl(handle : Integer; Var pxyarray : Array_4); Fill a rectangle with the currently set color and attributes. pxyarray [0] and [1] defines one corner of the rectangle, whereas pxyarray [2] and [3] defines the diagonally opposite corner of the rectangle. handle: device pxyarray : corner coordinates See also: GemVDI, v_fillarea, v_contourfill, vsf_style, vsf_color, vsf_perimeter, vsf_udpat, vsf_interior VAR p : Array_4; ... p[0] := 10; p[1] := 40; p[2] := 200; p[3] := 100; vr_recfl(VDI_handle, p)    &0:  Procedure v_bar(handle : Integer; Var pxyarray : Array_4); Filled bar. Attributes must be set beforehand. handle: device pxyarray : diagonally opposite corner coordinates See also: GemVDI, v_arc, v_pieslice, v_circle, v_ellarc, v_ellpie, v_ellipse, v_rbox, v_rfbox an    & 0 :  Procedure v_arc(handle, x, y, radius, begang, endang : Integer); Draw an arc. handle : device x, y: center point radius : arc's radius begang : starting angle (degrees * 10) endang : ending angle(degrees * 10) See also: GemVDI, v_bar, v_pieslice, v_circle, v_ellarc, v_ellpie, v_ellipse, v_rbox, v_rfbox v_arc(VDI_handle, 320, 200, 100, 0, 450);  2  !+5 Procedure v_pieslice(handle, x, y, radius, begang, endang: Integer); Draw a filled arc. The arc is drawn in the same way as v_arc, except that the end points of the arc are connected to the center point, and the thereby created area is filled. handle : device x, y: center point radius : arc's radius begang : starting angle (degrees * 10) endang : ending angle(degrees * 10) See also: GemVDI, v_bar, v_arc, v_circle, v_ellarc, v_ellpie, v_ellipse, v_rbox, v_rfbox v_pieslice(VDI_handle, 320, 200, 100, 0, 450); 4?    ! - 7  Procedure v_circle(handle, x, y, radius : Integer); Draw a filled circle. All attributes must be set beforehand. handle : device x, y: center point radius : circle's radius See also: GemVDI, v_bar, v_arc, v_pieslice, v_ellarc, v_ellpie, v_ellipse, v_rbox, v_rfbox v_circle(VDI_handle, 320, 200, 100);   ! -7 Procedure v_ellarc(handle, x, y, xradius, yradius, begang,endang: Integer); Draw an elliptical arc. handle: device x, y: center point xradius : radius in the x-direction yradius : radius in the y-direction begang: starting angle (degrees * 10) endang: ending angle(degrees * 10) See also: GemVDI, v_bar, v_arc, v_pieslice, v_circle, v_ellpie, v_ellipse, v_rbox, v_rfbox v_ellarc(VDI_handle, 320, 200, 50, 70, 0, 450);   ! -7 Procedure v_ellpie(handle, x, y, xradius, yradius, begang,endang: Integer); Draw a filled elliptical arc in the same way as v_ellarc. handle: device x, y: center point xradius : radius in the x-direction yradius : radius in the y-direction begang: starting angle (degrees * 10) endang: ending angle(degrees * 10) See also: GemVDI, v_bar, v_arc, v_pieslice, v_circle, v_ellarc, v_ellipse, v_rbox, v_rfbox v_ellpie(VDI_handle, 320, 200, 50, 70, 5, 455); q    ! - 7   Procedure v_ellipse(handle, x, y,  xradius,  yradius: Integer); Draw a filled ellipse. Attributes must be set beforehand. handle: device x, y: center point xradius : radius in the x-direction yradius : radius in the y-direction See also: GemVDI, v_bar, v_arc, v_pieslice, v_circle, v_ellarc, v_ellpie, v_rbox, v_rfbox v_ellipse(VDI_handle, 320, 200, 50, 70); cp  ! -7   Procedure v_rbox(handle : Integer; Var xyarray : Array_4); Draw a box with rounded corners. handle: device xyarray : diagonally opposite corner coordinates See also: GemVDI, v_bar, v_arc, v_pieslice, v_circle, v_ellarc, v_ellpie, v_ellipse, v_rfbox VAR a : Array_4; ... a[0] := 10; a[1] := 30; a[2] := 150; a[3] := 200; v_rbox(VDI_handle, a); $.    ! - 7   Procedure v_rfbox(handle : Integer; Var xyarray : Array_4); Draw a filled box with rounded corners using the current attri- butes. handle: device xyarray : diagonally opposite corner coordinates See also: GemVDI, v_bar, v_arc, v_pieslice, v_circle, v_ellarc, v_ellpie, v_ellipse, v_rbox   ( 3   # Procedure v_justified(handle, x, y : Integer; gstring: String80; jlength, wordspace, charspace: Integer); Write justified text. handle: device x, y: where to start writing gstring: string to write (remember #00) jlength: width of output area wordspace : insert additional spaces between words? 0 = no <> 0 = yes, if required charspace : insert additional spaces between letters? 0 = no <> 0 = yes, if required See also: GemVDI, v_gtext, vst_height, vst_point, vst_rotation, vst_color, vst_effects, vst_alignment H Procedure vswr_mode(handle, mode : Integer); Set the writing mode of all following graphics operations. handle : device mode: CONST 1MD_REPLACEreplace 2MD_TRANS transparent 3MD_XORXOR 4MD_ERASE reverse transparent See also: GemVDI vswr_mode(VDI_handle, MD_REPLACE);  Procedure vs_color(handle, index : Integer; Var rgbin : Array_3); Set color representation. handle : device index: color index in palette rgbin: normalized red, green and blue intensity values : [0] = red [1] = green [2] = blue The normalized values are in the range [0..1000]. See also: GemVDI VAR r : Array_3; ... r[0] := 750; r[1] := 400; r[2] := 200; vs_color(VDI_handle, 3, r); { sets color index 3 to a new color }   ' 2  Procedure vsl_type(handle, style : Integer); Set PolyLine line style. The line styles are : styleCONSTpattern MSBLSB 1SOLID**************** 2LDASHED************.... 3DOTTED***.....***..... 4DASHDOT*******...***... 5DASHED********........ 6DASHDOTDOT****...**..**... 7user defined (see vsl_udsty below) A style is 16 bits wide; "*" = set (1); "." = clear (0). See also: GemVDI, v_pline, v_pmarker, vsl_udsty, vsl_width, vsl_color, vsl_ends vsl_type(VDI_handle, DASHDOTDOT); v    ' 1 Procedure vsl_udsty(handle, pattern : Integer); Set user defined line style with a 16-bit pattern laid out in the manner described in vsl_type. handle: device pattern : 16-bit pattern See also: GemVDI, v_pline, v_pmarker, vsl_type, vsl_width, vsl_color, vsl_ends vsl_udsty(VDI_handle, $CCCC);{ **..**..**..**.. layout } vsl_type(VDI_handle, 7);{ user line style} '  '1 Procedure vsl_width(handle, width : Integer); Set PolyLine's line width. Note that width must be an odd number. handle : device width: new line width See also: GemVDI, v_pline, v_pmarker, vsl_type, vsl_udsty, vsl_color, vsl_ends vsl_width(VDI_handle, 7);{ pretty thick line! }   '1 Procedure vsl_color(handle, colindex : Integer); Set PolyLine color. handle: device colindex : a color index from the palette See also: GemVDI, v_pline, v_pmarker, vsl_type, vsl_udsty, vsl_width, vsl_ends vsl_color(VDI_handle, Blue); y  '1   Procedure vsl_ends(handle, begstyle, endstyle : Integer); Set PolyLine start and end styles. The style layout is as follows : numeric valueCONST 1SQUARED 2ARROWED 3ROUNDED handle: device begstyle : line begin style endstyle : line end style See also: GemVDI, v_pline, v_pmarker, vsl_type, vsl_udsty, vsl_width, vsl_color vsl_ends(VDI_handle, ARROWED, ROUNDED); i  ' 3 Procedure vsm_type(handle, symbol : Integer); Set PolyMarker type. The different types are : symbol : valueshape 1point 2plus sign 3star 4square 5diagonal cross 6diamond ndevice dependent handle : device There are six shapes available on the ST screen. See also: GemVDI, v_pmarker, v_pline, vsm_height, vsm_color vsm_type(VDI_handle, 4);   '1 Procedure vsm_height(handle, height : Integer); Set PolyMarker height. handle : device height : desired height See also: GemVDI, v_pmarker, v_pline, vsm_type, vsm_color vsm_height(VDI_handle, 5);   '1 Function vsm_color(handle, colindex : Integer); Set PolyMarker color to colindex in the current palette. handle: device colindex : color index See also: GemVDI, v_pmarker, v_pline, vsm_type, vsm_height vsm_color(VDI_handle, Yellow);   ) 4   & Procedure vst_height(handle, height : Integer; VAR charwidth, charheight, cellwidth, cellheight : Integer); Set absolute graphic character height. As a result of the set height, new character cell sizes are calculated and returned. handle: device height: new height in pixels charwidth: width of a char with the new height charheight : height of character cellwidth: width of a character cell with the new height cellheight : height of cell See also: GemVDI, v_gtext, v_justified, vst_point, vst_color, vst_rotation, vst_effects, vst_alignment CONST newheight = 13; VAR chW, chH, celW, celH : Integer; ... vst_height(VDI_handle, newheight, chW, chH, celW, celH); @  ) 5   # Procedure vst_point(handle, point : Integer;  VAR charwidth, charheight, cellwidth, cellheight : Integer); Set new character height. Basically the same function as vst_height, except for character height being given in "points" = 1/72 of an inch. handle: device height: new height in points charwidth: width of a char with the new height charheight : height of character cellwidth: width of a character cell with the new height cellheight : height of cell See also: GemVDI, v_gtext, v_justified, vst_height, vst_rotation, vst_color, vst_effects, vst_alignment )  ) 5  # Procedure vst_rotation(handle, angle : Integer); Set character baseline vector to a given (GEM style) degree. handle : device angle: baseline angle See also: GemVDI, v_gtext, v_justified, vst_height, vst_point, vst_color, vst_effects, vst_alignment vst_rotation(VDI_handle, 2700); ;F #5 Procedure vst_font(handle, font : Integer); Select either the system font or a previously loaded font. handle : device font: desired font : system = 1 (6 * 6 font) See also: GemVDI, vst_load_fonts, vst_unload_fonts, vqt_name, vqt_fontinfo vst_font(VDI_handle, 1); vst_font is of most use together with GDOS.   ) 5  & Procedure vst_color(handle, colindex : Integer); Set text color. handle: device colindex : new text color See also: GemVDI, v_gtext, v_justified, vst_height, vst_point, vst_rotation, vst_effects, vst_alignment vst_color(VDI_handle, 4);   ) 5   $ Procedure vst_effects(handle, effect : Integer); Set special text effects. The available effects are : effectCONSTresulting style 0NORMALnormal 1BOLDboldface 2SHADEDshaded 4SKEWEDitalic 8UNDERLINEDunderlined 16OUTLINEoutlined 32SHADOWshadowed The effects may be combined by adding them. handle : device See also: GemVDI, v_gtext, v_justified, vst_height, vst_point, vst_rotation, vst_color, vst_alignment vst_effects(VDI_handle, BOLD + OUTLINE); vst_effects(VDI_handle, NORMAL);   ) 5   $ Procedure vst_alignment(handle, horin,vertin : Integer; VAR horout, vertout : Integer); Set horizontal and vertical text alignment. handle: device horin: horizontal alignment : 0 : left aligned 1 : centered 2 : right aligned vertin: vertical alignment 0 : base line 1 : half line 2 : ascent line 3 : bottom line 4 : descent line 5 : top line horout: the value used by the VDI vertout : the value used by the VDI See also: GemVDI, v_gtext, v_justified, vst_height, vst_point, vst_rotation, vst_color, vst_effects    .8   % Procedure vsf_interior(handle, style : Integer); Set fill interior style. The available styles are: styleCONSTsurface 0HOLLOWnot filled 1SOLIDsolid fill with fill color 2PATTERNdotted fill 3HATCHcrosshatch fill 4UDFILLSTYLEuser defined fill style handle : device See also: GemVDI, v_fillarea, v_contourfill, vr_recfl, vsf_style, vsf_color, vsf_perimeter, vsf_udpat vsf_interior(VDI_handle, PATTERN);     . 8   % Procedure vsf_style(handle, styleindex : Integer); Set fill style index. This allows the selection of one of either 24 bit patterns or 12 crosshatch patterns. Before calling this procedure, it must be selected whether the styleindex concerns a bit pattern or a cross- hatch pattern by calling vsf_interior. handle: device styleindex : new style See also: GemVDI, v_fillarea, v_contourfill, vr_recfl, vsf_color, vsf_perimeter, vsf_udpat, vsf_interior vsf_interior(VDI_handle, HATCH);{ crosshatch} vsf_style(VDI_handle, 3);{ crosshatch style 3 } vsf_interior(VDI_handle, PATTERN); { bit pattern} { a call to a fill procedure at this point would result in } { a bit pattern code 3 to be drawn}     .8  % Procedure vsf_color(handle, colorindex : Integer); Set fill color. handle: device colorindex : new fill color See also: GemVDI, v_fillarea, v_contourfill, vr_recfl, vsf_style, vsf_perimeter, vsf_udpat, vsf_interior vsf_color(VDI_handle, Magenta); *4   .8  ! Procedure vsf_perimeter(handle, pervis : Integer); Set fill frame on/off. handle : device pervis : fill frame flag : 0 = off; 1 = on (default) See also: GemVDI, v_fillarea, v_contourfill, vr_recfl, vsf_style, vsf_color, vsf_udpat, vsf_interior vsf_perimeter(VDI_handle, 0);{ turn frame off } <[    . 8  % Procedure vsf_udpat(handle : Integer; VAR pfillpat;  planes : Integer); Set user defined fill pattern. handle: device pfillpat : memory block containing the fill pattern planes: number of colors involved See also: GemVDI, v_fillarea, v_contourfill, vr_recfl, vsf_style, vsf_color, vsf_perimeter, vsf_interior .) ) ))( Procedure vro_cpyfm(handle, wrmode : Integer;  Var pxyarray: Array_8;  Var psrcMFDB, pdesMFDB: MFDB); Copy raster, opaque. wrmode defines the logical operations that are performed on the raster when stored. HighSpeed Pascal defines some constants concerning the raster operations : valueCONSToperation performed s=source; d=destination 0ALL_WHITE0 1S_AND_Ds AND d 2S_AND_NOTDs AND NOT d 3S_ONLYs 4NOTS_AND_D(NOT s) AND d 5D_ONLYd 6S_XOR_Ds XOR d 7S_OR_Ds OR d 8NOT_SORDNOT (s OR d) 9NOT_SXORDNOT (s XOR d) 10NOT_DNOT d 11S_OR_NOTDs OR (NOT d) 12NOT_SNOT s 13NOTS_OR_D(NOT s) OR d 14NOT_SANDDNOT (s AND d) 15ALL_BLACK1 handle: device wrmode: writing mode (see above) pxyarray : [0]..[3] : source corner coordinates [4]..[7] : destination corner coordinates The coordinates are given in terms of two diagonally opposite corners. psrcMFDB : source pdesMFDB : destination See also: GemVDI, vrt_cpyfm, vr_trnfm, v_get_pixel <  ( Procedure vrt_cpyfm(handle, wrmode : Integer;  Var pxyarray: Array_8;  Var psrcMFDB, pdesMFDB: MFDB;  Var color_index: Array_2); Copy raster, transparent. handle: device wrmode: writing mode : MD_TRANS, MD_REPLACE, MD_XOR, MD_ERASE pxyarray: [0]..[3] : source corner coordinates [4]..[7] : destination corner coordinates The coordinates are given in terms of two diagonal- ly opposite corners. psrcMFDB: source pdesMFDB: destination color_index : [0] = color of set pixels [1] = color of clear pixels See also: GemVDI, vro_cpyfm, vr_trnfm, v_get_pixel *Y    ) Procedure vr_trnfm(handle: Integer; Var psrcMFDB, pdesMFDB : MFDB); Transform form from standard format to device specific. handle: device psrcMFDB : source Memory Form Definition Block pdesMFDB : destination Memory Form Definition Block See also: GemVDI, vro_cpyfm, vrt_cpyfm, v_get_pixel ?Y    )Procedure v_get_pixel(handle, x, y : Integer; VAR pel, index : Integer); Determine if a pixel is set or clear. v_get_pixel can only be used in device-specific format. handle : device x, y: pixel to get pel: pixel set = 1 or clear = 0 index: pixel's color index See also: GemVDI, vro_cpyfm, vrt_cpyfm, vr_trnfm [  Procedure vsin_mode(handle, devtype, mode : Integer); Set input mode. handle: device devtype : input device type : 1 : position input 2 : value input 3 : selection input 4 : string input mode: Input mode : CONST 1 : REQUEST 2 : SAMPLE See also: GemVDI, vqin_mode   Procedure vrq_locator(handle, x, y: Integer; VAR xout, yout : Integer; VAR term: Integer); Input locator, request mode. handle: device x, y: graphic cursor start position xout, yout : graphic cursor end position term: the keyboard key/mouse button that ended the input #32 = left mouse button; #33 = right button; otherwise the keyboard key's ASCII value See also: GemVDI, vsm_locator   Function vsm_locator(handle, x, y: Integer; VAR xout, yout, term : Integer) : Integer; Input locator, sample mode. handle: device x, y: graphic cursor start position xout, yout: graphic cursor end position term: the keyboard key/mouse button that ended the input #32 = left mouse button; #33 = right button return value : status value : valuekey press?position change? 0nono(note the 1noyesbinary appea- 2yesno rance) 3yesyes See also: GemVDI, vrq_locator &   Procedure vrq_valuator(handle, valin : Integer; VAR valout : Integer; VAR term: Integer); Input valuator, request mode. handle : device valin: start value valout : end value term: key terminating operation See also: GemVDI, vsm_valuator ]  Procedure vsm_valuator(handle, valin : Integer; VAR valout : Integer; VAR term: Integer; VAR status : Integer); Input valuator, sample mode. handle : device valin: start value valout : end value term: key terminating operation status : valueinterpretation 0no actions 1value changed 2key pressed See also: GemVDI, vrq_valuator    Procedure vrq_choice(handle, ch_in : Integer; VAR ch_out: Integer); Input choice, request mode. handle : device ch_in: initial value ch_out : pressed key See also: GemVDI, vsm_choice    Function vsm_choice(handle : Integer; VAR choice : Integer) : Integer; Input choice, sample mode. handle: device choice: pressed key Return value : status : 0 = no key; 1 = key pressed See also: GemVDI, vrq_choice \  Procedure vrq_string(handle, maxlen, echomode : Integer; Var echo_xy: Array_2; Var instring: String80); Input string, request mode. Waits for key before terminating. handle: device maxlen: maximum string length echomode : 0 = no echo; 1 = echo echo_xy: echo area (x,y) instring : the string input See also: GemVDI, vsm_string   Function vsm_string(handle, maxlen,  echomode: Integer;  Var echo_xy: Array_2;  Var instring: String80) : Integer; Input string, sample mode. handle: device maxlen: maximum string length echomode: 0 = no echo; 1 = echo echo_xy: echo area (x,y) instring: the string input Return value : 0 = illegal key pressed; otherwise length of string. See also: GemVDI, vrq_string H  Procedure vsc_form(handle : Integer; Var pcurform : Array_37); Set mouse form. handle: device pcurform : cursor form : [ 0], [ 1] : hot spot (x,y) [ 2]: must be 1 (!) [ 3]: mask color index [ 4]: form color index [ 5]..[20] : mask raster lines (16) [21]..[36] : form raster lines (16) See also: GemVDI, graf_mouse  'Procedure vex_timv(handle: Integer; timaddr: Pointer; VAR otimaddr : Pointer; VAR timconv: Integer); Exchange timer interrupt vector. Directs the system timer interrupt to user routine. handle: device timaddr: address of new timer routine otimaddr : address of old timer routine timconv: interrupt interval (milliseconds) See also: GemVDI, vex_butv, vex_motv, vex_curv     Procedure v_show_c(handle, reset : Integer); Show graphic cursor (mouse). Each time v_show_c is called, an internal counter is updated, so it is necessary to call v_hide_c exactly as many times as v_show_c to hide the cursor. The internal counter can, however, be cleared if reset is set to 0. In normal operation, reset should be 1. handle : device reset: reset flag : 0 = clear counter; 1 = maintain counter See also: GemVDI, v_hide_c, graf_mouse VAR i : Integer; ... FOR i := 1 TO 10 DO v_show_c(VDI_handle, 1); FOR i := 1 TO 9 DO v_hide_c(VDI_handle); { at this point, the cursor is still on } v_hide_c(VDI_handle); { now it's turned off } }}  Procedure v_hide_c(handle : Integer); Hide graphic cursor (mouse). handle : device See also: GemVDI, v_show_c, graf_mouse " Procedure vq_mouse(handle: Integer; VAR pstatus, x, y : Integer); Sample mouse button state and return graphic cursor's coordinates. handle: device pstatus : mouse button state : 0 = not pressed; 1 = pressed x, y: cursor coordinates See also: GemVDI  'Procedure vex_butv(handle: Integer; pusrcode: Pointer; VAR psavcode : Pointer); Exchange button change vector. This is one of the more "dirty" procedures, as it allows the programmer to specify, what his program should do, if the mouse button is pressed. handle: device pusrcode : address of the new routine to be installed psavcode : address of the old routine See also: GemVDI, vex_timv, vex_motv, vex_curv 5 'Procedure vex_motv(handle: Integer; pusrcode: Pointer; VAR psavcode : Pointer); Exchange mouse movement vector. As vex_butv, this is also one of the "dirty" procedures. This time, the user can specify what shall happen, each time the mouse is moved, and the mouse coordinates passed on to the application can be changed as well. "Speed mouse" utilities are often made this way. handle: device pusrcode : address of new routine psavcode : address of old routine See also: GemVDI, vex_timv, vex_butv, vex_curv j 'Procedure vex_curv(handle: Integer; pusrcode: Pointer; VAR psavcode : Pointer); Exchange cursor change vector. In this case, the routine is called, when it is required to change the graphic cursor's position on the screen. handle: device pusrcode : address of new routine psavcode : address of old routine See also: GemVDI, vex_timv, vex_butv, vex_motv P Procedure vq_key_s(handle : Integer; VAR pstatus : Integer); Sample keyboard state information. Returns the status of four special keys on the keyboard, each represented by a single bit : bitvalue CONSTkey 01K_RSHIFTright SHIFT key 12K_LSHIFTleft SHIFT key 24K_CTRLCONTROL key 38K_ALTALTERNATE key Set bits indicate a pressed key. A returned value of, say, 3 would indicate that both shift keys are pressed. See also: GemVDI Determine, if ALTERNATE key is pressed : VAR i : Integer; ... vq_key_s(VDI_handle, i); IF BitTest(3, i) THEN WriteLn('ALTERNATE pressed')  Procedure vq_extend(handle, owflag : Integer;  VAR workout: workout_Array); Extended inquire. It's used for determining either the OpenWorkstation parameters, or the extended parameters. The information about the device (handle) is returned in workout. handle: device owflag: inquiry type : 0 = Open Workstation parameters 1 = extended parameters workout : returned values See also: GemVDI   Function vq_color(handle, colorindex, setflag: Integer; VAR rgb: Array_3) : Integer; Inquire color representation. Returns the red, green and blue composition of colorindex in rgb in scaled values (0-1000). handle: device colorindex : color index setflag: 0 = passed color index; 1 = current color index. rgb: color composition : [0] = red [1] = green [2] = blue See also: GemVDI, vs_color   Procedure vql_attributes(handle: Integer; VAR attrib : Array_6); Inquire PolyLine attributes. handle : device attrib : polyline attributes See also: GemVDI, v_pline    Procedure vqm_attributes(handle: Integer; VAR attrib: Array_5); Inquire PolyMarker attributes. handle : device attrib : polymarker attributes See also: GemVDI, v_pmarker   Procedure vqf_attributes(handle: Integer; VAR attrib : Array_5); Inquire fill attributes. handle : device attrib : fill attributes See also: GemVDI, vr_recfl     Procedure vqt_attributes(handle: Integer; VAR attrib : Array_10); Inquire graphic text attributes. handle : device attrib : text attributes See also: GemVDI, v_gtext, v_justified P Procedure vqt_extent(handle: Integer; chstring: String80; VAR extent : Array_8); Inquire graphic text extent. It returns four coordinates, describing an imaginary box surrounding chstring as it would appear with the current text attributes. handle: device chstring : input string extent: extent coordinates See also: GemVDI 6 Function vqt_width(handle: Integer; character: Char; VAR cellwidth, leftdelta, rightdelta : Integer) : Integer; Inquire character cell width. handle: device character: the character to measure cellwidth: width of character cell leftdelta: left offset rightdelta : right offset See also: GemVDI O   # 5 Function vqt_name(handle, elementnum : Integer; VAR name: String80) : Integer; Inquire font name and index. handle: device elementnum: font index name: name and style of font Return value : current font index vqt_name is only usable with GDOS fonts. See also: GemVDI, vst_load_fonts, vst_unload_fonts, vst_font, vqt_fontinfo   Procedure vq_cellarray(handle: Integer; Var pxyarray : Array_4; rowlen, numrows: Integer; Var elused, rowsused: Integer; status: Integer; Var colarray : intout_Array); Inquire cell array settings. handle: device pxyarray : lower left and upper right corners of rectangle rowlen: length of each row in color index array numrows: number of rows elused: number of used elements rowsused : number of used rows status: 0 = error; <> 0 = ok colarray : returned colors See also: GemVDI, v_cellarray    Procedure vqin_mode(handle, dev_type : Integer;  VAR inputmode: Integer); Inquire input mode. handle: device dev_type: device type : Locator, valuator, choice or string inputmode : request or sample See also: GemVDI, vsin_mode U #5?Procedure vqt_fontinfo(handle: Integer; Var minADE, maxADE: Integer; Var distances : Array_4; Var maxwidth: Integer; Var effects: Array_3); Inquire information about the current font. handle: device minADE: ASCII value of first writable character in font maxADE: ASCII value of last writable character in font distances : bottom, descent, half line, ascent, top values maxwidth: char width (left and right delta values are not included) effects: enlargement by italic etc., left and right delta values See also: GemVDI, vst_load_fonts, vst_unload_fonts, vst_font, vqt_name Cv Procedure vq_chcells(handle: Integer; VAR rows, columns : Integer); Inquire addressable alpha character cells. Returns the number of addressable character cells in terms of rows and columns. handle: device rows: number of character rows available columns : number of character columns available See also: GemVDI   Procedure v_exit_cur(handle : Integer); Exit alpha mode and go into graphics mode (if there's a difference). handle : device See also: GemVDI, v_enter_cur   Procedure v_enter_cur(handle : Integer); Enter alpha mode (leave graphics mode). handle : device See also: GemVDI, v_exit_cur    ) 5 Procedure v_curup(handle : Integer); Move alpha cursor one line up. handle : device See also: GemVDI, v_curdown, v_curleft, v_curright, v_curhome   ' 3 Procedure v_curdown(handle : Integer); Move alpha cursor one line down. handle : device See also: GemVDI, v_curup, v_curleft, v_curright, v_curhome   ' 2 Procedure v_curright(handle : Integer); Move alpha cursor one position to the right. handle : device See also: GemVDI, v_curup, v_curdown, v_curleft, v_curhome   ' 3 Procedure v_curleft(handle : Integer); Move alpha cursor one position to the left. handle : device See also: GemVDI, v_curup, v_curdown, v_curright, v_curhome   ' 2 Procedure v_curhome(handle : Integer); Home alpha cursor. handle : device See also: GemVDI, v_curup, v_curdown, v_curleft, v_curright zz Procedure v_eeos(handle : Integer); Erase from alpha cursor to End Of Screen. handle : device See also: GemVDI, v_eeol xx Procedure v_eeol(handle : Integer); Erase from alpha cursor to End Of Line. handle : device See also: GemVDI, v_eeos >A   Procedure vs_curaddress(handle, row, column : Integer); Set alpha cursor address to row and column. If values are illegal the cursor is set as close to the desired position as possible. handle : device row: row for cursor to be placed on column : column for cursor to be placed on See also: GemVDI, vq_curaddress  Procedure v_curtext(handle : Integer; chstring : String80); Write cursor addressable text. handle: device chstring : string to output ("C" format) See also: GemVDI gg Procedure v_rvon(handle : Integer); Set reverse video on. handle : device See also: GemVDI, v_rvoff ii Procedure v_rvoff(handle : Integer); Turn reverse video off. handle : device See also: GemVDI, v_rvon    Procedure vq_curaddress(handle: Integer; VAR row, column : Integer); Return current cursor position. handle : device row: cursor's row position column : cursor's column position See also: GemVDI, vs_curaddress  Function vq_tabstatus(handle : Integer) : Integer; Return tablet status. A tablet could be a mouse, joystick etc. handle: device Return value : tablet status : 1 = available; 0 = not available See also: GemVDI dd Procedure v_hardcopy(handle : Integer); Make a hardcopy. handle : source device See also: GemVDI   Procedure v_dspcur(handle, x, y : Integer); Set the graphic cursor at position (x,y) and show it. Note the difference between a graphic cursor and an alpha cursor. handle : device x,y: cursor coordinates See also: GemVDI, v_rmcur ww Procedure v_rmcur(handle : Integer); Remove the last set graphic cursor. handle : device See also: GemVDI, v_dspcur  $7 Procedure v_form_adv(handle : Integer); Write a form feed to a printer. handle : device See also: GemVDI, v_output_window, v_clear_disp_list, v_bit_image      2 Procedure v_output_window(handle : Integer; Var xyarray : Array_4); Write a part of the current output window to a printer. handle: device xyarray : two diagonally opposite corners representing the source window See also: GemVDI, v_form_adv, v_clear_disp_list, v_bit_image   0 Procedure v_clear_disp_list(handle : Integer); Clear a printer's display list. handle : device See also: GemVDI, v_form_adv, v_output_window, v_bit_image   0Procedure v_bit_image(handle: Integer; filename : String80; aspect, scaling, num_pts: Integer; Var xyarray : Array_4); Output bit image file to a printer. handle: device filename : input file to output (remember : append #0) aspect: aspect ratio flag : 0 = ignore aspect ratio 1 = pixel aspect ratio 2 = page aspect ratio scaling: scaling flag : 0 = uniform scaling 1 = separate scaling xyarray: upper left corner and lower right See also: GemVDI, v_form_adv, v_output_window, v_clear_disp_list N    ) 4  Function vs_palette(handle, palette : Integer) : Integer; Select IBM color palette. handle: device palette : selected palette : colors : 0red, green, yellow 1cyan, blue, magenta See also: GemVDI, vqp_films, vqp_state, vsp_state, vsp_save, vsp_message, vqp_error    * 5  Procedure vqp_films(handle : Integer; VAR filmnames : String125); Inquire palette film types (filmnames). handle: device filmnames : film types : Five sets of 25 characters See also: GemVDI, vs_palette, vqp_state, vsp_state, vsp_save, vsp_message, vqp_error    * 5  Procedure vqp_state(handle: Integer;  VAR port, filmname, lightness, interlace, planes : Integer;  VAR indexes: Array_16); Inquire palette state. handle: device port: communications port : 0 = first filmname: film index : 0..4 lightness : lightness control : -3..3 interlace : interlace flag : 0 = noninterlaced; 1 = interlaced planes: number of bitplanes indexes: coded information about color indexes See also: GemVDI, vs_palette, vqp_films, vsp_state, vsp_save, vsp_message, vqp_error p   * 5  Procedure vsp_state(handle,  port,  filmnum,  lightness,  interlace,  planes: Integer;  Var indexes: Array_16); Set palette state. handle: device port: communications port : 0 = first filmname: film index : 0..4 lightness : lightness control : -3..3 interlace : interlace flag : 0 = noninterlaced; 1 = interlaced planes: number of bitplanes indexes: coded information about color indexes See also: GemVDI, vs_palette, vqp_films, vqp_state, vsp_save, vsp_message, vqp_error    * 5   Procedure vsp_save(handle : Integer); Save palette driver state. handle : device See also: GemVDI, vs_palette, vqp_films, vqp_state, vsp_state, vsp_message, vqp_error    * 5   Procedure vsp_message(handle : Integer); Suppress palette driver messages. handle : device See also: GemVDI, vs_palette, vqp_films, vqp_state, vsp_state, vsp_save, vqp_error    * 5   Function vqp_error(handle : Integer) : Integer; Inquire palette error. handle: device Return value : Error code See also: GemVDI, vs_palette, vqp_films, vqp_state, vsp_state, vsp_save, vsp_message e  ! Procedure v_meta_extents(handle, minx, miny, maxx, maxy: Integer); Update current metafile's extent header. handle : device minx, miny, maxx, maxy: minimum and maximum coordinates for bounding rectangle See also: GemVDI, v_write_meta, vm_filename } # Procedure v_write_meta(handle, numintin: Integer; Var int_in: intin_Array; numptsin: Integer; Var pts_in: ptsin_Array); Write a user-defined metafile item. handle: device numintin : number of elements in int_in int_in: user defined information numptsin : number of elements in pts_in pts_in: user defined information See also: GemVDI, v_meta_extents, vm_filename  # Procedure vm_filename(handle : Integer; filename : String80); Change MetaFile's name. handle: device filename : new file name ("C" format) See also: GemVDI, v_meta_extents, v_write_meta   Function ST_SHL(a,b : Long_Integer) : Long_Integer; Implementation of ST Pascal SHL (shift left) function. This function is included to ease up ST Pascal source code rewrite. All you have to do is to make a "Search and Replace" and search for "SHL" and replace with "ST_SHL". See also: STPascal, ST_SHR Your original code might read : i := SHL(2,4); Just turn it into : i := ST_SHL(2,4);   Function ST_SHR(a,b : Long_Integer) : Long_Integer; Implementation of ST Pascal SHR (shift right) function. This function is included to ease up ST Pascal source code rewrite. All you have to do is to make a "Search and Replace" and search for "SHR" and replace with "ST_SHR". See also: STPascal, ST_SHL Your original code might read : i := SHR(2,4); Just turn it into : i := ST_SHR(2,4); YK7 ST Pascal ReadV procedure The ST Pascal ReadV and WriteV procedures do not exist as the Turbo Pascal procedures Str and Val were inherited, so they require rewriting too - but that's a real simple one : ST Pascal :HighSpeed Pascal : VAR s : String;VAR s: String; r : Real;r: Real; dummy : Integer; BEGINBEGIN s := '123.45';s := '123.45'; ReadV(s, r);Val(s, r, dummy); r := 54.321;r := 54.321; WriteV(s, r);Str(r, s); To sum it up : Changing ReadV into Val and adding a dummy parameter and changing WriteV into Str and swapping parameters. See also: STPascal, WriteV YK7 ST Pascal WriteV procedure The ST Pascal ReadV and WriteV procedures do not exist as the Turbo Pascal procedures Str and Val were inherited, so they require rewriting too - but that's a real simple one : ST Pascal :HighSpeed Pascal : VAR s : String;VAR s: String; r : Real;r: Real; dummy : Integer; BEGINBEGIN s := '123.45';s := '123.45'; ReadV(s, r);Val(s, r, dummy); r := 54.321;r := 54.321; WriteV(s, r);Str(r, s); To sum it up : Changing ReadV into Val and adding a dummy parameter and changing WriteV into Str and swapping parameters. See also: STPascal, ReadV i`7 ST Pascal Put procedure The ST Pascal implements a file system based on the original Wirth philosophy of PUTting and GETting - from a system programmer's view a quite logical way, but a bit more tricky to deal with when it comes to formatted output etc. Therefore, HighSpeed Pascal implements the nowadays most commonly used method of READing and WRITEing. The actual code rewrite to perform isn't very difficult; it merely involves this : All references to a file pointer (say, f^) will have to be changed into a variable holding the file pointer's value. After that, all PUTs must be changed into WRITEs of the previously mentioned variable and all GETs will have to be changed into the corresponding READs : ST Pascal :HighSpeed Pascal : VAR f : FILE OF Integer;VAR f : FILE OF Integer; i : Integer; ...... ReWrite(f, 'JUNK.TMP');ReWrite(f, 'JUNK.TMP'); f^ := 1234;i := 1234; Put(f); { write 1234 to file }Write(f, i { or 1234 } ); Reset(f);Reset(f); WriteLn(f^);Read(f, i); Get(f);WriteLn(i); Close(f);Close(f); Erase(f); { <-- note this --> }Erase('JUNK.TMP'); See also: STPascal FF ST Pascal Get procedure Consult Put for a discussion of code rewrite 9M  variable := expression An assignment statement assigns the value of an expression to a variable. The variable and the expression must be assignment compatible. See also: Statements, Reserved_Words Examples of assignments: Var MyInt : Integer; MyPtr : Pointer; Begin MyInt := -1234; MyPtr := Nil; .....                    Help is available on the following statement types: assignments procedure calls goto begin..end If..then..else case..of..else..end repeat..until while..do for..to..do for..downto..do with..do See also: Reserved_Words  Sets are declared like this: set of base-type The base-type of a set must be an ordinal type with no more than 256 possible values. The lower as well as the upper bounds of the base-type must be in the range 0..255. See also: Reserved_Words An example: Program Set_Demo; Type Characters = set of char; Var CharsAre: Characters; DigitsAre: Characters; UserInp: Char; Begin CharsAre := ['a'..'z','A'..'Z']; DigitsAre := ['0'..'9']; Repeat UserInp := ReadKey; If (UserInp IN CharsAre) then WriteLn('You entered a character.') ELSE If (UserInp IN DigitsAre) then WriteLn('You entered a digit.'); Until (UserInp = #13); End.    # Text type files are sequential files organized into lines of characters. Data is written to and read from text files using the standard procedures write and read. Non-sequential files are declared using the "file" type: type myfile = file of component-type or varmyfile : file of component-type The optional "component-type" can be any type, except a type containing text or file types. If "component-type" is omitted a typeless file will be declared. See also: Write, Read, BlockRead, BlockWrite An example: Program Dump_File; Uses Dos; Var Dummy : Text; Procedure Dump_Text_File; Var F : Text;{ A text file. } S : String; { Buffer for read data. } Begin Reset(F,ParamStr(1)); While Not(Eof(F)) Do Begin ReadLn(F,S); WriteLn(S); End; Close(F); End; Procedure Dump_NonText_File; Var F: File; { A typeless file. } C: ShortInt; { Buffer for read data. } R: Integer;{ Number of read bytes. } Count : Byte; Begin Reset(F,ParamStr(1)); Count := 1; Repeat BlockRead(F,C,1,R); Write(Chr(C)); If (Count MOD 70 = 0) then Begin WriteLn; Count := 1; End Else Inc(Count); Until (R = 0); Close(F); End; BEGIN If (ParamCount = 0) then Begin WriteLn('Enter a file name in the Options/Run dialog.'); Halt; End; {$I-} Reset(Dummy,ParamStr(1)); {$I-} If (IOresult <> 0) then Begin WriteLn('Cannot open the file: ',ParamStr(1)); Halt; End; WriteLn('Dump ASCII or Hex file (A/H): '); Case UpCase(ReadKey) Of 'A' : Dump_Text_File; 'H' : Dump_NonText_File ELSE WriteLn('Wrong input.'); End; End. 2 # (  The reserved word "label" marks the start of a label declaration part. Each of the symbols declared must be used exactly once to declare a position in the code. Each of the symbols can be used several times in Goto statements to jump directly to the marked piece of code. It should be noted that the majority of Pascal programmers consider the use of label declarations and goto statements as ill-behaved Pascal programming. See also: Goto, Reserved_Words :P - (  Goto statements are used in connection with label declarations to jump directly to a specified piece of code. It should be noted that the majority of Pascal programmers consider the use of label declarations and goto statements as ill-behaved Pascal programming. See also: Label, Reserved_Words An example: Program Goto_Label; Label StopProgram; Begin Repeat Write('Enter S to terminate program: '); If UpCase(ReadKey) = 'S' then Goto StopProgram ELSE WriteLn('You did not press S.'); Until False; StopProgram: WriteLn('Program will now terminate.'); End. dd/ When a pointer equals "nil" it means that the pointer is unused. See also: Pointer, Reserved_Words    )     # ( 1 A pointer type variable holds the address of a dynamic data structure of a specified type. Values can be assigned to pointer type variables by use of the New and GetMem procedures, the Addr and Ptr functions, and the @ operator. Pointers of type "pointer" are typeless i.e. they do not point at any specific type. See also: New, GetMem, Addr, Ptr, Nil, Integer, Real Example: Super   Variables of type boolean can assume the values True and False. The boolean type is declared as an enumerated type: Type Boolean = (False, True); See also: Integer, Real, Char, Pointer An example: Program Boolean_Demo; Var UpperCase : Boolean; Begin Write('Enter a letter (a..z or A..Z): '); UpperCase := ReadKey IN ['A'..'Z']; If UpperCase then Write('UPPERCASE') ELSE Write('lowercase'); WriteLn; End. B]0!+ !+!+!+!+ !+   ! +   ! +   ! +   ! +   ! +!+These are the reserved words: AndArrayAsmAssembler BeginCaseConstDiv DowntoDoElse End ExternalFileForwardFor FunctionGotoIfImplementation InlineInterfaceInLabel ModNil NotOf OrPackedProcedure Program RecordRepeatSetShl ShrStringThen To TypeUnit UntilUses VarWhileWith Xor  The reserved words ASM and ASSEMBLER are used for writing assembly language directly in your Pascal source code. See also: InstructionSet, Reserved_Words Like this: Function HZ200 : LongInt; ASSEMBLER; ASM CLR.L-(SP) MOVE.W#$20,-(SP) TRAP#1 MOVE.L$4BA,@result MOVE.LD0,2(SP) TRAP#1 ADDQ.W#6,SP END; The ASSEMBLER directive following the procedure heading, tells the compiler that the procedure/function consists solely of assembly code. By omitting the ASSEMBLER directive, and instead using the normal Begin-End construct, ASM can be used for placing assembly instructions inbetween normal Pascal statements: Procedure Pas_and_Asm; Begin WriteLn('Hello. Press a key'); ASM MOVE.W #2,-(SP) MOVE.W #2,-(SP) TRAP#13 ADDQ.W #4,SP END; WriteLn('Thank you.'); End; B  These are the 68000 assembly language instructions accepted by the Inline Assembler: ABCD ADDADDA ADDI ADDQ ADDX AND ANDIASL ASR BCCBCHG BCLR BCS BEQ BGE BGT BHIBHS BLE BLOBLS BLT BMI BNE BNZ BPL BRABSET BSR BTST BVCBVS BZE CHK CLR CMP CMPACMPI CMPM DBCC DBCS DBEQ DBFDBGE DBGT DBHI DBHSDBLE DBLO DBLS DBLT DBMI DBNE DBNZ DBPL DBRA DBTDBVC DBVS DBZE DIVS DIVU EOREORI EXG EXT ILLEGAL JMP JSR LEALINK LSL LSR MOVE MOVEA MOVEM MOVEP MOVEQ MULS MULU NBCD NEGNEGX NOP NOT ORORIPEA RESET ROLROR ROXL ROXR RTE RTR RTS SBCDSCC SCS SEQSFSGE SGT SHI SHS SLE SLOSLS SLT SMISNE SNZ SPL STSTOP SUB SUBA SUBI SUBQ SUBX SVCSVS SWAP SZE TAS TRAP TRAPV TST UNLK These are the registers known by the Inline Assembler: D0, D1, D2, D3, D4, D5, D6, D7, A0, A1, A2, A3, A4, A5, A6, A7, SP, USP, PC, CCR, SR See also: Asm, Assembler, Reserved_Words e (    Constant declarations are used when assigning permanent values to identifiers. Examples of constant declarations are: ConstProgVersion= 1.01; KByte = 1024; Type declarations are used to create new types, or change the identifier of existing types. Examples of type declarations are: TypeMyType= Array[1..10] OF Byte; Long_Integer = LongInt; Real= Single; Variable declarations are used to create variables of a specific type. Examples of variable declarations are: VarMyVar: Integer; RealVar: Real; See also: Reserved_Words EO &0Procedures are declared like this: Procedure Identifier [ ( Parameters ) ]; See also: Function, Forward, Inline, External, Reserved_Words The optional Parameters can be one, or a mixture, of the following 3 types: Value parameters: Procedure MyProc( X : SomeType ); When the procedure is activated a copy of the X parameter is made. The procedure will then reference this copy, and not the original variable (or constant). Variable parameters: Procedure MyProc( Var X : SomeType ); When "Var" precedes a procedure parameter name, it means that the procedure will be referencing the actual parameter, and not just a copy of it. This also means that the parameter cannot be a constant. Typeless Variable parameters: Procedure MyProc( Var X ); When using Typeless Variable parameters is it possible to send a variable of any type to the procedure. This is a program that uses a procedure: Program Procedure_Demo; Var MyVar : String; Procedure GetName( Var S : String ); Begin Write('Enter your name: '); ReadLn(S); End; BEGIN GetName(MyVar); WriteLn('You entered: ',MyVar); END.  '1) Functions are declared like this: Function Identifier [ ( Parameters ) ] : FuncType; See also: Procedure, Forward, Inline, External, Reserved_Words The parameter rules are the same as for procedures. This is a program that uses a function: Program Function_Demo; Function GetName : String; Var TempVar : String; Begin Write('Enter your name: '); ReadLn(TempVar); GetName := TempVar; End; BEGIN WriteLn(GetName,' is your name.'); END. s0    ! + 4This is an overview of the predefined integer types: TypeMin-Range - MaxBits --------------------------------------------------- ShortInt-128..1278 Integer-32768..3276716 LongInt-2147483648..214748364732 Byte 0..2558 Word 0..6553516 --------------------------------------------------- See also: Real, Single, Double, Extended, Pointer, Char p    ' - 3This is an overview of the predefined real types: TypeMin -Range - Max DigitsBytes ----------------------------------------------------- Single3.4e-38..3.4e387-84 Double,Real 1.7e-308..1.7e30815-16 8 Extended1.1e-4932..1.1e493218-1910 ----------------------------------------------------- See also: ShortInt, Integer, LongInt, Byte, Word, Char      This is a skeleton of a typical HighSpeed Pascal program: Program ... Uses ... Label ...{ These six declaration blocks } Const ...{ can be mixed in any order } Type ... Var ... Procedure ... Function ... BEGIN END. See also: Reserved_Words   8      You use the "uses" clause to specify which units you wish to use in a program or in a unit. If used in a program, "uses" must appear right after the program head. If used in a unit "uses" must appear right after the word interface. See also: Reserved_Words An example: Program MyProg; Uses GemDecl,GemVDI; ..... Another example: UNIT MyUnit; INTERFACE Uses Dos,Bios; .....  &,  The reserved word "unit" tells the compiler that it is about to compile a unit, and not a program. See also: Interface, Implementation, Uses, Reserved_Words This is a skeleton of a simple unit: UNIT UnitName; INTERFACE Uses Unit1, Unit2, ..., Unitn; { Public symbols goes here. } IMPLEMENTATION { Private symbols goes here. } BEGIN { Initialization statements goes here. } { If no initialization is required just forget the BEGIN. } END. Q   " The reserved word "implementation" marks the beginning of private symbols in a unit. In other words: All Constants, Types, Variables, Procedures and Functions declared after the word "implementation" will only be available to the unit itself. In order to make a symbol public, it's declaration must be moved into the interface part of the unit. See also: Interface, Unit, Uses, Reserved_Words An example: UNIT MyUnit; INTERFACE Var MyPublicVar : Integer;{ Avail. to other programs/units. } Procedure MyPublicProc;{ Avail. to other programs/units. } IMPLEMENTATION Procedure MyPrivateProc;{ This procedure is ONLY available to } Begin{ other routines in this unit. Because} WriteLn('Private!');{ it's declaration is only present in } End;{ the IMPLEMENTATION part.} Procedure MyPublicProc; Begin WriteLn('Public.'); End; END.  9&1 !' The reserved word "interface" marks the beginning of public symbols in a unit. In other words: All Constants, Types, Variables, Procedures and Functions declared in between the words "interface" and implementation will be available to any program, or unit, that uses the unit. See also: Implementation, Unit, Uses, Reserved_Words An example: UNIT MyUnit; INTERFACE Procedure MyProc( P1,P2,P3 : Integer ); { Can be used by others. } IMPLEMENTATION Procedure MyProc( P1,P2,P3 : Integer ); Begin { Statements goes here } End; END. @M The reserved word "begin" is used together with the reserved word end to form compound statements. See also: End, Reserved_Words An example: If (X = 1234) then Begin { Beginning of compound statement. } WriteLn('Statement 1'); WriteLn('Statement 2'); WriteLn('Statement 3'); End;{ End of compound statement. }   ,The reserved word "end" is used in three different situations: 1. Together with Begin, to form compound statements. 2. Together with Case to form case statements. 3. Together with Record to form record types. See also: Begin, Case, Record, Statements, Reserved_Words An example: Program MyProg; Type MyType = Record{ Start record type. } Data : Char; UpCas: Boolean; End;{ End record type. } Var MyData : MyType; Begin{ Start compound statement. } Write('Enter something: '); MyData.Data := ReadKey; With MyData Do Case Data of { Start case statement. } 'A'..'Z' : UpCas := True; 'a'..'z' : UpCas := False; End;{ End case statement. } End.{ End compound statement. } s case expression of event1 : statement; event2 : statement; ... eventn : statement else{ The "else" part is optional. } statements; end; Expression is compared to the list of events. If a match is found, the statement following the event is executed, and an exit is made from the case statement. If no match is found and an "else" is present, the statements following "else" are executed. See also: Reserved_Words, Record An example: Program Case_Demo; Var MyVar : Char; Begin Write('Enter something: '); MyVar := ReadKey; DelLine; Case MyVar Of 'a'..'z' : WriteLn('Small letter.'); 'A'..'Z' : WriteLn('Big letter.'); '0'..'9' : WriteLn('Digit.') Else WriteLn('I do not recognize the data.'); WriteLn('----------------------------'); End; End. 7; $Variables of type char are used to store ASCII characters. You can obtain a characters ASCII number by using the Ord function. And you can obtain ASCII character number X, by using the Chr function. See also: Ord, Chr, Integer, Real, Reserved_Words An example: Program Char_Demo; Var MyChar : Char; Begin {$R-} Write('Enter first letter: '); MyChar := ReadKey; ClrScr; While Ord(MyChar) < 256 Do Begin Write(MyChar); MyChar := Chr(Ord(MyChar)+1); End; WriteLn; End.    Arrays are defined like this: Array[ IndexRange ] Of Element-type; The element-type can be any type, but the indexrange must an ordinal type expressed like this: StartIndex .. StopIndex If is possible to create multidimensional arrays, by separating each indexrange with a comma. See also: Record, Packed, Reserved_Words An Example: Program Array_Demo; Const MaxDisks= 10; Type SingleDisk = Record DiskLabel : String[40]; Capacity: LongInt; End; Var MyDisks: Array[1..MaxDisks] Of SingleDisk; Counter: Byte; A: Char; Begin Counter := 0; Repeat Write('Enter info on disk #',Counter+1,' (Y/N): '); Repeat A := UpCase(ReadKey); Until (A IN ['Y','N']); If (A = 'Y') then Begin DelLine; Inc(Counter); With MyDisks[Counter] Do Begin Write('Enter label: '); ReadLn(DiskLabel); Write('Enter size : '); ReadLn(Capacity); End; End; Until (A = 'N'); ClrScr; While Counter > 0 Do Begin With MyDisks[Counter] Do WriteLn('Label: ',DiskLabel:40,'. Size : ',Capacity:10); Dec(Counter); End; End.   Records are declared like this: Record field1 : field-type; field2 : field-type; ... fieldn : field-type; case tag : type of{ The "case" part is optional. } event1 : ( fields ); ... eventn : ( fields ); End; See also: With, Array, Packed, Reserved_Words An example: Program Record_Demo; Uses Dos; Type VariantRec = Record Case Byte Of 0 : (Long : LongInt); 1 : (Inte : Integer); End; Var Data: VariantRec; Begin Write('Enter a LongInt value : '); ReadLn(Data.Long); Write('Enter an integer value: '); ReadLn(Data.Inte); WriteLn; WriteLn('Notice:'); WriteLn; WriteLn('The size of DATA is only ',SizeOf(Data),' bytes,'); WriteLn('and not 6 bytes as could be expected, because DATA'); WriteLn('holds both a LongInt and an Integer variable.'); End. 5X#, #)1Strings are declared like this: string[ maximum_length ]; or string; A string can be looked upon as an array of char elements. The first element (element 0), holds the number of char elements currently in the string. The second element (element 1) holds the first character in the string. If no maximum length is specified when the string is declared, the maximum length will default to 255 characters, which is the highest number of characters a string can contain. See also: Reserved_Words, Length, Copy, Insert, Delete An example: Program String_Demo; Var NameStr: String[20]; StreetStr: String[30]; AddressStr : String[50]; Begin Write('Enter name : '); ReadLn(NameStr); Write('Enter street: '); ReadLn(StreetStr); AddressStr := NameStr+','+StreetStr; WriteLn('You entered : ',AddressStr); End.    repeat statement; .... statement; until expression The statements in between "repeat" and "until" are repeated until "expression" equals true. As can be seen from the structure of the loop, the statements are always executed at least once. See also: While_Do, For_Do, Reserved_Words An example: Program Repeat_Until_Demo; Begin Repeat WriteLn('Press any key.'); Until KeyPressed; End.   !while expression do statement The statement following "do" is executed if, and as long as, "expression" equals true. See also: For_Do, Repeat_Until, Reserved_Words An example: Program While_Do_Demo; Begin While Not(KeyPressed) Do WriteLn('Press any key.'); End. O`  #for counter := start to finish do statement or for counter := start downto finish do statement The statement following "do" will be executed once for each value in the range start to finish. If the "to" structure is used, the counter variable will be incremented by one for each loop. If the "downto" structure is used counter will be decremented by one for each loop. Counter, Start and Finish must all be ordinal types. See also: While_Do, Repeat_Until, Reserved_Words An example: Program For_Do_Demo; Var C : Integer; Begin For C := 1 to 10 DO WriteLn('Press any key.'); End.   if expression then statement else{ The "else" is optional } statement If "expression" equals true, the statement following "then" will be executed. Otherwise if "else" is present, the statement following "else" will be executed. See also: Else, Reserved_Words An example: Program If_Demo; Begin If (1 = 1) then WriteLn('Yes. 1 is the same as 1.') Else WriteLn('Something is very wrong!'); End. ``%, The reserved word "else" is used in if and case statements. See also: If, Case, Reserved_Words nn#*27  The reserved word "do" is used in while, for and with statements. See also: While, For, With, Reserved_Words lr The reserved word "of" is used in: Case statements and Array, File (See Text) and Set type declarations.     (procedure identifier [ (parameters) ];external; or function identifier [ (parameters) ] : functype; external; The reserved word "external" is used whenever separately compiled assembly routines are to be linked with your Pascal code. The {$L filename} compiler directive is used to load the object code generated by the assembler. See also: Directives, Inline, Forward, Reserved_Words Some examples: procedure fastcode( p1,p2 : integer ); external; function scrsize : longint; external; {$L fastlib.o} <=  )3The reserved word "inline" is used to insert machine code instructions directly into your Pascal programs. See also: External, Forward, Procedure, Function, Reserved_Words An example: Program Inline_Demo; Procedure Nop_Nop_Nop; Inline $4E71,$4E71,$4E71; Begin Nop_Nop_Nop; { Execute 3 NOP instructions. } End. y+/94 44The reserved word packed is primarily used in array and record declarations: Type / Var myarray= packed array[ .... ] of element-type myrecord = packed record ... end; When an array or a record is not packed, the compiler will pad an alignment-byte on those elements in the structure that take up an odd number of bytes in memory. When a structure is packed, no aligning will be used. An example: VarMyArray : Array[1..1000] Of Char; This declaration will produce an array (MyArray) that takes up 2000 bytes of memory. The reason for this is that an alignment-byte is padded on all the elements in the array. If you use packed: VarMyArray : Packed Array[1..1000] Of Char; the size of the array (MyArray) will be only 1000 bytes, because no aligning is done. Another example: VarMyRecord : Record A,B,C,D,E,F,G : Byte; End; This declaration will produce a record (MyRecord) that takes up 14 bytes of memory: (1 data-byte + 1 alignment-byte) * 7 elements. If you use packed: VarMyRecord : Packed Record A,B,C,D,E,F,G : Byte; End; the size of the record should be 7 bytes (1 data-byte * 7 elements), but it is not. The reason for this is that any data stored immediately after MyRecord, must start at an even address, so the size calculation looks like this: (1 data-byte * 7 elements) + 1 alignment-byte = 8 bytes. See also: Array, Record, Reserved_Words An example: Program Packed_Demo; Var PackedYes : packed Array[1..1000] Of Byte; PackedNo: Array[1..1000] Of Byte; Begin WriteLn('Size of packed structure is ',SizeOf(PackedYes)); {1000} WriteLn('Size of unpacked structure is ',SizeOf(PackedNo)); {2000} End.   (2The reserved word "forward" is used to make procedures and functions known before they are actually declared. The actual declaration, including the statement of the procedure or function must appear later in the program. See also: Inline, External, Procedure, Function, Reserved_Words An example: Program Forward_Demo; Procedure B; Forward; Procedure A; Begin WriteLn('In A. Going to B.'); B; End; Procedure B; Begin WriteLn('In B.'); End; BEGIN A; END.  The reserved word "with" is used as an easy way to reference the fields in a record. with recordname do statement See also: Record An example: Program With_Demo; Var MyRecord : Record Firm: String[10]; Address : String[20]; End; Begin With MyRecord Do Begin Firm:= 'D-House 1'; Address := 'Transformervej 29'; End; { This is the same as writing: } MyRecord.Firm:= 'D-House 1'; MyRecord.Address := 'Transformervej 29'; End. \ %-These are the HighSpeed Pascal operators: See also: Reserved_Words OperatorAction ------------------------------------------------------------ DIVInteger division. MODInteger modulo. NOTInteger bitwise negation. Boolean logical negation. ANDInteger bitwise AND. Boolean logical AND. ORInteger bitwise inclusive OR. Boolean logical inclusive OR. XORInteger bitwise exclusive OR. Boolean logical exclusive OR. SHLInteger bitwise shift-left. SHRInteger bitwise shift-right. +Integer or real addition. String concatenation. Set union. -Integer or real subtraction. Set difference. *Integer or real multiplication. Set intersection. /Real division. The following operators all returns true or false as their result. =Compares ordinal, real, string, pointer, and set types. <>Compares ordinal, real, string, pointer, and set types. <Compares ordinal, real, and string types. >Compares ordinal, real, and string types. <=Compares ordinal, real, string, and set types. >=Compares ordinal, real, string, and set types. INReturns true if the left operand in present in the right operand (set type). ?Mx '0aaThis is the INTERFACE part of the STPascal unit: See also: Dos, Printer, Bios, System, System2, Graph Unit STPascal; INTERFACE Uses GemDecl, GemAES, GemVDI, Dos, Bios; {-----------------------------------------------------------} {ST-PASCAL GENERALS } {-----------------------------------------------------------} Const Long_MaxInt= MaxLongInt; Screen_Device = 1; Printer_Device = 21; Max_C_String= 255; Max_Fn= 12; Max_Path= 80; Type Alfa= Packed Array[1..10] of Char; Short_Integer = Integer; Long_Integer= LongInt; C_String= PACKED Array[ 0..Max_C_String ] of Char; String_Ptr= ^C_String; File_Name= String[ Max_Fn ]; Path_Name= String[ Max_Path ]; { Conversions : } Function Short_Round(r : Real) : Short_Integer; Function Short_Trunc(r : Real) : Short_Integer; Function Long_Round(r : Real) : Long_Integer; Function Long_Trunc(r : Real) : Long_Integer; Function Int(long : Long_Integer) : Integer; Procedure CtoPstr(Cstr : C_String; Var Pstr : String); Procedure PtoCstr(Pstr : String; Var Cstr : C_String); Function ST_Shl(a,b : Long_Integer) : Long_Integer; Function ST_Shr(a,b : Long_Integer) : Long_Integer; { Math : } Function PwrOfTen(n : Integer) : Real; { System : } Procedure BasePage(Var p : Pointer); { Command line : } Function Cmd_Args : Integer; Procedure Cmd_GetArg(n : Integer; Var s : String); Function Option(s : String) : Boolean; { Test : } Function Filename(s : String) : Boolean; Function Keypress : Boolean; Function IO_Result : Integer;{ NOTE : Result differences! } { Storage : } Function Peek(a : Long_Integer) : Byte; Function Wpeek(a : Long_Integer) : Integer; Function Lpeek(a : Long_Integer) : Long_Integer; Procedure Poke(a : Long_Integer; value : Byte); Procedure Wpoke(a : Long_Integer; value : Integer); Procedure Lpoke(a : Long_Integer; value : Long_Integer); Procedure Move_B(source, dest, number : Long_Integer); Procedure Move_W(source, dest, number : Long_Integer); Procedure Move_L(source, dest, number : Long_Integer); { Time/date : } Function Clock : Long_Integer; Procedure SetDate(day, month, year : Integer); Procedure SetTime(hour, minute, second : Integer); Procedure GetDate(Var day, month, year : Integer); Procedure GetTime(Var hour, minute, second : Integer); { VT-52 : } Procedure Cur_On; Procedure Cur_Off; Procedure Cur_Up; Procedure Cur_Down; Procedure Cur_Right; Procedure Cur_Left; Procedure Cur_Up_Scroll; Procedure Cur_Down_Scroll; Procedure Cur_Home; Procedure Clear_Home; { GotoXY is implemented i the System2 unit. } Procedure Save_Cursor; Procedure Restore_Cursor; Procedure Select_Color(color : Integer); Procedure Select_Background(color : Integer); Procedure Inv_On; Procedure Inv_Off; Procedure Delete_Line; Procedure Clear_Line; Procedure Insert_Line; Procedure Start_Of_Line; Procedure End_Of_Line; Procedure End_Of_Screen; Procedure Start_Of_Screen; Procedure Wrap_On; Procedure Wrap_Off; { Supervisor : } Function InSuper : Boolean; Procedure Super(on : Boolean); { Screen handling declarations : } Const Scrlen_B= 32000; Scrlen_W= 16000; Scrlen_L= 8000; Type Err_Code= Short_Integer; Screen_B= PACKED ARRAY [ 0..31999 ] OF ShortInt; Screen_I= PACKED ARRAY [ 0..15999 ] OF Short_Integer; Screen_L= PACKED ARRAY [ 0..7999 ] OF Long_Integer; Ptr_Screen= ^Screen_L; Palette= PACKED ARRAY [ 0..15 ] OF Short_Integer; Resolution= Short_Integer; Screen_Type= PACKED RECORD  Res : Resolution;  Pal : Palette;  Pic : Screen_L END; Procedure Get_Screen(var buf : Screen_Type); Procedure Put_Screen(var buf : Screen_Type); FunctionRead_Screen (format : integer; name : string; var buf : Screen_Type) : Err_Code; FunctionWrite_Screen(format : integer; name : string; var buf : Screen_Type) : Err_Code; {-----------------------------------------------------------} {GEM-SECTION} {-----------------------------------------------------------} Const No_Port=0; Root=0; Null_Index = -1; Max_Len= 81; Max_Depth =8; Max_Tree= 100; No_Window = -1; Max_WTitle = 80; R_Tree= 0; R_String= 5; E_Keyboard = 1; E_Button= 2; E_Mouse1= 4; E_Mouse2= 8; E_Message = 16; E_Timer= 32; Replace_Mode= 1; Trans_Mode= 2; XOR_Mode= 3; Rev_Trans_Mode = 4; Pat1 = 2; Pat2 = 3; Pat3 = 4; Pat4 = 5; Pat5 = 6; Pat6 = 7; Pat7 = 8; Pat8 = 9; Pat9 = 10; Pat10 = 11; Pat11 = 12; Pat12 = 13; Pat13 = 14; Pat14 = 15; Pat15 = 16; Pat16 = 17; Pat17 = 18; Pat18 = 19; Pat19 = 20; Pat20 = 21; Pat21 = 22; Pat22 = 23; Pat23 = 24; Pat24 = 25;  Hatch1 = 26; Hatch2 = 27; Hatch3 = 28; Hatch4 = 29; Hatch5 = 30; Hatch6 = 31; Hatch7 = 32; Hatch8 = 33; Hatch9 = 34; Hatch10 = 35; Hatch11 = 36; Hatch12 = 37; Solid= 1; LongDash= 2; Dotted= 3; DashDot= 4; Dashed= 5; DashDotDot = 6; Normal= 0; Thickened = 1; Lightened = 2; Slanted= 4; Underlined = 8; Outlined= 16; Shadowed= 32; System_Font = 3; Small_Font = 5; G_Box= 20; G_Text= 21; G_BoxText = 22; G_Image= 23; G_ProgDef = 24; G_IBox= 25; G_Button= 26; G_BoxChar = 27; G_String= 28; G_FText= 29; G_FBoxText = 30; G_Icon= 31; G_Title= 32; None= $000; Selectable = $001; Default= $002; Exit_Btn= $004; Editable= $008; Radio_Btn = $010; Last_Ob= $020; Touch_Exit = $040; Hide_Tree = $080; Indirect= $100; Selected = $01; Crossed = $02; Checked = $04; Disabled = $08; G_Name= $001; G_Close= $002; G_Full= $004; G_Move= $008; G_Info= $010; G_Size= $020; G_UpArrow = $040; G_DnArrow = $080; G_VSlide = $100; G_LArrow = $200; G_RArrow = $400; G_HSlide = $800; G_All= $FEF; White= 0;Black = 1; Red= 2;Green= 3; Blue= 4;Cyan = 5; Yellow= 6; Magenta = 7; L_White= 8;L_Black = 9; L_Red= 10;L_Green = 11; L_Blue= 12;L_Cyan = 13; L_Yellow = 14;L_Magenta = 15; MN_Selected = 10; WM_Redraw= 20; WM_Topped= 21; WM_Closed = 22; WM_Fulled= 23; WM_Arrowed = 24; WM_HSlid= 25; WM_VSlid = 26; WM_Sized= 27; WM_Moved = 28; WF_PrevXYWH = 6;WF_FullXYWH = 7; WF_HSlide= 8; WF_VSlide = 9; WF_HSlSize = 15; WF_VSlSize = 16; AC_Open= 40; AC_Close= 41; Type Color_Reg= 0..15; Draw_Modes = Replace_Mode..Rev_Trans_Mode; Line_Types = Solid..DashDotDot; Paint_Types = None..Hatch12; Gem_Device = Screen_Device..Printer_Device; Inq_Type= (Open_Vals, Ext_Vals); Mouse_Type = (M_Arrow, M_Text_Curs, M_Bee, M_Point_Hand, M_Flat_Hand, M_Thin_Cross, M_Thick_Cross, M_Outln_Cross); Text_Ptr= ^Char; Word16= Array[ 0..15 ] of Integer; Mouse_Form = Record hot_x, hot_y, res, mask_color, data_color : Integer; mask, data: Word16 End; Window_Title= String[ Max_WTitle ]; Message_Buffer = Array[ 0..15 ] of Short_Integer; Ctrl_Parms= Array[ 0..11 ] of Short_Integer; Int_In_Parms= Array[ 0..15 ] of Short_Integer; Int_Out_Parms = Array[ 0..45 ] of Short_Integer; Pts_In_Parms= Array[ 0..11 ] of Short_Integer; Pts_Out_Parms = Array[ 0..11 ] of Short_Integer; Addr_In_Parms = Array[ 0..1 ] of Pointer; Addr_Out_Parms = Array[ 0..0 ] of Pointer; Point= Record x, y : Short_Integer End; Rectangle= Record x, y, w, h : Short_Integer End; Str30= String[ 30 ]; Str255= String[ 255 ]; TE_Just= (TE_Left, TE_Right, TE_Center); Tree_Range= Root..Max_Tree; Tree_Index= Null_Index..Max_Tree; Ob_Type= G_Box..G_Title; Text_Ed_Info= Record te_ptext, te_ptmplt, te_pvalid: String_Ptr; te_font, te_junk1, te_just, te_color, te_junk2, te_thickness, te_txtlen, te_tmplen: Short_Integer End; Ted_Ptr= ^Text_Ed_Info; Spec_Info= Record CASE Ob_Type of G_Box, G_IBox, G_BoxChar: (thick,color : Short_Integer); G_Text, G_BoxText, G_FText, G_FBoxText: (info : Ted_Ptr); G_Image, G_ProgDef, G_Button, G_Icon: (ptr : Long_Integer); G_String, G_Title: (str : String_Ptr) End; Object= Record ob_next, ob_head, ob_tail : Integer; ob_type, ob_flags, ob_state : Short_Integer; ob_spec : Spec_Info; ob_x, ob_y, ob_w, ob_h: Short_Integer End; Tree= Array[ Tree_Range ] of Object; Tree_Ptr= ^Tree; Menu_Ptr= Tree_Ptr; Dialog_Ptr= Tree_Ptr; Icon_Block= Record ib_pmask, ib_pdata, ib_ptext : Long_Integer; ib_char, ib_xchar, ib_ychar, ib_xicon, ib_yicon, ib_wicon, ib_hicon, ib_xtext, ib_ytext, ib_wtext, ib_htext : Short_Integer End; Bit_Block= Record bi_pdata : Long_Integer; bi_wb, bi_hl, bi_x, bi_y, bi_color : Short_Integer End; User_Blk= Record ub_code, ub_parm : Long_Integer End; Parm_Blk= Record pb_tree: Long_Integer; pb_obj, pb_prevstate, pb_currstate, pb_x, pb_y, pb_w, pb_h, pb_xc, pb_yc, pb_wc, pb_hc: Short_Integer; pb_parm: Long_Integer End; FunctionAdd_DItem(dial : Dialog_Ptr; i_type,flags,x,y,  w,h,border,color : Short_Integer) : Tree_Index; FunctionAdd_MItem(menu : Menu_Ptr; title : Tree_Index; item : Str255) : Short_Integer; FunctionAdd_MTitle(menu : Menu_Ptr; item : Str255) : Short_Integer; Procedure AES_Call(op: Short_Integer; Var Int_in: Int_in_parms; Var INT_out: Int_out_Parms; Var addr_in: addr_in_Parms; Var Addr_out : addr_out_parms); FunctionAES_Version: Short_Integer; Procedure Begin_Mouse; Procedure Begin_Update; Procedure Border_Rect(wind : Short_Integer; Var x,y,w,h : Short_Integer); Procedure Bring_To_Front(handle : Short_Integer); Procedure Center_Dialog(dial : Dialog_Ptr); Procedure Clear_Screen; Procedure Close_Window(handle : Short_Integer); Procedure Delete_Dialog(dial : Dialog_Ptr); Procedure Delete_Menu(menu : Menu_Ptr); Procedure Delete_Window(handle : Short_Integer); FunctionDo_Alert(alert : Str255; def_btn : Short_Integer) : Short_Integer; FunctionDo_Dialog(dial : Dialog_Ptr; start_obj : Short_Integer) : Short_Integer; Procedure DragBox(x1,y1,w1,h1,x2,y2,w2,h2 : Short_Integer; Var endx,endy : Short_Integer); Procedure Draw_Menu(menu : Menu_Ptr); Procedure Draw_Mode(mode : Draw_Modes); Procedure Draw_String(x,y : Short_Integer; s : Str255); FunctionD_Color(Border, Text : Short_Integer; Mode : Boolean; Pattern, Inside : Short_Integer) : Short_Integer; Procedure End_Dialog(dial : Dialog_Ptr); Procedure End_Mouse; Procedure End_Update; Procedure Erase_Menu(menu : Menu_Ptr); Procedure Exit_Gem; Procedure Find_Alert(index : Short_Integer; Var alert : Str255); Procedure Find_Dialog(index : Short_Integer; Var dial : Dialog_Ptr); Procedure Find_Menu(index : Short_Integer; Var menu : Menu_Ptr); FunctionFind_Resource(r_type,r_index : Short_Integer) : tree_ptr; FunctionFind_Window(x,y : Short_Integer) : Short_Integer; Procedure First_Rect(wind : Short_Integer; Var x,y,w,h : Short_Integer); Procedure Frame_Arc(x,y,x_rad,y_rad,beg_ang,end_ang : Short_Integer); Procedure Frame_Oval(x,y,x_rad,y_rad : Short_Integer); Procedure Frame_Rect(x,y,w,h : Short_Integer); Procedure Frame_Round_Rect(x,y,w,h : Short_Integer); Procedure Free_Resource; FunctionFront_Window : Short_Integer; Procedure Get_DEdit(dial : Dialog_Ptr; item : Tree_Index; Var s : Str255); FunctionGet_Event(emask, bmask, bstate, n_clicks: Short_Integer;  ticks: Long_Integer;  m1_flag: boolean;  m1x, m1y, m1w, m1h: Short_Integer;  m2_flag: boolean;  m2x, m2y, m2w, m2h: Short_Integer;  Var message: Message_Buffer;  Var key,brtn,bclick,mx,my,kstate : Short_Integer  ) : Short_Integer; FunctionGet_Ex_In_File(Var path, name : Path_Name; Title: Str30) : boolean; FunctionGet_In_File(Var path, name : Path_Name) : boolean; FunctionGet_Out_File(prompt : Str255; Var name : Path_Name) : boolean; FunctionGet_Window : Short_Integer; Procedure GrowBox(kl_x,kl_y,kl_b,kl_h,gr_x,gr_y,gr_b,gr_h : Short_Integer); Procedure Hide_Mouse; FunctionInit_Gem : Short_Integer; Procedure Init_Mouse; Procedure Justified_Text(x,y,Laenge,wort,zeichen : Short_Integer; s : Str255); Procedure Line_Color(color : Color_Reg); Procedure Line_Endstyle(start_style, end_style : Short_Integer); Procedure Line_Style(style : Line_Types); Procedure Line_To(newx,newy : Short_Integer); Procedure Line_Width(width : Short_Integer); FunctionLoad_Resource(fn : Str255) : boolean; Procedure Menu_Check(menu : Menu_Ptr; item : Tree_Index; checked : boolean); Procedure Menu_Disable(menu : Menu_Ptr; item : Tree_Index); Procedure Menu_Enable(menu : Menu_Ptr; item : Tree_Index); Procedure Menu_Hilight(menu : Menu_Ptr; title : Tree_Index); Procedure Menu_Normal(menu : Menu_Ptr; title : Tree_Index); FunctionMenu_Register(id : Short_Integer; Var name : Str255) : Short_Integer; Procedure Menu_Text(menu : Menu_Ptr; item : Tree_Index; Var mtext : Str255); Procedure MoveBox(x1,y1,w,h,x2,y2: Short_Integer); Procedure Move_To(x,y : Short_Integer); FunctionNew_Dialog(n_items, x, y, w, h : Short_Integer) : Dialog_Ptr; FunctionNew_Menu(n_items : Short_Integer; about : Str255) : Menu_Ptr; FunctionNew_Window(w_type : Short_Integer; Var title : Window_Title; x_max, y_max, w_max, h_max : Short_Integer) : Short_Integer; Procedure Next_Rect(wind : Short_Integer; Var x,y,w,h : Short_Integer); Procedure Obj_Draw(t: Tree_ptr; start,tiefe : Tree_index; x_clip,y_clip,b_clip,h_clip : Short_Integer); FunctionObj_Find(obj : Dialog_ptr; start,depth,x,y : Short_Integer) : Short_Integer; FunctionObj_Flags(dial : Dialog_Ptr; index : Tree_Index) : Short_Integer; Procedure Obj_Offset(t : Dialog_ptr; index : Short_Integer; Var x,y : Short_Integer); Procedure Obj_Redraw(Box : Dialog_Ptr; item : Tree_index); Procedure Obj_SetFlags(dial : Dialog_Ptr; index : Tree_Index; flags : Short_Integer); Procedure Obj_SetState(dial : Dialog_Ptr; index : Tree_Index; state : Short_Integer; redraw : boolean); Procedure Obj_Size(t: Tree_Ptr; index: Short_Integer; Var x,y,w,h : Short_Integer); FunctionObj_State(dial : Dialog_Ptr; index : Tree_Index) : Short_Integer; Procedure Open_Window(handle, x,y,w,h : Short_Integer); Procedure Paint_Arc(x,y,x_rad,y_rad,beg_ang,end_ang : Short_Integer); Procedure Paint_Color(color : Color_Reg); Procedure Paint_Outline(on : boolean); Procedure Paint_Oval(x,y,x_rad,y_rad : Short_Integer); Procedure Paint_Rect(x,y,w,h : Short_Integer); Procedure Paint_Round_Rect(x,y,w,h : Short_Integer); Procedure Paint_Style(style : Short_Integer); Procedure PLine(x1,y1,x2,y2 : Short_Integer); procedure Line (x1,y1,x2,y2 : Short_Integer);{ same as PLine } Procedure Plot(x,y : Short_Integer); FunctionRect_Intersect(x,y,w,h: Short_Integer; Var x1,y1,w1,h1 : Short_Integer) : boolean; FunctionRedo_Dialog(dial : Dialog_Ptr; start_obj : Short_Integer) : Short_Integer; Procedure RubberBox(x,y,w1,h1:Short_Integer; Var w2,h2 :Short_Integer); Procedure Set_Clip(x,y,w,h : Short_Integer); Procedure Set_Color(reg : Color_Reg; red,green,blue : Short_Integer); Procedure Set_DEdit(dial : Dialog_Ptr; item : Tree_Index;  template, valid, initial : Str255;  font : Short_Integer; just : TE_Just); Procedure Set_DText(dial : Dialog_Ptr; item : Tree_Index; s : Str255;  font : Short_Integer; just : TE_Just); Procedure Set_MForm(Var form : Mouse_Form); Procedure Set_Mouse(m_type : Mouse_Type); Procedure Set_Window(handle : Short_Integer); Procedure Set_WInfo(handle : Short_Integer; Var info : Window_Title); Procedure Set_WName(handle : Short_Integer; Var title : Window_Title); Procedure Set_WSize(handle,x,y,w,h : Short_Integer); Procedure Show_Dialog(Box : Dialog_Ptr); Procedure Show_Mouse; Procedure ShrinkBox(kl_x,kl_y,kl_b,kl_h,gr_x,gr_y,gr_b,gr_h : Short_Integer); Procedure Sys_Font_Size(Var w_char,h_char,w_box,h_box : Short_Integer); Procedure Text_Alignment(hor,ver : Short_Integer); Procedure Text_Color(color : Color_Reg); Procedure Text_Heigth(Hoehe : Short_Integer); Procedure Text_Rotation(angle : Short_Integer); Procedure Text_Style(style : Short_Integer); Procedure VDI_Call(cmd, sub_cmd, nints, npts: Short_Integer; Var ctrl: Ctrl_Parms; Var int_in: Int_In_Parms; Var int_out: Int_Out_Parms; Var pts_in: Pts_In_Parms; Var pts_out: Pts_Out_Parms; translate: boolean); Procedure Wind_Get(handle,request : Short_Integer; Var v1,v2,v3,v4 : Short_Integer); Procedure Wind_Set(handle,request,v1,v2,v3,v4 : Short_Integer); Procedure Work_Rect(wind : Short_Integer; Var x,y,w,h : Short_Integer); aT !*1%6'n1z,&These are the routines implemented in the Bios unit. See also: Dos, Printer, System, System2, Graph, STPascal Disk related procedures and functions: Function FlopRd( Count, Side, Trck, Sector, Dev : Integer; Filler, Buffer : Pointer ) : Integer; Reads one or more sectors from a floppy drive. Function FlopWr( Count, Side, Trck, Sector, Dev : Integer; Filler, Buffer : Pointer ) : Integer; Writes one or more sectors to a floppy drive. Function FlopVer( Count, Side, Trck, Sector, Dev : Integer; Filler, Buffer : Pointer ) : Integer; Verifies one or more sectors on a floppy drive. Function FlopFmt( FillVal : Integer; Magic: LongInt; InterLv, Side, Trck, Spt, Dev : Integer; Filler, Buffer: Pointer ) : Integer; Formats a track on a floppy drive. Function Rwabs( Device, StartSect, Count : Integer; Buffer : Pointer; RwFlag : Integer ) : LongInt; Reads one or more logical sectors from a disk drive. Procedure ProTobt( BootAble, DiskType : Integer; SerialNum: LongInt; Buffer: Pointer ); Creates a prototype of a boot sector. Function DrvMap : LongInt; Returns information about the number of drives attached to the system. Function MediaCh( Device : Integer ) : LongInt; Checks to see if a media (disk) has been changed. Function GetBpb( Device : Integer ) : Pointer; Returns the BIOS parameter block for a specified drive. Function DMAread( DevNo : Integer; Buffer : Pointer; Count : Integer; Sector : LongInt) : LongInt; Reads sectors from a device into a buffer. Function DMAwrite( DevNo : Integer; Buffer : Pointer; Count : Integer; Sector : LongInt) : LongInt; Writes sectors from a buffer to a device. Screen related procedures and functions: Function PhysBase : Pointer; Returns the address of the physical screen memory. Function LogBase : Pointer; Returns the address of the logical screen memory. Function GetRez : Integer; Returns information about the current screen resolution. Procedure SetScreen( Reso : Integer; Fys,Log : Pointer ); Sets the screen resolution and the physical and logical screen memory address. Procedure ScrDmp; Dumps the screen to the printer. Procedure Vsync; Waits for the next vertical-blank interrupt. Procedure PrtBlk( P : Pointer ); - Procedure SetPalette( PalPtr : Pointer ); Sets the contents of the hardware palette register. Function SetColor( NewColor, PalEntry : Integer ) : Integer; Sets a palette entry to a given color. Function EsetShift( ShftMode : Integer ) : Integer; Sets the TT shift mode register. Function EgetShift : Integer; Returns the current shift mode register value. Function EsetBank( BankNum : Integer ) : Integer; Sets bank for active TT color lookup table. Function EsetColor( Color, ColorNum : Integer ) : Integer; Sets ColorNum in the TT color lookup table to Color. Procedure EsetPalette( PalettePtr : Pointer; Count, ColorNum : Integer); Sets the contents of a number of TT hardware palette registers.  Procedure EgetPalette( PalettePtr : Pointer; Count, ColorNum : Integer); Returns the contents of a number of TT hardware palette registers. Function EsetGray( Switch : Integer ) : Integer; Sets the manner in which the color lookup table in interpreted by the display hardware. Function EsetSmear( Switch : Integer ) : Integer; Sets the video smear mode. Parallel and Serial port procedures and functions: Function RsConf( Scr, Tsr, Rsr, Ucr, Ctr, Speed : Integer ) : LongInt; Configures the serial port. Function SetPrt( Config : Integer ) : Integer; Gets or sets the printer configuration byte. Function IoRec( Device : Integer ) : Pointer; Returns a pointer to a serial devices input buffer record. Keyboard and Cursor procedures and functions: Function CursConf( BlinkRate, State : Integer ) : Integer; Sets the state of the cursor. Function KbShift( ModeFlag : Integer ) : LongInt; Returns the status of the Control, Caps and Shift keys. Function KeyTbl( Capsed, Shifted, UnShifted : Pointer ) : Pointer; Sets pointers to the keyboard translation tables. Procedure BiosKeys; Restores the default BIOS translation tables. Procedure IKbdWs( Data : Pointer; Chars : Integer ); Writes a sequence of characters to the keyboard. Function KbdvBase : Pointer; - Function KbRate( RepRat, WaitBeforeRep : Integer ) : Integer; Sets the keyboard repeat rate. Sound procedures and functions: Function Giaccess( RegNo : Integer; Data : Byte ) : Byte; Reads or writes a register on the sound chip. Procedure OffGiBit( BitNumber : Integer ); Sets a bit in the PORT A register to zero. Procedure OnGiBit( BitNumber : Integer ); Sets a bit in the PORT A register to one. Procedure MidiWs( Data : Pointer; Chars : Integer ); Writes a sequence of characters to the midi port. Procedure DoSound( CommandPtr : Pointer ); Executes a block of sound chip commands. Interrupt procedures: Procedure jDisInt( IntNum : Integer ); Disables an interrupt. Procedure jEnabInt( IntNum : Integer ); Enables an interrupt. Procedure MfpInt( NewVector : Pointer; IntNo : Integer ); Sets an interrupt vector. Function SetExc( Vector : Pointer; VecNum : Integer ) : Pointer; Sets an interrupt vector. Procedure XbTimer( IntHandler : Pointer; Data, Ctrl, Timer : Integer ); Initializes and starts the MFP 68901-Timer. IO procedures and functions: Function BConStat( Device : Integer ) : Integer; Returns the status of a character device. Function BConIn( Device : Integer ) : LongInt; Reads a character from a device. Procedure BConOut( Character, Device : Integer ); Writes a character to a device. Function BCoStat( Device : Integer ) : LongInt; Returns the character output status for a device. Function BConMap( DevNo : Integer ) : Pointer; Maps a device. Miscellaneous procedures and functions: Function X_Random : LongInt; Returns a random number. Procedure XSetTime( DateTime : LongInt ); Sets the time and date in the keyboard. Function XGetTime : LongInt; Gets the time and date in the keyboard. Function TickCal : LongInt; Returns a system-timer calibration value. Procedure SupExec( CodePtr : Pointer ); Executes a fragment of code in Supervisor mode. Procedure PuntAES; Throws the AES away. Function SsBrk( Amount : Integer ) : Pointer; Reserves an amount of memory. Procedure GetMpb( DumpArea : Pointer ); - Procedure InitMous( Vector, Params : Pointer; Typ : integer ); Initializes the mouse packet handler. Function NVMaccess( Buffer : ShortInt; Count,Start,Op : Integer ) : Integer; Manages the non-volatile memory in the TT's real-time clock.  The following describes the Compile menu. See also: Editor Run (R) Runs the program in the active editor window, unless the "Primary File" option has been set. In which case the primary file will be run. Compile (C) Compiles the program in the active editor window, unless the "Primary File" option has been set. In which case the primary file will be compiled. Make (M) Make works like Compile, except for the following: If the program being compiled uses a unit which has been changed since it was last compiled, that unit is compiled again. Build All (B) Build works like Make, except for the following: All the units that the program uses are compiled. Even if they have not been changed. Find Error (E) The Find Error routine can find the line in a program that caused a runtime error. Destination (D) Describes where the compiled program are to be stored (in Memory or on Disk). Units being compiled will always be stored on disk. Primary file (P) Describes the name of the first file that is to be compiled when choosing Run, Compile, Make or Build in the compile menu. Get info (I) Displays some information about the most recently compiled program. p  The following describes the OPTIONS/Compiler dialog. The dialog is activated by (K) See also: Editor, Options "Range check"{$R} "Stack check"{$S} "I/O check"{$I} "Use 32 bit fixup"{$F} "Keep names for debugger"{$D} "Strict string checking"{$V} "$Define"{$Define xxxxx} See also: Directives Search Paths: Units: The path(s) that the compiler uses to find non-resident units. Multiple paths are separated by a semicolon. Program : The path that the compiler uses to place the compiled programs. Include : The path(s) that the compiler uses to find include files. Multiple paths are separated by a semicolon. Object: The path(s) that the compiler uses to locate object files containing external procedures and functions. The object path is first taken into account after the current directory has been searched. Multiple paths are separated by a semicolon.  The following describes the Edit menu. See also: Editor Undo (UNDO) Undoes the last command executed in the editor. Useful if you have deleted something important. Cut (^X) Removes the selected (inverted) text from the active window and stores it on a clipboard. The removed text can be inserted into any of the open editor windows by using the Paste (^V) command. Copy (^C) Copies the selected (inverted) text onto a clipboard. The copied text can be inserted into any of the open editor windows by using the Paste (^V) command. Paste (^V) Takes the text from the clipboard and inserts it into the active editor window, at the current cursor location. Select All (^A) Selects (inverts) all text in the active editor window. Indent (^K) Moves the selected (inverted) text one position to the right. Outdent (^J) Moves the selected (inverted) text one position to the left. Get info (^I) Displays some information about the text in the active editor window. ^g 'The following help topics are available on the editor: FILEEDIT SEARCH COMPILE OPTIONS - The following describes the File menu. (For help on the file-type "file", click on text) See also: Editor New (^N) Opens a new and empty editor window. Open (^O) Opens a file and puts it in a new editor window. Open Selection (^T) If you have selected (inverted) a file name in the editor window, you can open this file with "Open Selection". Close (^U) Closes the active editor window. If you have changed the program in the window, you will be asked if you want to save it. Save (^S) Saves the program in the active editor window. If the program is a NoName.pas program, you will be prompted for a name. Save As... Does the same as (^S), but always prompts you for a name. Revert to saved This command will replace the version of your text in the editor with the latest copy you saved to disk. Print Prints the program in the active window. Print Selection (^P) Prints a selected (inverted) area of the program in the active editor window. Execute Leaves the editor temporarily, while running another program. Quit (^Q) Quits the editor. If one of the open editor windows contains a program that has been changed, you will get a chance to save it.  The following describes the OPTIONS/General dialog. The dialog is activated by (G) See also: Editor, Options "Locate Resident Library" Tells the compiler where to locate the resident library. The default name is PASCAL.LIB, but you can create you own resident libraries with the \UNITS\LIBMAKER program. "Tab width" Sets the editor tab width. The legal range is 1-8. "Auto indent" When auto indenting is active the cursor will return to the starting column of the previous line, when pressing Return. Otherwise the cursor will end up in column 1. "Autosave Configuration" When autosave is active the configuration settings will be saved when choosing Quit (^Q) in the File menu. "Autosave Files" If this option is active the sourcecode will be saved before running the program. \\  The following describes the OPTIONS/Linker dialog. The dialog is activated by (L) See also: Editor, Options "$F Use 32 bit fixup" "$D Add symbols to program file" "$M: Stack" "$M: Heap minimum" "$M: Heap maximum" "$M: Free to DOS" See also: Directives "Postfix for programs" Defines the extension that compiled programs are to have on disk. WW The following describes the Search menu. See also: Editor Find (^F) Searches for a string in the active editor window. Find Selection (^H) Does the same as (^F) but searches for a match to a piece of selected (inverted) text. Find Next (^D) Looks for the next match. Replace (^R) Replaces all occurrences of a word with another word. Goto line (^L) Places the cursor on a specific line. Find Cursor Finds the line where the cursor is located. Cycle Windows (^W) Switches between the open editor windows. User Screen (ESC) Switches to the screen generated by the program that was last run.  "*The following describes the Options menu. See also: Editor Help (HELP) Activates the On-line Help system. Save Saves the configuration settings. Other topics are: GENERALCOMPILER LINKER RUN ?? 3.The following describes the OPTIONS/Run dialog. The dialog is activated by (J) See also: Editor, Options "Make pause after program run" If this option is active, a line reading "Press a key..." will appear after a program has finished running from within the editor. "Parameters" With the parameter line you can simulate a command line. The parameters passed on the command line can be accessed by the ParamStr function. "Memory for program": Specifies how much memory you want to reserve for the programs that you either Run (R) or Executes (through the File menu). \ s( - -  - - - -   -   -   -   -  -  "+2These are the routines implemented in the Dos unit: ChDirDiskFreeDiskSize EnvCountEnvStrExec FExpandFindFirstFindNext FSplitGetDateGetDir GetDriveGetEnvGetFAttr GetFTimeGetTimeGetVerify MkDirPackTimeParamCount ParamStrRmDirSetDate SetDriveSetFAttr SetFTime SetTimeSetVerifySuper SwapVectorsTosVersionUnPackTime See also: Printer, Bios, System, System2, Graph, STPascal UNIT Dos; INTERFACE { Public constants } Const ReadOnly = $01; Hidden= $02; SysFile= $04; VolumeID = $08; Directory= $10; Archive= $20; AnyFile= $3F; { DosError codes } EINVFN= -32;{ Invalid Function Number } EFILNF= -33;{ File Not Found} EPTHNF= -34;{ Path Not Found} ENHNDL= -35;{ File Handle Pool Exhausted} EACCDN= -36;{ Access Denied} EIHNDL= -37;{ Invalid Handle} ENSMEM= -39;{ Insufficient Memory} EIMBA= -40;{ Invalid Memory Block Address } EDRIVE= -46;{ Invalid Drive Specification} ENSAME= -48; ENMFIL= -49;{ No More Files} ERANGE= -64;{ Range Error } EINTRN= -65;{ GEMDOS Internal Error } EPLFMT= -66;{ Invalid Executable File format } EGSBF= -67;{ Memory Block Growth Failure} { Public types } Type ComStr= String[127]; PathStr= String[79]; DirStr= String[67]; NameStr= String[8]; ExtStr= String[4]; SearchRec= Record Reserved: Packed Array[0..20] OF Byte; Attr: Byte; Time: LongInt; Size: LongInt; Name: String[12]; End; DateTime = Record Year: Integer; Month: Integer; Day : Integer; Hour: Integer; Min : Integer; Sec : Integer; End; { Public variables } Var DosError : Integer; @ "(/This is the INTERFACE part of the System unit: See also: System2, Dos, Printer, Bios, Graph, STPascal UNIT System; INTERFACE Type Word= 0..65535; PtrLen= Record Base : Pointer; Size : LongInt; End; PBasePage= ^RBasePage; RBasePage= Record P_lowtpa: Pointer; P_hitpa : Pointer; Text: PtrLen; Data: PtrLen; BSS: PtrLen; P_dta: Pointer; P_parent: PBasePage; P_resrvd0: LongInt; P_env: Pointer; P_stdfh : Array[1..6] of ShortInt; P_resrvd1: ShortInt; P_curdrv: ShortInt; P_resrvd2: Array[1..18] of LongInt; P_cmdlin: String[127]; End; Var Input,Output : Text;{ Standard input and output files } IOResVar: Integer;{ Var used by IOresult } AppFlag: Boolean;{ True => application, False => ACCessory } FpuMode: ShortInt; { MINUS first time the 68881 is used } HeapOrg: Pointer;{ Internal pointer to heap } DevChain: Pointer;{ Chain of known devices } HighStak: Pointer;{ Top of stack area } LowStack: Pointer;{ Bottom of stack area } RandSeed: LongInt;{ Random Seed global } ExitProc: Pointer;{ User installable exit procedures } ExitCode: Integer;{ Error number. Usable in exit procedures } ErrorAdd: Pointer;{ Error address. Usable in exit procedures } LastPC: LongInt;{ Last known address, set by range and stack check} ShftShft: Pointer;{ Pointer to Shift-state. Used for user break } BasePage: PBasePage; { ^BasePage Layout } STrap5: Pointer;{ Division by zero trap address } STrap102: Pointer;{ Program terminate address } \        ! ' .These are the routines implemented in the System2 unit: ClrEolClrEos ClrScrDelay DelLineGotoXY IncludeInsLine KeyPressedOmit ReadKeyRunFromMemory ValidRealWhereX WhereY See also: System, Dos, Printer, Bios, Graph, STPascal UNIT System2; INTERFACE Type Char128= Packed Array[0..127] of Char; PChar128= ^Char128; { TextRec Layout } TextRec= Record fInpFlag: Boolean;{ Used for input} fOutFlag: Boolean;{ Used for output } fHandle: Integer;{ File handle} fBufSize: Integer;{ Buffer size} fBufPos: Integer;{ Buffer position } fBufEnd: Integer;{ Buffer last used} fBufPtr: PChar128;{ Buffer pointer} fInOutProc: Pointer;{ IO handler if fHandle is zero } fUser: Longint;{ Unused, free to use} fName: Array[1..64] of Char;{ File name (ASCIIZ format) } fBuffer: Char128; end; { FileRec Layout } FileRec= Record fInpFlag : Boolean;{ Used for input} fOutFlag : Boolean;{ Used for output} fHandle: Integer;{ File handle} fBufSize : Integer;{ Record size} fPrivate : Array[1..6] of Integer; fUser : Longint;{ Unused, free to use} fName : Array[1..64] of Char; { File name (ASCIIZ format) } end; TDevBuf=Packed Array[0..19] of Char; { Use as buffer for Device() calls } Rc Function Abs( N ) : (Same type as parameter) Returns the absolute value of the parameter N. N is an integer-type or a real-type expression. See also: Int, Trunc, Round Program Abs_Demo; Const Negative = -1000; Positive =1000; Begin WriteLn(Negative,' becomes ',ABS(Negative)); WriteLn(Positive,' is still ',ABS(Positive)); End. 3D Function Addr( var Object ) : Pointer; Returns the address of the specified object. The Object parameter can be a variable or a procedure or function identifier. See also: SPtr, Ptr Program Addr_Demo; Var A : Pointer; L : LongInt; Begin A := Addr(L); { Another way of doing it is: } A := @L; End. 3  Procedure Append( var F : text [;Name : String] ); Prepares a text file for appending. Append(F) Only for textfiles. Open the file F for writing. The current file position is set to the end of the file. If the file is already open it is first closed. The file must already have been given a name using Assign(F,Title). Append(F, Title) Open the file F for writing. Works like the sequence Assign(F,Title), Append(F). See also: ReWrite, Reset, Assign Program Append_Demo; Var DataFile : Text; X : Byte; Begin { Create a temporary file. } ReWrite(DataFile,'TEMP.DTA'); For X := 1 to 100 DO WriteLn(DataFile,'HELLO WORLD'); Close(DataFile); { Now let's append some data. } Append(DataFile,'TEMP.DTA'); WriteLn(DataFile,'Last line in file'); Close(DataFile); End. " Function ArcTan( N ) : Real; Returns the arctangent of the parameter N. N is an integer-type or real-type expression. The result is the principal value, in radians, of the argument of N. See also: ValidReal Program ArcTan_Demo; Var Res : Real; Begin Res := ArcTan(123); End. " #Procedure Assign( var F [; FileName:String] ); Assigns a filename to a file variable. F is a file variable of any type. FileName specifies the name of the file. See also: ReWrite, Reset, Append, Program Assign_Demo; Var TextF : Text; Data: String; Begin Assign(TextF,'TEST.TXT); {$I-} Reset(TextF); {$I+} If (IOresult = 0) then Begin While NOT(Eof(TextF)) DO Begin ReadLn(TextF,Data); WriteLn(Data); End; Close(TextF); End ELSE WriteLn('Can''t open file.'); End. E Procedure BlockRead(var F:File; var Buf; Cnt:Integer [; var Res:Integer]); Reads Cnt bytes from the file F into the variable Buf. F is a file variable (Typed or Untyped) that has been opened. Cnt speci- fies the number of bytes to read from the file. The actual number of bytes read will be returned in the optional Res parameter. If Res is not specified, and Cnt bytes could not be read, an IO-error will occur. Otherwise the number of bytes actually read is returned in Res. See also: BlockWrite, Seek Program BlockRead_Demo; Uses DOS; Var F_In, F_Out: FILE; { Untyped files } Buf: Array[1..4096] OF Byte; { Disk buffer } ActualRead, ActualWritten : Integer; Begin If (ParamCount <> 2) then HALT; Reset(F_In,ParamStr(1)); {$I-} Erase(ParamStr(2)); {$I+} ReWrite(F_Out,ParamStr(2)); Repeat { Copy file In to file Out. } BlockRead(F_In,Buf,SizeOf(Buf),ActualRead); BlockWrite(F_Out,Buf,ActualRead,ActualWritten); Until (ActualRead = 0) OR (ActualWritten <> ActualRead); Close(F_In); Close(F_Out); End.  Procedure BlockWrite(var F:File; var Buf; Cnt:Integer [; var Res:Integer]); Writes Cnt bytes from the variable Buf to the file F. F is a file variable (Typed or Untyped) that has been opened. Cnt speci- fies the number of bytes to write to the file. The actual number of bytes written will be returned in the optional Res parameter. If Res is not specified, and Cnt bytes could not be written, an IO-error will occur. Otherwise the number of bytes actually written is returned in Res. See also: BlockRead, Seek &' !+5Procedure ChDir( Dir : DirStr ); Changes the current directory. It is not possible to change to another drive using this procedure. To do that use the SetDrive procedure. See also: RmDir, MkDir, GetDir, SetDrive, DosError, Dos Program ChDir_Demo; Uses DOS; Begin ChDir('C:\MYDIR'); End.  Function Chr( N ) : Char; Returns ASCII character number N. N is an integer type value in the range of 0..255. See also: Ord, Ord4 Program Chr_Demo; Var B : Byte; Begin For B := 32 to 255 DO Write(Chr(B):4); End.  Procedure Close( var F ); Closes an open file. F is a file variable of any type. Close flushes the files buffer and releases its handle. See also: Reset, ReWrite, Append e} Procedure ClrEol; Deletes all characters on the current line, starting at the current cursor position. The position of the cursor is not changed by the ClrEol procedure. See also: ClrScr, ClrEos Program ClrEol_Demo; Var Y : Byte; Begin ClrScr; For Y := 1 to 10 DO WriteLn('0123456789'); For Y := 1 to 10 DO Begin GotoXY(5,Y); ClrEol; End; End. Ke Procedure ClrEos; Clears the screen starting at the current cursor location. The position of the cursor is not changed by the ClrEos procedure. See also: ClrScr, ClrEol Program ClrEos_Demo; Var X : Integer; Begin For X := 1 to 1999 DO Begin GotoXY(Random(80),Random(25)+1); Write('*'); End; GotoXY(1,10); ClrEos; End.  Procedure ClrScr; Clears the screen. After the call to ClrScr the cursor is placed in the upper left corner of the screen (Coordinates 1,1). See also: ClrEol, ClrEos w   Function Concat( S1 [, S2, S3 ...] ) : String; Concatenates 1 or more strings into 1 string. Using standard string addition, as for example: S1 := S1 + S2; will give the same result as: S1 := Concat(S1,S2); See also: Copy, Insert, Delete Program Concat_Demo; Var A1,A2,Res : String; Begin A1 := 'HELLO '; A2 := 'WORLD'; Res := Concat(A1,A2); WriteLn(Res); End.     # +Function Copy( FromStr : String; Index, Count : Byte ) : String; Returns Count characters from FromStr, starting at position Index. Copy returns an empty string if index is 0 or greater than the length of FromStr. If Index+Count is greater than the length of FromStr, the Copy function stops at the end of FromStr and returns. See also: Concat, Insert, Delete, Length, Pos Program Copy_Demo; Const Main = 'EXTRACT THE WORD HELLO FROM THIS STRING'; Begin WriteLn(Copy(Main,18,5)); End.   Function Cos( N ) : Real; Returns the cosine of the parameter. N is an integer-type or real-type expression. N is assumed to represent an angle in radians. See also: Sin, Trunc, ValidReal Program Cos_Demo; Var R : Real; Begin R := COS(20); End.    Procedure Dec( N [, Count ] ); Decrements an ordinal variable by 1 or by Count. N and the optional parameter Count are both simple types. If Count is not specified N will be decremented by 1. Otherwise N will be decremented by Count. See also: Inc, Succ, Pred Program Dec_Demo; Var L : LongInt; Begin L := 100000; Repeat Dec(L); { Decrease L by 1 } Dec(L,2);{ Decrease L by 2 } Until (L < 0); End. Procedure Delay( Ms : LongInt ); Halts machine execution for Ms milliseconds. Program Delay_Demo; Begin WriteLn('Going to sleep for 5 seconds.'); Delay( 5*1000 ); End.  'Procedure Delete( var S : String; Index, Count : Byte ); Deletes Count characters from the string S, starting at position Index. If Index is 0 or greater then the length of S, no characters are deleted from S. See also: Omit, Copy, Insert, Length, Pos Program Delete_Demo; Var S : String; Begin S := 'DELETE THE WORD HELLO FROM THIS STRING'; WriteLn('Before calling delete: ',s); Delete(S,17,6); WriteLn('After calling delete : ',S); End.  Procedure DelLine; Deletes the current line from the screen. All lines following the current line will be scrolled up, and an empty line inserted at the bottom of the screen. See also: InsLine, GotoXY Program DelLine_Demo; Var X,Y : Integer; Begin For X := 1 to 80 DO For Y := 1 to 24 DO Begin GotoXY(X,Y); Write('*'); End; GotoXY(30,10); WriteLn('Press ENTER to go on'); ReadLn; GotoXY(1,1); For Y := 1 to 24 DO DelLine; End.     )Function DiskFree( Drive : Byte ) : LongInt; Returns the number of available bytes on the disk in the specified drive. Drive numbers are ordered as follows: drive 0 = Current disk drive. -1 = Drive A: -2 = Drive B: .... See also: DiskSize, GetDrive, SetDrive, Dos Program DiskFree_Demo; Uses DOS; Begin WriteLn( DiskFree(0) DIV 1024,' Kb available on current disk.'); End. n    )Function DiskSize( Drive : Byte ) : LongInt; Returns the size of the disk in the specified drive. Drive numbers are ordered as follows: drive 0 = Current disk drive. -1 = Drive A: -2 = Drive B: .... See also: DiskFree, GetDrive, SetDrive, Dos Program DiskSize_Demo; Uses DOS; Begin WriteLn( DiskSize(0) DIV 1024,' Kb available on current disk.'); End.    Procedure Dispose( var P : Pointer ); Disposes a dynamic variable. P is a pointer variable of any type that was previously assigned by the New procedure or was assigned a value by an assignment statement. After a call to Dispose the variable referenced by P is destroyed and its space in the heap is released. See also: New, FreeMem, GetMem Program Dispose_Demo; Type PersonType = Record Name: String[20]; Age : Byte; End; Var PersonData : ^PersonType; Begin New(PersonData); { Allocate space in heap } With PersonData^ DO Begin Write('Enter name: '); ReadLn(Name); Write('Enter age : '); ReadLn(Age); End; Dispose(PersonData); { Dispose the space } End.   Var DosError : Integer; Returns the error status for some of the routines in the DOS unit. The DosError values are declared in the DOS unit: Const EINVFN= -32; { Invalid Function Number } EFILNF= -33; { File Not Found} EPTHNF= -34; { Path Not Found} ENHNDL= -35; { File Handle Pool Exhausted} EACCDN= -36; { Access Denied} EIHNDL= -37; { Invalid Handle} ENSMEM= -39; { Insufficient Memory} EIMBA= -40;{ Invalid Memory Block Address } EDRIVE= -46; { Invalid Drive Specification} ENSAME= -48; ENMFIL= -49; { No More Files} ERANGE= -64; { Range Error } EINTRN= -65; { GEMDOS Internal Error} EPLFMT= -66; { Invalid Executable File format } EGSBF= -67;{ Memory Block Growth Failure } See also: Dos, BiosErrors HI   Function EnvCount : Integer; Returns the number of environment strings in the systems environment block. Use the functions EnvStr and GetEnv to examine the contents of the environment block. See also: EnvStr, GetEnv, Dos Program EnvCount_Demo; Uses DOS; Begin WriteLn(EnvCount,' strings in the environment block.'); End.  Function EnvStr( Index : Integer ) : String; Returns the environment string number Index. If Index is 0 or greater than EnvCount, EnvStr will return an empty string. See also: EnvCount, GetEnv, Dos Program EnvStr_Demo; Uses DOS; Var Count : Integer; Begin WriteLn('Program to display the environment block.'); WriteLn; For Count := 1 to EnvCount DO WriteLn( EnvStr(Count) ); WriteLn; WriteLn('Done.'); End. 1  Function Eof [ ( var F ) ] : Boolean; Returns false if there is still data to read after the current file position. F is a file variable of any type, that has been opened. If F is omitted the standard file Input is assumed. See also: SeekEof, Eoln Program Eof_Demo; Uses DOS; Var T : Text; D : String; Begin {$I-} Reset(T, 'TEMP.TXT'); {$I+} If (IOresult = 0) then Begin While NOT(Eof(T)) DO Begin ReadLn(T,D); WriteLn(D); End; Close(T); End ELSE WriteLn('Error opening file.'); End.   Function Eoln [ ( var F : text ) ] : Boolean; Returns false if there is still data to read after the current file position, but before the next new line. F is a file variable of type text, that has been opened. If F is omitted the standard file Input is assumed. See also: SeekEoln, Eof Program Eoln_Demo; Uses DOS; Var F : Text; C : Char; Begin {$I-} Reset(F,'TEMP.TXT'); {$I+} While NOT(Eoln(F)) DO Begin Read(F,C); Write(C); End; Close(F); End. 6C Procedure Erase( F : String ); Erases a file from disk. Do not erase an open file. See also: Rename Program Erase_Demo; Var DummyFile : FILE; Begin { Create a file. } ReWrite(DummyFile,'DUMMY.DTA'); Close(DummyFile); Write('Press RETURN to erase the dummy file.'); ReadLn; Erase('DUMMY.DTA'); End.  ( Procedure Exec(Path : PathStr; Command : ComStr); Executes a specified program, with a specified command line. If insufficient free memory is available, Exec will not work. Therefore remember to limit the memory requirements by use of a {$M STACK,Hmin,Hmax,DosFree} directive. Exec errors are reported in the DosError variable. See also: SwapVectors, DosError Program Exec_Demo; {$M 5,1,1,5} Uses DOS; Begin SwapVectors; Exec(GetEnv('COMSPEC'),'Dir'); SwapVectors; If DosError <> 0 then Writeln('Error number: ',DosError); End.   Procedure Exit; Exits from the current block of code. If the current block is the main program, the call to Exit will cause the program to terminate. If the current block is a procedure or a function an exit is made, and control is passed to the caller. See also: Halt, ExitProc Program Exit_Demo; Procedure WasteTime; Begin Repeat If (Random(1000) = 999) then EXIT; Until False; End; Begin WasteTime; End. t Var ExitProc : Pointer; Points to the start of the exit chain. The idea of the ExitProc variable is to allow user written procedures or functions to be executed just before a program terminates. This feature can be very useful if for example some files need to be closed, before the program stops. As can be seen from the following example, it is very important that the original value of the ExitProc variable is first saved and later restored in the exit routine. If this is not done the systems own exit procedure will not be executed, causing unpredictable results. See also: Halt, Exit Program ExitProc_Demo; Var OldExit : Pointer; Procedure MyExit; Begin ExitProc := OldExit;{ Restore the original value! } WriteLn('End of program.'); End; Begin OldExit := ExitProc;{ Save the original value! } ExitProc := @MyExit;{ Set the new value. } { Do work here. } End.    Function Exp( N ) : Real; Returns the exponential of N. N is an integer-type or real-type expression. See also: Ln, ValidReal Program Exp_Demo; Var R : Real; Begin Write('Enter a number: '); ReadLn(r); WriteLn; WriteLn('The enponential is: ',Exp(r)); End. u  Function FExpand( Path : PathStr ) : PathStr; Expands a file path into a fully qualified file path. Assuming that the current directory is C:\PASCAL, the following results would be returned by FExpand: FExpand(''); = C:\PASCAL\ FExpand('*.PAS');= C:\PASCAL\*.PAS FExpand('..\*.INF');= C:\*.INF FExpand('..\PASCAL\..\*.PAS'); = C:\*.PAS As can be seen from the above, FExpand converts its output to uppercase. See also: FSplit, FindFirst, Dos Program FExpand_Demo; Uses DOS; Var Path : PathStr; Begin Write('Enter path to expand: '); ReadLn(Path); Path := FExpand(Path); WriteLn('Fully expanded: ',Path); End. f Function FilePos( var F ) : LongInt; Returns the number of the current record in file F. F is a file variable (Typed or Untyped) that has been opened. After a call to Reset or ReWrite, FilePos will return 0. See also: Seek, FileSize Program FilePos_Demo; Var DataFile : FILE OF Byte; B : Byte; Begin ReWrite(DataFile,'TEMP.DTA'); { Create a temporary file. } For B := 1 to 100 DO Write(DataFile,B); Repeat { Seek around in the file. } Seek(DataFile,Random(FileSize(DataFile))); WriteLn('Current file position is: ',FilePos(DataFile)); Until KeyPressed; Close(DataFile); Erase('TEMP.DTA'); End.  Function FileSize( var F ) : LongInt; Returns the number of records in file F. F is a file variable (Typed or Untyped) that has been opened. See also: FilePos, Seek   Procedure FillChar( var Object; Count : LongInt; FillVal : Byte ); Fills memory starting at the address specified by Object. Object is any variable. Count specifies how many bytes of memory that are to be filled. FillVal specifies the value that is to be used for the fill. If Count is greater than the size of Object, other data or code may be overwritten, causing unpredictable results. Therefore the SizeOf function should be used to specify the number of bytes to fill. See also: SizeOf, Move Program FillChar_Demo; Var Big : Packed Array[1..30000] OF Byte; C: Integer; Begin WriteLn('Doing it the slow way.'); For C := 1 to 30000 DO Big[c] := 0; WriteLn('Doing it the fast way.'); FillChar(Big,SizeOf(Big),0); End. 9( ( (!(+Procedure FindFirst( Path : String; Attr : Byte; var S : SearchRec ); Searches a directory for the first entry matching a specified file name and set of attributes. Path is a path to a directory on a specified drive. The path consists of a directory name, which is optional, and a file name. The file name can contain wild card characters (* and ?). The directory name must be implicit. The Attr parameter specifies the special files to search for (in addition to all normal files). The file attributes are declared in the DOS unit as follows: Const ReadOnly = $01; Hidden= $02; SysFile= $04; VolumeID = $08; Directory= $10; Archive= $20; AnyFile= $3F; Upon return FindFirst places the result of the search in the S variable. S is of the type SearchRec, which is declared in the DOS unit: Type SearchRec= Record Reserved: packed Array[0..20] OF Byte; Attr: Byte; Time: LongInt; Size: LongInt; Name: String[12]; End; After a call to FindFirst the variable DosError must be checked. If it is not 0, the contents of the S parameter will be garbage. See also: FindNext, UnPackTime, DosError, Dos Program Find_Demo; Uses DOS; Var DosData : SearchRec; Begin FindFirst( '*.*' , AnyFile, DosData ); While (DosError = 0) DO Begin With DosData DO Write(Name :20 ); FindNext(DosData); End; End. kk Procedure FindNext( var S : SearchRec ) Finds the next entry matching the specifications given in a previous call to FindFirst. The S parameter must be the same one that was used in the call to FindFirst. After a call to FindNext the variable DosError must be checked. If it is not 0, the contents of the S parameter will be garbage. See also: FindFirst, Dos .N   Procedure FreeMem( var P : Pointer; Size : LongInt ); Disposes a dynamic variable of a given size. P is a pointer variable of any type that was previously assigned by the GetMem procedure. Size specifies the size of the dynamic variable to dispose. Size must be equal to the size specified in the call to GetMem. See also: GetMem, New, Dispose Program FreeMem_Demo; Var Data : Pointer; F: FILE; R: Integer; Begin GetMem(Data,1024); { Allocate 1K in the heap } Reset(F,'TEMP.DTA'); BlockRead(F,Data^,1024,R); Close(F); FreeMem(Data,1024); End. r Procedure FSplit(P : PathStr; var D:DirStr;var N:NameStr;var E:ExtStr); Splits a file path into its 3 components: The directory specification. The file name. The file extension. Any of the 3 components can be empty on return, if the file path did not contain that component on entry. The PathStr, DirStr, NameStr and ExtStr are declared in the DOS unit. Type PathStr= String[79]; DirStr= String[67]; NameStr= String[8]; ExtStr= String[4]; See also: FExpand, GetDir, Dos Program FSplit_Demo; Uses DOS; Var FullPath : PathStr; Dir: DirStr; Name: NameStr; Ext: ExtStr; Begin Repeat Write('Enter path to split: '); ReadLn(FullPath); FSplit(FullPath,Dir,Name,Ext); WriteLn; WriteLn(FullPath,' consists of:'); WriteLn; WriteLn('The directory: ',Dir); WriteLn('The file name: ',Name); WriteLn('With the extension: ',Ext); Until (FullPath = ''); End. y   Procedure GetDate( var Year, Month, Day, DayOfWeek : Integer ); Returns the current date set in the operating system. The ranges of the returned values are: Year1980..2099 Month1..12 Day 1..31 DayOfWeek0..6 (Where 0 = Sunday, 1 = Monday ... ) See also: SetDate, GetTime, Dos Program GetDate_Demo; Uses DOS; Var Year,Month,Day,DayOfWeek: Integer; Begin GetDate(Year,Month,Day,DayOfWeek); Write('Today is '); Case DayOfWeek OF 0 : Write('Sunday'); 1 : Write('Monday'); 2 : Write('Tuesday'); 3 : Write('Wednesday'); 4 : Write('Thursday'); 5 : Write('Friday'); 6 : Write('Saturday'); End; WriteLn('.'); End.       *Procedure GetDir( Drive : Byte; var Dir : DirStr ); Returns the current directory on a specified disk drive. Drive numbers are ordered as follows: drive 0 = Current disk drive. -1 = Drive A: -2 = Drive B: .... See also: ChDir, RmDir, MkDir, GetDrive, Dos Program GetDir_Demo; Uses DOS; Var CurDir : DirStr; Begin GetDir(0,CurDir); WriteLn('Current dir on current drive is: ',CurDir); GetDir(1,CurDir); WriteLn('Current dir on drive A: is: ',CurDir); End. &   Function GetDrive : Byte; Returns the number of the current disk drive. The drive numbers are ordered as follows: 0 = Drive A: 1 = Drive B: .... See also: SetDrive, GetDir, Dos Program GetDrive_Demo; Uses DOS; Begin WriteLn('Current drive is: ',GetDrive); End. )* Function GetEnv( MatchStr : String ) : String; Returns the value of a specific environment string. If no match is found for MatchStr, GetEnv will return an empty string. See also: EnvCount, EnvStr, Dos Program GetEnv_Demo; Uses DOS; Begin WriteLn('Current PATH is: ', GetEnv('PATH')); End. tI Procedure GetFAttr( Fil : PathStr; var Attr : Integer ); Gets the attributes of a file. The file attributes and PathStr are declared in the DOS unit: Const ReadOnly = $01; Hidden= $02; SysFile= $04; VolumeID = $08; Directory= $10; Archive= $20; AnyFile= $3F; Type PathStr= String[79]; See also: SetFAttr, DosError, Dos Program GetFAttr_Demo; Uses DOS; Var Attrs: Integer; Begin If (ParamCount = 0) then HALT; GetFAttr( ParamStr(1), Attrs ); If (DosError = 0) then Begin If (Attrs AND ReadOnly > 0) then WriteLn('ReadOnly'); If (Attrs AND Hidden > 0) then WriteLn('Hidden'); If (Attrs AND SysFile > 0) then WriteLn('System'); If (Attrs AND VolumeID > 0) then WriteLn('Disk label'); If (Attrs AND Directory > 0) then WriteLn('Directory'); If (Attrs AND Archive > 0) then WriteLn('Archive'); End ELSE WriteLn('No file name specified.'); End. t   ! ( 2Procedure GetFTime( var F; var Time : LongInt ); Gets the time and date of a file. The F parameter is a file variable (Typed, Untyped or Text) that has been either Reset, Rewritten or Appended. The returned long integer can be unpacked, using the UnPackTime procedure. See also: SetFTime, UnPackTime, Reset, DosError, Dos Program GetFTime_Demo; Uses DOS; Var DiskFile : TEXT; Name: String; DatTim: DateTime; PackData : LongInt; Begin Write('Enter name of file to work with: '); ReadLn(Name); {$I-} Reset(DiskFile,Name); {$I+} If (IOresult = 0) then Begin GetFTime( DiskFile, PackData ); UnPackTime(PackData,DatTim); With DatTim DO Begin WriteLn('Date of update/creation is: ',Day,'-',Month,'/',Year); WriteLn('Time of update/creation is: ',Hour,'.',Min,',',Sec); End; Close(DiskFile); WriteLn('Done.'); End ELSE WriteLn('Error while opening file.'); End.  ",Procedure GetMem( var P : Pointer; Size : LongInt ); Creates a new dynamic variable and sets P to point to it. P is a pointer variable of any type. Size specifies the size in bytes of the dynamic variable to allocate. See also: FreeMem, Dispose, New, MemAvail, MaxAvail Program GetMem_Demo; Var Data : Pointer; F: FILE; R: Integer; Begin GetMem(Data,1024); { Allocate 1K in the heap } Reset(F,'TEMP.DTA'); BlockRead(F,Data^,1024,R); Close(F); FreeMem(Data,1024); End.  Procedure GetTime( var Hour, Min, Sec, Sec100 : Integer ); Returns the current time in the operating system. The ranges of the returned values are: Hour0..23 Min 0..59 Sec 0..58 The Sec100 parameter, which has been implemented for compatibility with Turbo Pascal, is not supported by the operating system, and will therefore always return 0. Due to the operating system, the returned seconds will always be divisible with two. See also: SetTime, GetDate, Dos Program GetTime_Demo; Uses DOS; Var Hour,Minute,Second,Hundreds : Integer; Begin Repeat GetTime(Hour,Minute,Second,Hundreds); GotoXY(1,1); ClrEol; Write(Hour,'.',Minute,',',Second); Until KeyPressed; End.   Procedure GetVerify( var Verify : Boolean ); Returns the value of the disk verify flag. When verify is on (True), TOS will check to see if data written to the disk, has been stored properly. This is done by trying to read the data just written. When off (False), TOS will simply write the data. See also: SetVerify, Dos Program GetVerify_Demo; Uses DOS; Var Res : Boolean; Begin Write('Current state of disk verify is '); GetVerify( Res ); Case Res OF True: WriteLn('ON'); False : WriteLn('OFF'); End; End.     # ,Procedure GotoXY( Col, Lin : Integer ); Positions the cursor at specific screen coordinates. On a standard monochrome screen the range for X and Y are: X1..80 Y1..25 Where position 1,1 is the upper left corner. See also: WhereX, WhereY, ClrEos, InsLine, DelLine Program GotoXY_Demo; Var X,Y : Integer; Begin For X := 1 to 80 DO For Y := 1 to 25 DO Begin GotoXY(X,Y); If (X*Y) < (80*25) then Write('*'); End; End.   Procedure Halt [ ( ExitCode : Integer ) ]; Halts the current program. If the optional parameter ExitCode is not specified, an exit code of 0 will be used. See also: Exit, ExitProc Program Halt_Demo; Uses DOS; Begin If (ParamCount = 0) then HALT(99); End.  Function Hi( N : Integer ) : Byte; Returns the high byte of N. See also: Lo, LoWord, HiWord, Swap Program Hi_Demo; Begin WriteLn(Hi($1234)); End.  Function HiWord( N : LongInt ) : Integer; Returns the high word of N. See also: LoWord, Hi, Lo, SwapWord Program HiWord_Demo; Begin WriteLn(HiWord($12345678)); End.    Procedure Inc( N [, Count ] ); Increments an ordinal variable by 1 or by Count. N and the optional parameter Count are both simple types. If Count is not specified N will be incremented by 1. Otherwise N will be incremented by Count. See also: Dec, Pred, Succ Program Inc_Demo; Var L : LongInt; Begin L := 0; Repeat Inc(L); { Increase L by 1 } Inc(L,2);{ Increase L by 2 } Until (L > 100000); End. ab Function Include( NewStr, MainStr : String; Index : Byte ); Returns MainStr with NewStr inserted at position Index. MainStr is not affected by the call to Include. Except for this the rules for the Include function are the same as for the Insert procedure. See also: Insert Program Include_Demo; Begin WriteLn(Include('IS ','ATARI GREAT',7)); End.   "*Procedure Insert( New : String; var Main : String; Index : Byte ); Inserts New into Main at position Index. See also: Include, Copy, Delete, Length, Pos Program Insert_Demo; Var S : String; Begin S := 'Hello'; Insert(' World!',S,6); WriteLn(S); End.  Procedure InsLine; Inserts a blank line on the screen. All lines under and including the current line will be scrolled down, and the bottom line is lost. See also: DelLine, GotoXY Program InsLine_Demo; Var X,Y : Integer; Begin For X := 1 to 80 DO For Y := 1 to 24 DO Begin GotoXY(X,Y); Write(Random(2)); End; GotoXY(30,10); WriteLn('Press ENTER to go on'); ReadLn; GotoXY(1,1); For Y := 1 to 25 DO InsLine; End.  Function Int( N : Real ) : Real; Returns the integer part of N. See also: Trunc, Round, Abs Program Int_Demo; Var R : Real; Begin R := INT(1234.5678); { R = 1234.00 } End. Function IOresult : Integer; Returns the error status of the last IO operation. It is important to notice that IOresult is used as an error status for several IO routines in the system. Therefore it is not reliable to make a program like this: { Do some file operations here. } WriteLn('Error code: ',IOresult); Since WriteLn also uses IOresult to report errors. (Thereby setting IOresult to 0 when writing 'Error code: '). Instead do like this: { Do some file operations here. } MyVar := IOresult; WriteLn('Error code: ',MyVar); Program IOresult_Demo; Var F : FILE; Begin {$I-} Reset(F,'TEMP.TXT'); {$I+} If (IOresult <> 0) then ReWrite(F,'TEMP.TXT'); End. 5; Function KeyPressed : Boolean; Checks to see if the keyboard has been pressed. KeyPressed will return True if a key is waiting to be read, otherwise False. See also: ReadKey Program KeyPressed_Demo; Begin Repeat WriteLn('Please press a key.'); Until KeyPressed; WriteLn('You pressed ',ReadKey); End.  !*28Function Length( S : String ) : Byte; Returns the length of string S. The returned value will be in the range of 0..255. See also: Copy, Concat, Insert, Include, Delete, Omit, Pos Program Length_Demo; Var S : String; Begin Write('Enter a string: '); ReadLn(S); WriteLn; WriteLn('You entered ',Length(S),' characters'); WriteLn('You entered ',Ord(S[0]),' characters'); End.   Function Ln( R ) : Real; Returns the natural logarithm of R. N is a real-type expression. The result is the natural logarithm of R. See also: Exp, ValidReal Program Ln_Demo; Var R : Real; Begin R := LN(100); End.  Function Lo( N : Integer ) : Byte; Returns the low byte of N. See also: Hi, HiWord, LoWord Program Lo_Demo; Var X : Byte; Begin X := Lo($1234); { = $34 } End.  Function LoWord( N : LongInt ) : Integer; Returns the low word of N. See also: HiWord, Hi, Lo Program LoWord_Demo; Begin WriteLn(LoWord($12345678)); End.  Function MaxAvail : LongInt; Returns the size of the largest contiguous memory block in the heap. See also: MemAvail, New, GetMem Program MaxAvail_Demo; Var P : Pointer; Begin If (MaxAvail > 1000) then GetMem(P,1000); End.  Function MemAvail : LongInt; Returns the sum of the sizes of all free memory blocks in the heap. See also: MaxAvail Program MemAvail_Demo; Begin WriteLn('Bytes free in the heap is: ',MemAvail); End.  !+Procedure MkDir( Dir : DirStr ); Creates a new directory. See also: ChDir, RmDir, GetDir, DosError, Dos Program MkDir_Demo; Uses DOS; Begin MkDir('MYDIR'); End.   Procedure Move( var Source, Dest; Count : LongInt ); Move Count bytes from Source to Dest. Source and Dest can be any variable. Count specifies how many bytes to move. If Count is greater than the size of Dest, other code or data may be overwritten, causing unpredictable problems. Therefore it is a good idea to use the SizeOf function to specify how many bytes to move: Var Big: LongInt; Small : Integer; Begin Move(Big,Small,4);{ The very dangerous way of doing it! } Move(Big,Small,SizeOf(Small));{ The safe way of doing it. } End. See also: SizeOf, FillChar Program Move_Demo; Var Big1: Packed Array[1..2000] OF Integer; Big2: Packed Array[1..1000] OF Integer; Begin Move(Big1,Big2,SizeOf(Big2)); End. a %/Procedure New( var P : Pointer ); Creates a new dynamic variable and sets P to point to it. P is a pointer variable of any type. The size of the allocated memory block corresponds to the size of the type that P points to. See also: Dispose, GetMem, FreeMem, MemAvail, MaxAvail Program New_Demo; Type PersonType = Record Name: String[20]; Age : Byte; End; Var PersonData : ^PersonType; Begin New(PersonData); { Allocate space in heap } With PersonData^ DO Begin Write('Enter name: '); ReadLn(Name); Write('Enter age : '); ReadLn(Age); End; Dispose(PersonData); { Dispose the space } End. 1Function Odd( N ) : Boolean; Tests to see if the N parameter is an odd number. N is an integer type value. Program Odd_Demo; Var L : LongInt; Begin Repeat Write('Enter a number: '); ReadLn(L); If Odd(L) then WriteLn('ODD') ELSE WriteLn('EVEN'); Until (L = 0); End.  Function Omit( S : String; Index, Count : Integer ) : String; Returns S with Count characters deleted, starting at position Index. The rules for the Omit function are the same as for the Delete procedure, except for the fact that the S string is left untouched when using the Omit function. See also: Delete Program Omit_Demo; Begin WriteLn(Omit('ATARI IS NOT GREAT',10,4)); End.    Function Ord( x ) : Integer; Returns the ordinal number of an ordinal-type or pointer-type value. If X is an ordinal-type expression, the result is of type integer and the value is the ordinality of X. If X is a pointer-type expression, the result is of type LongInt, and the value is the address of the dynamic variable pointed to by X. See also: Ord4, Chr Program Ord_Demo; Var C : Char; Begin Write('Enter something: '); C := ReadKey; WriteLn; WriteLn('The ordinal value of ',C,' is ',Ord(C)); End.  Function Ord4( x ) : LongInt; Returns the ordinal number of an ordinal-type value. This function does the same as the Ord function, but the result is always a long integer. See also: Ord, Chr  !Procedure PackTime( D : DateTime; var Result : LongInt ); Packs a 12-byte DateTime record into a 4-byte long integer. The DateTime record is declared in the DOS unit: Type DateTime = Record Year: Integer; Month: Integer; Day : Integer; Hour: Integer; Min : Integer; Sec : Integer; End; PackTime returns a long integer with the following format: bits0 -4 seconds (divided by 2) -5 - 10minutes -11 - 15hours -16 - 20day of month -21 - 24month -25 - 31years(since 1980) The returned long integer can be used by SetFTime and UnPackTime. See also: UnPackTime, SetFTime, Dos Program PackTime_Demo; Uses DOS; Var U : DateTime;{ The unpacked time and date } P : LongInt;{ The packed time and date } Procedure WriteData; Begin With U DO Begin WriteLn('Time: ',Hour,'.',Min,',',Sec); WriteLn('Date: ',Day,'-',Month,'/',Year); End; WriteLn; End; Begin { main } With U DO Begin Year := 1990; Month := 12; Day := 24; Hour := 12; Min := 0; Sec := 0; End; WriteLn('Before packing:'); WriteData; PackTime(U,P); WriteLn('The packed time and date: ',P); UnPackTime(P,U); WriteLn('After unpacking:'); WriteData; End. uProcedure Page [ ( var F : text ) ]; Writes a formfeed character to file F. If F is omitted, the standard file Output is assumed. Page is equivalent to: Write( F, Chr(12) ); Program Page_Demo; Var T : Text; Begin ReWrite(T,'PRINTER.DTA'); WriteLn(T,'First page.'); Page(T); WriteLn(T,'Second page.'); Page(T); WriteLn(T,'Third page.'); Page(T); Close(T); End. 0 Function ParamCount : Integer; Returns the number of parameters that were passed to the program on the command line. Use the ParamStr function to obtain the value of the parameters. See also: ParamStr, Dos Program ParamCount_Demo; Uses DOS; Var Res, Count : Integer; Begin Res := ParamCount; WriteLn('You passed ',Res,' parameters to this program.'); WriteLn; If (Res = 0) then HALT; WriteLn('Here is a list of the parameters:'); WriteLn; For Count := 1 to Res DO WriteLn('Parameter #',Count:2,' := ',ParamStr(Count)); End.  Function ParamStr( Index : Byte ) : String; Returns command line parameter number Index. If Index is 0 or greater than ParamCount, ParamStr will return an empty string. See also: ParamCount, Dos Program ParamStr_Demo; { Displays 1 or more text files. } Uses DOS; Var DataFile : TEXT; Data: String; Count: Integer; Procedure DisplayFile( Number : Integer ); Begin {$I-} Reset( DataFile, ParamStr(Number) ); {$I+} If (IOresult <> 0) then Begin WriteLn('Error while opening file: ',ParamStr(Number)); EXIT; End; While NOT(Eof(DataFile)) DO Begin ReadLn(DataFile, Data); WriteLn(Data); End; Close(DataFile); End; { DisplayFile } Begin For Count := 1 to ParamCount DO DisplayFile( Count ); End. wxConst Pi = 3.14159265358979324; Returns the value of Pi. Program Pi_Demo; Begin WriteLn('Pi is: ',Pi :23:20); End.  !Function Pos( SubStr, MainStr : String ) : Byte; Searches MainStr for the first occurrence of SubStr. If SubStr does not exist in MainStr, the Pos function will return 0, else Pos will return the position in MainStr where SubStr was found. Here are some examples: Pos('HELLO','HELLO WORLD') = 1 Pos('CAL','PASCAL') = 4 Pos('TS','ATARI ST')= 0 See also: Copy, Insert, Delete, Length Program Pos_Demo; Var MainStr, SubStr: String; P: Byte; Begin Write('Enter main string: '); ReadLn(MainStr); Write('Find what: '); ReadLn(SubStr); WriteLn; P := Pos(SubStr,MainStr); If (P = 0) then WriteLn('Not found.') ELSE WriteLn('Found at position ',P); End.  Function Pred( X ) : (Same type as parameter) Returns the predecessor of the parameter. X is an ordinal-type value. See also: Succ, Dec, Inc Program Pred_Demo; Begin WriteLn(Pred(2)); { = 1 } End.  Function Ptr( Address : LongInt ) : Pointer; Converts a long integer value to a pointer type value. The result of Ptr is a pointer that points to the memory location specified by the value of Address. See also: SPtr, Addr Program Ptr_Demo; Uses DOS; Var SP : Pointer; P: ^integer; I: Integer; Begin Sp := Super(NIL); P := Ptr($4a6); I := P^; Sp := Super(Sp); WriteLn(I,' disk drives are connected to your system.'); End. B Function Random [ ( Max : Integer) : Integer ] | [ : Real ]; Returns a random number. If the optional Max parameter is specified, the result of Random will be a long integer in the range of 0..Max-1. If no parameter is given to the Random function a random real number, in the interval 0 <= x < 1, will be returned. See also: Randomize, RandSeed Program Random_Demo; Var Tries , Secret, Guess: Integer; Begin Randomize; WriteLn('Guess a number.'); WriteLn; Secret := Random(100); Tries := 0; Repeat Inc(Tries); Write('Enter your guess number ',Tries,': '); ReadLn(Guess); If (Guess < Secret) then WriteLn('Too low.') ELSE If (Guess > Secret) then WriteLn('Too high.'); Until (Guess = Secret); WriteLn('You guessed it in ',Tries,' attempts.'); End.  Procedure Randomize; Initializes the random-number generator with a random value. Every time a program is started, the random-number generator is initialized with the same value (0). The effect of this is that random numbers generated by a program will be the same every time the program is run. There are 2 ways of getting around this problem: 1. Call Randomize to re-initialize the random-number generator. 2. Change the value of the RandSeed variable. See also: Random, RandSeed Program Randomize_Demo; Begin { This will be the same every time the program is run. } WriteLn(Random(1000)); Randomize; { This will not! } WriteLn(Random(1000)); End.    Var RandSeed : LongInt; RandSeed is used as the seed for the random-number generator. Setting RandSeed to a specific value can make the Random function return the same random numbers over and over again. This feature is useful in Encryption and Simulation algorithms. See also: Random, Randomize Program RandSeed_Demo; Begin RandSeed := 1234; WriteLn(Random(9999)); { This } RandSeed := 1234; WriteLn(Random(9999)); { and this will always be the same. } End. ' Procedure Read [ ( [ var F; ] v1 [,v2,..vn] ) ]; Reads 1 or more components from file F into 1 or more variables. Read for text files: F is a file variable of type text. If omitted the standard file Input is assumed. Each of the variables (v1,v2..vn) must be of type char, integer, real or string. Read for typed files: F is a file variable of any type except text. Each of the variables (v1,v2,vn) must be of the same type as the component type of file F. See also: ReadLn, Write, WriteLn Program Read_Demo; Uses DOS; Var T : Text; C : Char; Begin {$I-} Reset(T,'TEST.TXT'); {$I+} If (IOresult = 0) then Begin While NOT(Eof(T)) DO Begin Read(T,C); Write(C); End; Close(T); End ELSE WriteLn('File not found.'); End. w| Function ReadKey : Char; Reads a character from the keyboard. If no character is waiting to be read a key must be pressed in order to exit the ReadKey function. Otherwise a character is read from the systems internal keyboard buffer. See also: KeyPressed, UpCase Program ReadKey_Demo; Begin Repeat WriteLn('Press SPACEBAR to stop this.'); Until (ReadKey = #32); End.    Procedure ReadLn [ ( [ var F : text; ] v1 [,v2,..vn] ) ]; Executes the Read procedure, and then skips to the next line in the file. If no next line can be found in the file, the Eof(F) will return true. If ReadLn is called with only a file variable as parameter, the file pointer will advance to the beginning of the next line in the file. See also: Read, WriteLn, Write Program ReadLn_Demo; Var S : String; Begin Write('What is your name: '); ReadLn(s); End. .G Procedure Rename( OldName, NewName : String ); Renames the file OldName to NewName. See also: Erase Program Rename_Demo; Uses DOS; Var Current, New: String; Begin Write('Enter current file name: '); ReadLn(Current); Write('Enter new file name: '); ReadLn(New); Rename( Current, New ); End. T  Procedure Reset( var F [; FileName:String] ); Opens or resets a file. F is a file variable of any type. FileName specifies the name of the file on the disk. Reset (F) Open the file F for reading. If the file is already open it is first closed. The file must already have been given a name using Assign(F,Title) (or Reset(F,Title)). If the file is already open it is first closed. The file is read only if it is a text file. Reset (F, Title) Open the file named Title. Works like the sequence Assign(F,Title), Reset(F). See also: ReWrite, Append, Assign Program Reset_Demo; Var TextF : Text; Data: String; Begin Assign(TextF,'TEST.TXT'); {$I-} Reset(TextF); {$I+} If (IOresult = 0) then Begin While NOT(Eof(TextF)) DO Begin ReadLn(TextF,Data); WriteLn(Data); End; Close(TextF); End ELSE WriteLn('Can''t open file.'); End. |  Procedure ReWrite( var F [; FileName : String] ); Creates or resets a file. F is a file variable of any type. FileName specifies the name of the file on the disk. Rewrite(F) Open the file F for writing. If the file is already open it is first closed. The file must already have been given a name using Assign(F,Title). If the file named Title already exists, it is deleted. The file is write only if it is a text file. Rewrite(F, Title) Open the file F for writing. Works like the sequence Assign(F,Title), Rewrite(F). See also: Reset, Append, Assign Program ReWrite_Demo; Var Data, Name : String; Out: Text; Begin Write('Create what file: '); ReadLn(Name); {$I-} ReWrite(Out,Name); {$I+} If (IOresult = 0) then Begin Repeat Write('Enter data: '); ReadLn(Data); WriteLn(Out,Data); Until (Data = ''); Close(Out); End ELSE WriteLn('Could not create ',Name); End.  !Procedure RmDir( Dir : DirStr ); Removes an existing directory. See also: ChDir, MkDir, GetDir, Dos Program RmDir_Demo; Uses DOS; Begin RmDir('MYDIR'); End.  Function Round( N : Real ) : LongInt; Rounds a real-type value to an integer-type value. See also: Int, Trunc, Abs Program Round_Demo; Var L : LongInt; Begin L := ROUND(1.40); { L = 1 } L := ROUND(1.50); { L = 2 } End.  Function RunFromMemory : Boolean; Returns True if the program is running from within the editor. If you are running the compiler/editor from within a debugger, the RunFromMemory function will probably return an incorrect result. See also: System2 Program RunFromMemory_Demo; Begin Write('You are'); Case RunFromMemory OF False : Write(' NOT'); End; WriteLn(' running from within the HIDE.'); End.   Procedure Seek( var F; Rec : LongInt ); Moves the file pointer to a specific record in file F. F is a file variable (Typed or Untyped) that has been opened. Rec is the number of the record to seek to. The number of the first record in a file is 0. See also: FilePos, FileSize 6b Function SeekEof [ ( var F : text ) ] : Boolean; As Eof, but skips over all white spaces. F is a file variable of type text, that has been opened. If F is omitted the standard file Input is assumed. See also: Eof Program SeekEof_Demo; Var T : Text; X : Integer; Begin ReWrite(T,'SPACES.DTA'); { Make a file with lots of spaces. } For X := 1 to 1000 DO Write(T,#32); Reset(T);{ Go to start of file. } If (SeekEof(T)) then WriteLn('File contains nothing or only spaces.') ELSE WriteLn('The file contains data.'); Close(T); Erase('SPACES.DTA'); End.  Function SeekEoln [ ( var F : text ) ] : Boolean; As Eoln, but skips over all white spaces. F is a file variable of type text, that has been opened. If F is omitted the standard file Input is assumed. See also: Eoln Program SeekEoln_Demo; Uses DOS; Var F : Text; Begin Reset(F,'TEMP.TXT'); If (SeekEoln(F)) then WriteLn('First line in file is empty.') ELSE WriteLn('There is data on the first line.'); Close(F); End. L   Procedure SetDate( Year, Month, Day : Integer ); Sets the current date in the operating system. The legal ranges of Year, Month and Day are: Year1980..2099 Month1..12 Day 1..31 See also: GetDate, SetTime, Dos Program SetDate_Demo; Uses DOS; Var Year,Month,Day,Dow : Integer; Begin Write('Enter Year: '); ReadLn(Year); Write('Enter Month : '); ReadLn(Month); Write('Enter Day: '); ReadLn(Day); SetDate(Year,Month,Day); GetDate(Year,Month,Day,Dow); WriteLn('Date has been set to:'); WriteLn('Year = ',Year); WriteLn('Month = ',Month); WriteLn('Day= ',Day); End. ,J   Procedure SetDrive( Drive : Byte ); Sets the active disk drive. The drive numbers are ordered as follows: 0 = Drive A: 1 = Drive B: .... See also: GetDrive, ChDir, Dos Program SetDrive_Demo; Uses DOS; Var Go : Integer; Begin Write('Enter drive number: '); ReadLn(Go); SetDrive(Go); End. O Procedure SetFAttr( Fil : PathStr; Attr : integer ); Sets the attributes of a file. The file attributes and PathStr are declared in the DOS unit: Const ReadOnly = $01; Hidden= $02; SysFile= $04; VolumeID = $08; Directory= $10; Archive= $20; AnyFile= $3F; Type PathStr= String[79]; See also: GetFAttr, Dos Program SetFAttr_Demo; Uses DOS; Var Name : PathStr; Begin Write('Hide what file?: '); ReadLn(Name); SetFAttr( Name , Hidden ); End. M    & / 7 Procedure SetFTime( var F; Time : LongInt ); Sets the time and date of a file. The F parameter is a file variable (Typed, Untyped or Text) that has been either Reset, Rewritten or Appended The Time parameter is a long integer, that has previously been packed using the PackTime procedure. See also: GetFTime, PackTime, Reset, ReWrite, Append, DosError, Dos Program SetFTime_Demo; Uses DOS; Var DiskFile : TEXT; DatTim: DateTime; PackData : LongInt; Begin {$I-} Reset(DiskFile,'TEST.TXT'); {$I+} If (IOresult = 0) then Begin With DatTim DO Begin Write('Enter Year: '); ReadLn(Year); Write('Enter Month: '); ReadLn(Month); Write('Enter Day: '); ReadLn(Day); Write('Enter Hour: '); ReadLn(Hour); Write('Enter Minute : '); ReadLn(Min); Write('Enter Second : '); ReadLn(Sec); End; PackTime(DatTim, PackData); SetFTime(DiskFile, PackData); Close(DiskFile); WriteLn('Done.'); End ELSE WriteLn('Error while opening file.'); End. ;   !Procedure SetTextBuf( var f, buffer [; Size : LongInt] ); Assign an I/O buffer to a text file. The default buffer size is 128 bytes. If size is not specified, the whole Buffer is assumed, as if SizeOf(Buffer) was written. SetTextBuf must be called right after Assign. It is also allowed to call it after Reset, Append and Rewrite before any I/O operations has occurred. See also: ReWrite, ResetAppend, Assign Program Buffer_Demo; Var TextF : Text; Data: String; Buffer: Array[1..1024] Of Byte; Begin Assign(TextF,'TEST.TXT'); SetTextBuf(TextF,Buffer); {$I-} Reset(TextF); {$I+} If (IOresult = 0) then Begin While NOT(Eof(TextF)) DO Begin ReadLn(TextF,Data); WriteLn(Data); End; Close(TextF); End ELSE WriteLn('Can''t open file.'); End. 3n Procedure SetTime( Hour, Min, Sec, Sec100 : Integer ); Sets the current time in the operating system. The legal ranges of Hour, Min, Sec are: Hour0..23 Min 0..59 Sec 0..59 The Sec100 parameter, which has been implemented for compatibility with Turbo Pascal, is not supported by the operating system, and it will therefore be ignored by the SetTime procedure. See also: GetTime, SetDate, Dos Program SetTime_Demo; Uses DOS; Var Hour,Minute,Second,Hundred : Integer; Begin Write('Enter Hours: '); ReadLn(Hour); Write('Enter Minutes : '); ReadLn(Minute); Write('Enter Seconds : '); ReadLn(Second); SetTime(Hour,Minute,Second,Hundred); GetTime(Hour,Minute,Second,Hundred); WriteLn('Time has been set to:'); WriteLn('Hours= ',Hour); WriteLn('Minutes = ',Minute); WriteLn('Seconds = ',Second); End. k Procedure SetVerify( Verify : Boolean ); Sets the value of the disk verify flag. When verify is on (True), TOS will check to see if data written to the disk, has been stored properly. This is done by trying to read the data just written. When off (False), TOS will simply write the data. Setting the verify flag to False will increase the speed at which data is written to the disk. See also: GetVerify, Dos Program SetVerify_Demo; Uses DOS; Var State: Boolean; Begin GetVerify( State );{ Read current status } State := NOT(State);{ Reverse the status } SetVerify( State );{ Set the new status } End.   Function Sin( R ) : Real; Returns the sine of the parameter. R is a real-type expression. R is assumed to represent an angle in radians. See also: Cos, Trunc, ValidReal Program Sin_Demo; Var R : Real; Begin R := Sin(20); End. Ks Function SizeOf( var Object ) : Integer; Returns the size of an object. Object can be any variable or type. If the object has been word-aligned, the filler byte(s) are also included in the result that SizeOf returns. See also: FillChar, Move Program SizeOf_Demo; Var B : Byte; I : Integer; L : LongInt; R : Real; S : String; Begin WriteLn('The size of B is: ',SizeOf(b)); { notice the alignment byte. } WriteLn('The size of I is: ',SizeOf(i)); WriteLn('The size of L is: ',SizeOf(l)); WriteLn('The size of R is: ',SizeOf(r)); WriteLn('The size of S is: ',SizeOf(s)); End.  Function SPtr : LongInt; Returns the current value of the stack pointer. See also: Ptr Program SPtr_Demo; Begin WriteLn('Value of stack pointer: ',SPtr); End.   Function Sqr( N ) : (Same type as parameter) Returns the square of N. N is an integer-type or real-type expression. The result of Sqr(X) is equal to X*X. See also: Sqrt, ValidReal Program Sqr_Demo; Var R : Real; Begin R := Sqr(10); End.   Function Sqrt( N ) : Real; Returns the square root of N. N is an integer-type or real-type expression. See also: Sqr, ValidReal Program Sqrt_Demo; Var R : Real; Begin R := Sqrt(4); End. hz Procedure Str( x [:width [:decimals] ]; var Res : String ); Converts a numeric value to a string. By specifying Width and Decimals it is possible to make Res look like the output generated by Write and WriteLn. See also: Val, Copy Program Str_Demo; Var R : Real; S : String; Begin R := 1234.5678; WriteLn(R :10:4); Str(R :10:4, S); WriteLn(S); End.  Function Succ( X ) : (Same type as parameter) Returns the successor of the parameter. X is an ordinal-type value. See also: Pred, Inc, Dec Program Succ_Demo; Begin WriteLn(Succ(1)); { = 2 } End. > Function( P : Pointer ) : Pointer; Switches between User mode and Supervisor mode. If P is NIL: The system switches to Supervisor mode, returning the value of the User stack pointer. If P is not NIL: The system switches back to User mode, setting the User stack pointer to P's value. The returned value is the value of the Supervisor stack pointer. See also: Dos Program Super_Demo; Uses DOS; Var SP : Pointer;{ Used to save stack pointer. } P: ^Integer; B: Byte; Begin Sp := Super(NIL);{ Enter Supervisor mode. } P := Ptr($440); B := P^; Sp := Super(Sp);{ Exit Supervisor mode. } Write('Floppy seek rate is: '); Case B AND 3 OF 0: Write(6); 1: Write(12); 2: Write(2); 3: Write(3,' (default)'); End; WriteLn(' ms.'); End.  function Swap( N : Integer ) : Integer; Swaps the high and low bytes in N. See also: SwapWord, Hi, Lo Program Swap_Demo; Var X : Integer; Begin X := Swap($1234); { = $3412 } End. !(   Procedure SwapVectors; Swaps the contents of the STrapX variables, with the contents of the interrupt vectors. Two vectors are swapped: STrap5: Address of the "Division by zero" error handler. STrap102: Address of the "Program terminate" handler. See also: STrap5, STrap102, Exec  Function SwapWord( N : LongInt ) : LongInt; Swaps the high and low words in N. See also: Swap, HiWord, LoWord Program SwapWord_Demo; Var X : LongInt; Begin X := SwapWord($12345678); { = $56781234 } End. y Function TosVersion : Integer; Returns the version number of the operating system. The primary version number is in the low part, and the secondary version number is in the high part of the returned value. See also: Hi, Lo, Dos Program TosVersion_Demo; Uses DOS; Var Res : Integer; Begin Res := TosVersion; WriteLn('TOS version number is: ',LO(Res),'.',HI(Res)); End.  Function Trunc( R : Real ) : LongInt; Truncates a real-type value to an integer-type value. Trunc returns the value of R rounded towards 0. See also: Int, Round, Abs Program Trunc_Demo; Var L : LongInt; Begin L := Trunc(1234.5678); End. A Procedure UnPackTime( Time : LongInt; var Result : DateTime ); Unpacks a 4-byte long integer to a 12-byte DateTime record. The format of the packed long integer is: bits0 -4 seconds (divided by 2) -5 - 10minutes -11 - 15hours -16 - 20day of month -21 - 24month -25 - 31years(since 1980) The format of the returned DateTime record is: Type DateTime = Record Year: Integer; Month: Integer; Day : Integer; Hour: Integer; Min : Integer; Sec : Integer; End; See also: PackTime Qc Function UpCase( Ch : Char ) : Char; Converts the letter Ch to upper case. UpCase will only return a result different from Ch, if Ch is in the range of 'a'..'z'. See also: ReadKey Program UpCase_Demo; Var C : Char; Begin Repeat Write('Enter a letter. '); C := ReadKey; WriteLn('You pressed ',UpCase(C)); Until (C = #13); End.  Procedure Val( S : String; var R; var ErrorPos : Integer ); Converts a string to a numeric variable. R is an integer-type or real-type variable. Upon return ErrorPos holds the position of the first character in S that could not be converted. See also: Str, Copy Program Val_Demo; Var R: Real; S: String; Error : Integer; Begin Write('Enter a number: '); ReadLn(S); Val(S,R,Error); If (Error = 0) then WriteLn('OK') ELSE WriteLn('Error in number at position ',Error,' !'); End. EUFunction ValidReal( R ) : Boolean; Returns true if R is a valid real value. Use this function to test the results of calculations done with real-type values. Program ValidReal_Demo; Var R : Real; Begin R := Ln(0); { Cannot be done. } If (ValidReal(R)) then WriteLn('OK') ELSE WriteLn('Error in calculation.'); End.  Function WhereX : Integer; Returns the column in which the cursor is currently located. On a standard monochrome monitor, the range of the returned result will be 1..80. See also: WhereY, GotoXY  Function WhereY : Integer; Returns the line on which the cursor is currently located. On a standard monochrome monitor, the range of the returned result will be 1..25. See also: WhereX, GotoXY Je Procedure Write [ ( [ var F; ] v1 [:Width :Deci] [,v2,..vn] ) ]; Writes 1 or more components to file F. Write for text files: F is a file variable of type text. If omitted the standard file Output is assumed. Each of the components to write must be of type char, integer, real, string or boolean. Each of the components can be formatted using the two format parameters Width and Deci. Width specifies the minimum length of the component. Deci specifies the number of decimals a real component are to have. Write for typed files: F is a file variable of any type except text. Each of the components (v1,v2,vn) must be of the same type as the component type of file F. See also: WriteLn, Read, ReadLn Program Write_Demo; Var R : Real; X : Byte; Begin R := 1234.5678; For X := 20 to 40 DO Begin Write(R :X:5); WriteLn; End; End. ex Procedure WriteLn [([var F : text;] v1 [:Width :Deci] [,v2,..vn])]; Executes the Write procedure, and then writes an end-of-line marker to the file. WriteLn can only be used on file variables of type text. See also: Write, ReadLn, Read Program WriteLn_Demo; Var R : Real; X : Byte; Begin R := 1234.5678; For X := 10 to 30 DO WriteLn(R :X:X); End.  '.The Printer unit makes it easy for you to use a printer from within your programs. See also: Dos, Bios, System, System2, Graph, STPascal The Printer unit assigns a text file by the name of Lst to the PRN: device. Thereby making it possible for you to access the printer by writing to the Lst file. This is an example of how to use the Printer unit: Program Printer_Demo; Uses Printer; Begin WriteLn(Lst,'Hello Printer.'); End. A These are the BIOS error codes, as they are declared in the BIOS unit: See also: DosError, Bios { BIOS errors } Const E_OK=0; { Ok} ERROR=-1;{ Error } EDRVNR=-2; { Drive Not Ready} EUNCMD=-3; { Unknown Command} E_CRC=-4;{ CRC Error} EBADRG=-5; { Bad Request} E_SEEK=-6; { Seek Error} EMEDIA=-7; { Unknown Media} ESECNF=-8; { Sector Not Found} EPAPER=-9; { Out Of Paper} EWRITEF= -10;{ Write Fault} EREADF= -11; { Read Fault} EWRPRO= -13; { Write protected} E_CHNG= -14; { Media Changed} EUNDEV= -15; { Unknown Device} EBADSF= -16; { Bad Sector On Format} EOTHER= -17; { Request: Insert Other Disk } U:  ,  ..81.4/8 8The following pages describe the various run-time errors. See also: CompilerErrors 50Stack overflow. Generated by the $S+ control code. Check is performed at entry to each procedure and function. 51Range check. Generated by the additional $R+ code. You may be trying to assign an invalid value to a variable, either by using an assignment as := or by passing it to a procedure/function. 52BUS error. Generated by the 68000 CPU, when trying to access invalid memory. The memory right above address zero is also invalid for a normal program. This area can only be accessed in supervisor mode by first using the Super function from the Dos unit. 53ADDR error. Generated by the 68000 CPU, when trying to access a word or long-word element from an odd address. 54Other errors (traps) than BUS, ADDR and DIV0 errors. 55DIV0. Division by zero. 56Heap overflow. The heap is full or almost full. Use MaxAvail first. 57Other error. Same as error 54, except for the trap. The address given is the last one seen after a range or stack check call made by using the $S+ and $R+ flags. 58User break. User has used the Shift-Shift key combination. This test is only done in the range and stack check routines. Therefore it can only occur if the $S+ or $R+ flags are used. Runtime errors (file system): 60File not open. You cannot read from a file not Reset. 61File not open for read. You can only write to a text file in ReWrite mode. 62File not open for write. You can only read from a text file in Reset mode. 63No memory for device. 64Read Write error. 65Bad numeric value read. 1      & *6##&#4& ;P V5Z ]  The following pages describe some of the various compiler errors. See also: RuntimeErrors 1';' expected 2':' expected 3',' expected 4'(' expected 5')' expected 8'[' expected 9']' expected 10'.' expected 6'=' expected 7':=' expected 11'..' expected 14END expected 13DO expected 15OF expected 17THEN expected 18TO or DOWNTO expected 12BEGIN expected 111BEGIN expected The compiler expects to find BEGIN as the first word after the end of a declaration block. 16INTERFACE expected The word INTERFACE must follow a UNIT heading. 19IMPLEMENTATION expected When in a unit, the compiler expects to find IMPLEMENTATION when it cannot find any further declarations. 20Boolean expression expected The construct 'IF expression THEN" needs a boolean expression. You cannot write 'IF 2+3 THEN'. 21File variable expected 22Integer constant expected 23Integer expression expected 24Integer variable expected 25Integer or real constant expected 26Integer or real expression expected 27Integer or real variable expected 28Pointer variable expected 29Record variable expected 30Ordinal type expected 31Ordinal expression expected 32String constant expected 33String expression expected 34String variable expected 35Identifier expected 36Type identifier expected 37Field identifier expected 38Constant expected 39Variable expected 40Undefined label 41Unknown identifier An unknown identifier has been referenced. 42Undefined type in pointer definition 43Duplicate identifier An identifier has been declared twice in the same declaration block. 44Type mismatch 45Constant out of range 46Constant and CASE types do not match 47Operand types does not match operator 48Invalid result type 49Invalid string length 51Invalid subrange base type 52Lower bound greater than upper bound 53Invalid FOR control variable The FOR variable must be either global or declared in the FOR loop's declaration block. 54Illegal assignment 55String constant exceeds line You may have forgotten an apostrophe in the string. Note that a single apostrophe in a string must be written as two apostrophe's. 56Error in integer constant An integer constant with an illegal range has been declared. 57Error in real constant A real constant with an illegal range has been declared. 58Division by zero The compiler has located an attempt to divide something with zero. 59Structure too large Occurs when the size of a structure exceeds 32Kbytes. 60Constants are not allowed here 61Char expression expected 62Invalid type cast argument Type casting can only be performed when the argument is of the same size as the desired type. 63Invalid '@' argument Only works on procedures, functions and variables. 64Label already defined 65Invalid file type 66Cannot read or write variables of this type 67Files must be VAR parameters File type procedure and function parameters must be variable parameters. 68File components may not be files It is not possible to declare a component of a file type as being a file type. 69Typed Pointer variable expected 70Set base type out of range A set base type must be a subrange with it's bounds in the range 0..255, or an enumerated type with no more than 256 possible values. 71Invalid GOTO A label has been declared (LABEL MyLabel;), but not placed anywhere in the sourcecode (MyLabel:). 72Label not within current block It is not possible to jump to a label residing outside the current block. 73Undefined FORWARD procedure 75Error in type 76Error in statement 77Error in expression 78Invalid external definitionsymbol 79Invalid external referencesymbol 80Too many symbols Only 32Kbytes are set aside for the symbol table for each unit or program. 81Too many nested scopes Also given when too many units are used. Maximum is 63. 83Too many variables No more than 32Kbytes of data is allowed in a module. Split up the module into units. 84Expression too complicated All data registers in the 68000 processor are used for temporary integers. 85Too much code No more than 32Kbytes of code is allowed in a module. Split up the module into units. 86Unit not found 88Unit missing A unit cannot be found in either PASCAL.LIB or in any of the specified directories. Change the 'Units' path in the options/ compiler dialog. 87Bad unit or program name Happens if a unit named in a programs USES clause is called the same as the program itself. 89Incompatible unit versions The program is trying to use a unit compiled with another version of the compiler than the one you are currently using. 90Syntax error 91Unexpected end of text You may have more begins than ends. Maybe caused by a non-terminated remark. 92Line too long Only 127 characters are allowed on one line. 93Invalid compiler directive An unknown compiler directive has been found. 95Undefined EXTERNAL procedure An EXTERNAL procedure or function has been declared, but a {$L} directive is missing. 96Bad object file in file You cannot make BSR and BRA to externally defined labels. You MUST use JSR and JMP. 99Not enough memory The compiler cannot complete the compilation, due to insufficient memory. Ways around this problem can be: Limiting the size of the resident library or removing resident programs from memory. 100Internal error 101Too many files ($I or USES) Each file specified in a USES clause uses an include level when it is recompiled. 102No room in 16 bit fixup field, try with $F+ An attempt is made to call a fragment of code located more than 32Kbytes away from the current location in memory. 103Duplicate unit name A unit has been specified twice in the same USES clause. 104Conditional variable missing The name of a conditional variable is missing in a $DEFINE, $UNDEF, $IFDEF or $IFNDEF directive. 105Misplaced conditional directive Occurs if, for example, a {$ELSE} directive is found before a {$IFDEF} directive. 106ENDIF directive missing Either this error or the "Unexpected end of text" error will occur if a {$ENDIF} directive is missing after a {$IFDEF} and a {$ELSE} directive. 107Target address found 108Target address not found The error location given in a runtime error message could not be found. May be because some of the compiler directives are set differently than they were when the program were compiled. 109Find only works on PROGRAM files 110Error found in unit 50'.' expected after module name When using unit references, the unit name must be followed by a punctuation mark. 97? 94? 98? 82? Undocumented compiler errors. o;*Compiler Directives A compiler directive must start with a $ dollar sign right after the starting bracket, as in '{$' or a '(*$'. The next to write is the command, which can be one or more letter(s). Multi-letter directives are used for conditional compilation. The different directives has default values, set by the ALT-K dialog. Switch directives are written by using a single letter followed by a '+' or a '-'. The dialog's show this as a check-mark next to the '$R' text. A '+' (or a check-mark in the dialog) enables the feature. Several options can be given in one comment as in {$R+,S-}. {$D+} enables generation of debug information in the program file. The names saved are for all procedures and functions used. {$F+} enables the program to be greater than 32 KByte. $F makes all procedure and function calls use the 32 bit version if needed. Each unit may have to be compiled with this flag. {$I+} enables automatic input/output checking. An IO error will terminate the program. By using the $I- option, you will have to test the IOresult function yourself after each IO operation. {$R+} enables range checking on simple types. Every assignment to simple types is then checked, and every use of indexing an array or a string is also checked to be within its range. The Shift-Shift user break system is also enabled when running a program from the editor. {$S+} enables stack checking. Stack checking is done as the very first thing in each procedure that is compiled using the $S+ flag. The Shift-Shift user break system is also enabled when running a program from the editor. {$V+} enables the (normal) var-string checking. By using the $V flag, you can pass strings of any length to a procedure, that has a string variable as a VAR parameter. It is up to you to make sure the string passed is not overwritten by more than it can hold. {$M STACK,Hmin,Hmax,DosFree} sets the default memory allocation requests. $M has no use in a unit. Each of the 4 parameters specifies a number of Kilobytes wanted. Stack is the request for stack space, minimum 1. Hmin is the minimum request for heap space, minimum 1. Hmax is the maximum request for heap space. DosFree is the amount of memory, that must always be left free when the program is started. {$I FileName} makes the compiler include the named file into the source code of the program that is currently being compiled. The file is searched for using the path(s) specified in the Compiler-Option dialog. {$L FileName} makes the compiler include the named object file when all declaration has been done. The EXTERNAL procedures and functions are assumed to be in a xxxx.O file. You can specify several $L directives, one for each object file. The object file is searched for using the path(s) specified in the OPTIONS/Compiler dialog. Source code control The compiler maintains some variables, that is not part of the program being compiled. They can be used to control the way the compiler works, by enabling or disabling the compilation of certain parts of the source. Three variables are defined in this version: Atari, 68000 and Ver10. The last one is version dependent. The variables does not contain any values, you just test if they are there or not. New variables are defined with DEFINE, and removed by using the UNDEF directive. The test for their presence is done with either IFDEF (for IF Defined THEN) or IFNDEF (for IF Not Defined THEN). The compiling state can be changed using the ELSE directive. An ENDIF directive ends the $IFxx sequence. Finally you can test if a switch option is set by using the IFOPT directive. Examples of the use of conditional compilation. Unit OutStuff; {$IFOPT R+} {$Define RangeCheck} {$Else} {$UnDef RangeCheck} {$EndIF} begin {$IfDef CPU86} N:=Swap(N); {Swap bytes if using the 80x86 family} {$EndIF} {$IfDef DebugMode} WriteLn('Debug=> N is now: ',N); {$EndIF} end. Examples: {$R-,S+,M 5,10,10,20} {$S- Disable stack checking} {$R+ Make sure range checking is enabled} `TȘ`PXXXX kf o*HWDLԁ.BN@lN@(N=N/,N-N$zN xBgNANVH0. n J@oU?. ?. N)Jf`*N 0. y_H_29_RAA=@0. y_H_29_RAA=@HnHn?.NXHnN-XHnHn?<NQ p.n]D2.y_^Dg`=nHnNPF?<A?<ZNPZ?<_NP@?<0?<9NPFXHnHn/< NPZ n^D2.SAtA0?HnHn/< &NOHnNP:VDg Sn`p.n\D2.tA0?HnHn/< &NOjHnNOVDg Rn`HnHn?.0.n?NP`HnHn?<NO`N `HzHn?<NO<BHzN$HzxHnNOg\YHnN4-_ gB?<BN6/.HnNVB'/.HnNBgBN6J.gNzN8N&N^ _\NHELP NVH yuToJN SyuT09uTGrG/HkN3_3_NNN`N(LN^NuNqNqNVJy_f U?9_BgBg?9_?9_N6B3_Jy_l?<N"`?9_?<UHy_kN8UHy_kN8BgBgN7` y_oA_C""`nBg?<HnHnHnHnN6=n=nHnHnN'>0.nn0.nn?.?.HnHnN%zAC_""?9_?.?.?.?.N5`?9_?< BgBgBgBgN6N&HBgBN4N^NuNqNqNV n 0 @f N` @(fh n 0(y_fRJ9_gBN~Jy_l By_`NTJyuTfBgBgB'N~` NN`BgN!8`Z @f^ n 0(y_fH n Hh n Hh N&?9_?< n ?( n ?( n ?( n ?(N5N%P` @)f n 0(y_fBy_` @f n 0(y_fN&v` @fU?. ?.N$Jf n 0( @f N ` @f N `z @f N `j @f N `Z @fB'?<N `D @fB'?<N `. @f<?<N ` @f<?<N ` @fr n 0(y_f\ n ?( n ?( n Hh n HhN"?9_?< n ?( n ?( n ?( n ?(N40NN`x @fN":NN`` @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ite|Cancel] NqNqNVHz6Hn?<N+HyU?<BgN(`XN$@0. @fTHzHnN+Hy_HnN+Hz HnN+HzHnN+Hz HnN+HnHn?<N+V` @f0Hy_HnN+$HzHnN+tHnHn?<N+ `R @fHzHn?<N+`6 @fHzHn?<N*` @fHzHn?<N*HnHn?<?<N+^U?<HnNr=_N^ _TN [1][.][ OK ]Unable to access|| |Please modify HHA.CFG|and restart your machine/ has been removed.| |Please insert correct disk'|Internal Error !| |Insufficient memory(|Internal Error !| |No available windows |Insufficient| |disk space NqNqNVJ9_g?9_NB9_N^NuNqNqNVJ9_f?9_BgN _N^NuNqNqNV=n=n =n =n?9_HnN N^ _PNNqNqNV09_H_=@N^NuNqNqNV09_H_=@N^NuNqNqNVJ9_g$?9_?<HnHnHnHnNT`A_C""?9_?<?.?.?.?.NJ9_WD_N^NuNqNqNV?<?9_?.?. n ? n?Hy_Hy_Hy_Hy_N09_H_H@J@g"nSQSy_`09_H_H@J@g"n SQSy_`N^ _O NNqNqNV n =P n"n 2"n2N^ _PNNVHG_0. S^D2kn ^D2.k^D2+kn^D@ LN^.NuNVHG_?9_?<HSHkHkHkNG_0+SS@y_m0+SS@y_k0+kS@y_o0+kS@y_kLN^NuNVH"n SQG_"n RQ?<?9_ n ??.?.?.HSHkHkHkN0H_H@J@f"nSQG_"nRQ?<?9_?. n??.?.HSHkHkHkN0+H_H@J@f09_y_29_y_Ao09_"nQLN^ _PNNVH#_VJ9Vf(G_?9_?<HSHkHkHkNN` _?9_N ?9_NBy_N LN^NuNVHUNr=_0. noHn HnNN0. 2.@m=@=A`Rn0.y_=@Jn^D2.n_Dg^G_0.S@_k=@0.@y_=@0+SS@=@??.?.?.??.?.?.?< N 0.nfnN$LN^.NuNqNqNVBACp"Q=n=n=n =n =n=n=n=n?9_?.HnHnHnNN^ _ONNqNqNVHzPHy_X?<N$HzPHy_j?<N#3_HzHHy_?<ON#3__N^Nu HighSpeed Help Welcome to HHA PASCAL.HLP NqNqNV/.Hn?<N#p.rA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N DHyUHz N 0N^Nu ConDevice(_V#VLDAH~#VJ9Vg$-mll$mb*//NSڏJ9Vg+E// Bg?<JNA ataA0J9Vg m$ (ga"A,#V#VNAa?<`Hz#VNuJ9VfAa~`ad&9Vg0VAtad09V>aFAuaTA|tJgaXHtaBaNuHz?<&NN\ONuxp<0<:m^a"QNuHQO ONTx OaPONuga`H ?/<NM\OLNuBaF#V3V.yV yVBV oN`?9V?<LNAAH x2| hg"h$#VNup98tg xp4Ug p5Sgp6 xαVd yV$f yV|?/``p7 o`Apa,#VA0<a#VNu yVpa yV0</??<NMPONu Runtime error: at offset: ????. Not enough space for heap Accessory errorPJ"6XPBF ,0CNVHaXBn np.{jNf. f&(* n a|>q`N`. f n J9VfaDLN^ _ NLN^"_ afN JzH`0H` ` r$gBBHBJ|~|gNu$rļNu "$g(| 4||BBBHBJ||gNut4TBSBeJ|? g"Nu `Jk |?kiJg B0 Nutpr`4<` n Jk"|kJJgFҼd RdRB|d$Jv &ƼH@|BH@ Nu4<pr`pr` n Jk|~k2Jg"мdRB|dJHBBB Nu4<p`p`~,ka~Jk ~Jg~HBB=GNuEJ9Vga`JkJk~JgJJgvBlCDEB|@lbE| e| "pJEg|.F̀f҄уe&NudBD@Jf gr| SBdRBNuB "$NuprtNuJ9Vga\`VJkJkJgJgEBE/t,.pBAHA*HE҅т:g HDHD҅т2HAp:g҅т*HEHDHD҅т:g҅т2HAp:HCHC҅т*HE҅т:g HDHD҅т*HE҅т2HAp*HEHCHC҅т:g҅т*HEHDHD҅т*HEHCHCЅ:HCHCHFH@܅BH@HAFHAHFFH@B$H@kSBNuJkJkJgJgEBERBJfgzNV-BH~Lx$ht=p4<HFBDHDچׄDBUH@HA02JgLSvp҄уdTGfLRBSBdN^NuNuJgBNuJ9Vfrt("gjDhLNuQBᘰgUrNu &<x*BEa8JkJgJBoƔ| lDBgDNuRn <Nu<aTBiNu _?HVNALVTJj 3V~DNJ9VgV~Nu2)/ "i "_RA3AifNLNutpaf"?@o SBp aQ4`aQNLNu4/"oApa _XONL4/a _\NL/A` L/A` t` t`t`t _"_BgJg$aNeg< gg< bRi`RNL/BBYBBBBBNKt`4<L faf2NJ`HaByV~23oNJgBQ _ N"o)SfNJ.NuAL`AL"oa8f#o 3iNeig3@V~ _XONAL`AL"oaf,#o 0/?)3@3@N3_"/g A0ByV~ _NLaf 2)a4rNL _PON"oa^2)a*/@Nu"oaL 2)a/@Nu$HBHBBBЂNu Ctv BAdAрQ&FNu"oaWD _XNa>f*prNL/prNL/ /rNL "NuprNuNK NKNL^NV n Ca n"OaHWHnBgpVaN^ _PONNV n"OaHWpAaN^.Nu$02"_ _/t @A`BQ`Q`BQNu"opBQNu _0"WrIN _20"WetJ€<RfRpSdN$02 _"_/`QNu _"_0|d 2I1NpNLpH0Q _PN"0 _"_/c)`QNu""_ _/tcSBeVfNu""_ _/prdPF`QNu$02 _"_/tJAnrBnARBJ@oBo0S@QNuBNuNVHn/. ?<?.SWNRf/.HnNR>Hn/. ?.?<NRfHnHnNR>Hn/. ?. NQN^ _O N _ Wam WznW N"_  _#VB P rҀ| kHp Pr N /gF^| yV" "H Xb If"i`Jk""#hÉ#A"o"BB _PON?<8//NB/ L^|"Q yVb`@ hbJk2#h"Ef #j ё!I$Hеf !i ѐ$_ _PN yVpИ PdR"W.N yVp` hd" j"W.N"0"_ _/ge` QNuQNu"_20 _`QNJlD-C"r \Y"gt/RlЁ`BNu;B@'d L *    t T  >F .Z 0D     vb &" 6  $ && .&$ J  @ & "@.` h2" (.2> 4 4P4 0  " 0  6@  x  \j4      .$T2".&" 6 ,* .N  * "   FV .0 $ " `$ 0  . . &  *D.$. " 8&. "$F    .  ." &   &( T$8  ", V2(, " Ш$@ 6* d0:,>N$.  ( 6"x *6HTA: +.. ASCAL HLP ],A`Rt &oLraJzE.|*L;HƓHBgpJaJ a6a`AHy Hyj HyT Hy Hyl NuAHy Hy* Hyj Hy HyT Hyl NuH"<psNBByByLNuaNuH`2AA.C2"tBA2Q|f3"<0<NBL 9H@J@Nu!!!5U!!!!! !aA!BCaA1 QQ%a!e!! 1  aVaZrL.B.JFfAj&<895@p" gp4R@J9Vj P@/pOav rCfT@TA00 JDVC0 4 40  9R#MR9VgЀ #.xTpaLH.arJ95Fg a Q5FJ95Hg&anaZ3jgpfak6pga`#.hTByjpapa3ear`r?pLaGgpOapyfaagagaga^ga\  faaVNu3jpk`4pOa.pyf6aXaDagavNua6@g9Va1JkaLaE4m :NuR95O9?5Of A2 aNuP5@H>95@By5@a.f6pOaPy5@095@apap:a/(C r< QA+xa/p\a/ p .oQp*aR#Xa.kp"`NVaEBRHT/ "Ja.j"_papZapaSyk`Jg\rRA *gfS \g :WR .fC *gCJfS .f *fCJfpN^a:a.NJ@NuH"l",So `  gQBLa-NuNVHAj 0pBXQA#Tpag0.af nfLaj`a NLN^NuH@0<H@#jppa ylNuC*PPP3|3|!#| #|3|dAוa|Aeata3ka3|f IA*a3a4>a~Ry.nA,HJfa3F"HAWa,A,Ha-(A,Jfa3""HA^a,dA,a-Nu#Ta32 yTga,p|aa,a3`4>pa0#5.B5*NuA XCH42)SA#TBjpra0)|fpif ifSi|f494BSBiCQNupa&Hpa#.hrvARA hW hfx$h -gn  ghx| <0< < |+dHLC.JfS "#gPp4< "^g4< #f$K<RJgf2p hgh#.hT3jp`zB4<a *Og4<`L52@SBASCH4L52pVAWBUCx1A`"SlH0HL52H8aL:94REEEDPRNu yP0<RSo 0 caNup rak,3,5DP5LpMa35B#4raLH52@AH 5:a|Nu p p*a|Byjp2ap|35>3j3l yTrp tpf|nNuHa*Hat#Tpap6aLJEg6VE1Epa`a"a8`a^0, S@lgRlRHNu9|'NuJlg Sla,SHa(NuBlNualo0,aNu/a a _Nu fRHNu  fSHNuNu"PpR@!g< f1@NuS@kJg ( WfSNu y5. ,",ab$g"P S#5*aDpNupNuL5*r`0 lfBf`a"l ,)@ja)HfgI"Q ,ja)l()l,NuJfg ,fNuJfg ,(c>"Ьj lfa g, ,jӬj P"Ha LH("lf"QaNuJfg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H Ka zt(*,99"a 099 T P ABdAZa`d ,fr +fj<fJg" ,"+<fae`:<fae`.<faf`"HJN ```Ё` ``)@a\` ,fDJf>"<gPP9$L 9 9!f99" La Zt 99",a ` +f*Jf$r$gP9$L Ka`xrgp`!rgt<f0 ,fP9$L +f +abf'A9!`> 99"f4pr La pr Ka 099 ;a <`  a099 "< $g0 +f +d ,f ,d ,fP9$L9#r<g <g, La 6y9""<099 gB +f< g4Jg` c$,; + Ka,; +` Ka(*99#99",a t 99!f t,a `a L`HJ99$gL K"LpJ+fp Z2QNu L99"a K99"(g (gaX`ANu (f a@t (xa |aNuJ(f,PJ.oara"aNu (f.a@0 S P f h fP9$L LaVap Sa099 AZaaNu LaBa~p 99!gp 99!gp 9 9!gp S`\,P V f n fNu/,P V fF (g> n g/a& MapD _a`paapaa2"" _Nu,P V f/a/ Ma _pDa _Nu,T". UAgUAfZ La Ka`4 (fD,P nng1|Nu1|Nu/A .ap _!@1|P1| P Nu La`a< KaXa4 99!ga@p a099 AZ` Laa p `h,P Vfh . |d< (fV|gt|gz2 `QR@"Aa A!@ M1|P1| P Nu?a MaH Ma0<`taH MaaL0t &)C,.apNu,P V f (gJ hf <a MNuraa*tvx<:<(a(tvx<:<(a`1||1h`Jg )"qH@ )"qH@Nu Laj Kafa`99!p<gPp< gHp<g@p< g< g p<gpat(M9| < 9 9!fH@)@Nu`L/,P VfD (g; Nu (f /Aa$ _NuJ(f2( /A Jka \SAf _Nup; H/ C9&#"_Nu (f (; NuJ(f2( /A k; \SAf _Nu9%`B99%(g,Sfp<"(NuSf (; NuSfpNup.2(Nu/?( ((A <er:Rgr9"(Jl2`Z"(JlJAg<(`H<`B99%f |n|l<(t(*a:r<0t; Z|Bg SWgt v(*a \`T _Nu|99%a99%Nu9%at99%gt(*`Nu Ka L(SgrSgDSg@Ug0( S@oJ0 lJgat,.`6Sh at v(*|'` aHaVaL0t ,P&.;0E,.a`/,P\H . V f|fTHa\ _!@P 1|P1| `N (f(`av (fA` (f(f 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?99V319XBy9LBy9NpaFaP y;/aFa6L9Na'@ _pa39V39N39L39X9G K@Nu099Xa:gp,a:g a099Ly9Ne39Na:g``P:+a:Q:+gaXa:099Xa:gF?99Laa:ga:a:?99X39Xa~39X39La:Tg099Xa:Nu/ a^?a:r"y;//?#;9GaB"y;3###;0"_`>pHa:f@a: a( p6g pDf0fT`As#; WBg`?Hz`xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" `Hz`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaHz>`aaaaaaaaaaaaaaaaaaaaaH o 2`0aQ/H LNuH@aH@/ y:J9:fa P:0 _T:Ty::k`UKeNuH@aH@/ y: P:<1 _TANu":g&a&By9rJk:mda `pa09:y: PB _NuH` y:y ;0d y;0a P29:6k1::49:p 1 49:13:6B Bp Bp 1: 0y :#::abknp y5 PafkH y5a PaVk8 y5a PaFk( y5a Pra0k y5aJg PaaРg?aИA9a0`:ѹ9f`JaaH$P , L"Ja΄aVt4a.aZt(a&a^t.aabtJaadtRaaft aLNuB(C t( P a:Nu/ #; paLpa@f(aPf"aϔ|c Wa PaϠf a"_Nup` / I;.(l g0,DBlDJ@ga`aϰ(_NuNVHH0xz~cJg npaf( n#; paвf**g& naκa,a0 g(H a .aL`~"$0L N^Nu(y6af/HgNu`n m@NuH?93?#63c;:aC6BHgHa/pa$a _Ra A1aabaa4a09;:kJgA;Pa\a33;:6L|NuB96B bV6g #;<6Nup29;:kANuA0gf@NupNuBKaA7aaa$A7aaJy;:f 6fB9609;:Nu6anA7apJ9Kf "HAKa IpaɖpaȊf*aaA7aRa yk;:g3l;:`3n;:C;Pal`\B9B;6B98A;4 <TaŨCC#Dpad#Lpa#;L <aH#;H#;DNuaA;La yLa2NuH#9Hy#9By;:aa$~pNa$faf&Nu96fadfNuaL]09;:Nu3;:L9H;< yD&(T҃ԃH6A&C7aT @C7pa 9; g @C;Pp@aJ9g apa `.y9NuA9 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Sn`v (<.f g`<efRD<-g<+gSadl=Cazd8.:LDEC=EjDE|o`D6. .-fDCn6.a|?i$jprtBC; 2HSLN^NuvS`ar L`^ar L`Ta T P fNuar L`:aj T P eNua L`|aT LavaR T PfNuaH T P fX ,g La6 ,H@|`aB29::`8pJ, grNua La`aAa"f60 Lalaaa a LaaaHA&a` 9::&gNua LaraPra\aaRa"S Qfa g T ( pH@f Ka~a|0<a(M9|)|`HaBA aff40 Laaaada LaaaAJaX`NuaBAa"f40 Lalaaa a LaaaJAna`Nu 9@:&fTaaN LaT T P g P f ,gp`F` ,g Lav ,H@)@Nu , Nu9Ra*Ra LaJ9Rg< T P g( P fPJ9Rl$ ,gp a<`Da` J9RlpVaRNu? La/ Ma _0`, La,,aH`4 9:&g&Aaf*TN`"P ?,ag aga,gafNuaff P f>(M9|P9| P J9Rla B9RA; p a6)@`h ("pH@0a !iIpaI( P e|)y; a`*9|CLL!@ R|!@`9Uj@Nup6afd&H ( pH@ Pf yM(aJ,m T (D|2a8|` La0a Kaa J,l0FLZdlz TVZn*.Nl^bafaBa9|(MpP`( L9| MpQ`at T P gH ,g2, Laft,,a00a9|`a0<A|f&0<5` 0<7` 0<8`0<6?a|f0a9|(MNu0FUNCTION 6 TYPE ]NOT@ FORWARD5ASMUOR B  BT ->)IJ00  '$''V$''&' Desk File Edit Search Compile Options DA00New ^N01Open... ^O02Open Selection ^T03Close ^U04Save ^S05Save As... 29Revert to Saved06Print07Print Selection ^P33Execute...34Quit ^Q08Undo UNDO#09Cut ^X10Copy ^C11Paste ^V12Select All13Outdent ^J14Indent ^K31Get Info ^I15Find... ^F16Find Selection ^H17Find Next ^D18Replace... ^R19Goto Line... ^L20Find Cursor21User Screen ESC#22Cycle Windows ^W24Run #R25Make #M26Compile #C27Build All #B28Find Error #E39Destination: XXXXXX #D Destination: Memory #D Destination: Disk #D38Primary File: PPPPPPPP #P30Get Info #I40Help... HELP41Save35General... #G36Compiler... #K37Linker... #L42Run... #J--------------------------------Bug......YesNoFrom TopOkHelpCancelReplaceFindFind ErrorCompiling:Line:KBytes free:32About MAXON Pascal...MAXON Pascal, Version 1.5Copyright 1991,Christen Fihl andD-House, Denmark.Compiler OptionsInitial Options: $R $S $I $VRange checkStack checkI/O checkKeep names for debuggerStrict string checkingSearch Paths:$Define: _______________________________________________Units: _______________________________________________Program: _______________________________________________Include: _______________________________________________Object: _______________________________________________Linker OptionsRun Options $F $DMake pause after program run:Use 32 bit fixupAdd symbols to program filePostfix for programs: .___$M: Stack: _____ KByte$M: Heap minimum: _____ KByte$M: Heap maximum: _____ KByte$M: Free to DOS: _____ KByteMemory for program: _____ KByteSelect Primary FileXXXXText File: #XXXXText: # bytes, # linesXXXXCode: Not compiledXXXXCode: # bytes code, # bytes dataXXXXHeap: # bytes total, # bytes freeXXXXDOS: # bytes freeXXXXDisk File: #9aXP_______________________________________________________________Find What:Change To:Words OnlyCase SensitiveReplace all without askingWorkStr8Parameters: ________________________________Goto line: _____Code offset: ________General SetupAuto indent:Locate Resident Library (PASCAL.LIB)(Activated next time you start)Autosave Configuration:Autosave Files:Tab width: _[1][Not enough memory for file1][ Ok ][1][Not enough memory |for file|Close a window1][ Ok ][1][Not enough memory for text1][ Ok ][1][Not enough memory |for text|Close a window1][ Ok ][1][Not enough memory for scrap1][ Ok ][1][Not enough memory |for scrap|Close a window1][ Ok ][1][Not enough memory1][ Ok ][1][Help file Pascal.hlp not found1][ Ok ][1][Not enough memory|to run program1][ Ok ]NoName.pasNONAME9.PASNot on disk[3][File already exits|Do you want to overwrite it?2][ Yes |No][3][Text is changed|Do you want to save it1][Yes|No|Cancel][3][Workfile not saved|Do you want to save it1][Yes|No| Cancel ][3][Workfile exists|please name it now|with (SaveAs)|or remove Auto Save1][ Ok ][3][You are about to loose|you text. Do you really|want to do that2][ Ok |Cancel][3][You cannot revert|an unsaved file1][ Ok ][3][Cannot find primary|file. Please change|or remove it1][ Ok ][3][Help window is|read only. You|cannot modify it1][ Ok ][3][Disk is full| |The file is NOT saved1][ Ok ][1][No more windows1][ Ok ]QWERTYUIOP[] ASDFGHJKL;' ZXCVBNM,./ 1234567890*5AM aJt$] P P,       #  FP   { #"~,AVd~v ~  ~ ! "~ /$.  %&'()*+,'-. #; :09 1O2f3}45|678|9/ F;E <=w>7?@SAoBwCDEw :  GN"HIJ/K@LQMbNF (&  c& c8 c J c 00 &@@@k |   (c I  _   j 00  &@@@ |     (c I  T  _ j  y  0#@B  0& D, 18@cc.FX 28@cc.t2 2 <0  . .   6 B@' ( (  c ( @$@$ @$  `$     c   1  c Q  i <2(@~@@@)@.  @    :  :  :  : $: 6cmc c c cQ c c c 6 cc \, "@)@. @c \c xc   c   c  c Q c b c c  c 0 &@! <, 3 c  ( , 0 < -- %%   09*09c090909 ~ y !-Xh  `hx Uni1System@UNI2 >/N/&!t +Rh!dBh// ^ r X n  2      zf *R *> **>Rf  vVlbN :READLN Z REAL ] VALZDISPOSEZ RANDOMIZEZBYTE ]TEXT ]> CLOSEZ FLOAT[LOWORD [ ORD[CONCAT [RENAME Z COS[APPEND Z ABS[ ROUND[ARCTAN [ SQR[FILESIZE [ MOVE Z PTR[SHORTINT ]LONGINT] ODD[ SEEK Z MEMAVAIL [ SETTEXTBUF ZDOUBLE ] ORD4 [HALT Z WRITEZ FALSE\ SQRT [ STRZEXIT ZINTEGER]P TRUNC[ PRED [ COPY [ EOF[" NEWZ MAXLONGINT \ SIN[HIWORD [ SWAP [ INCZPI \*@ڢ!h2ADDR [( READ Z INT[LN [BOOLEAN]EXTENDED ]*n LO [ DECZ PAGE ZGETMEM ZCHAR ]2 CHR[SIZEOF [POINTER]f EOLN [# SUCC [ EXP[DEVICE ZFREEMEMZNAN\*REWRITEZ ERASEZFILEPOS[!SEEKEOF[$MAXINT \pMAXAVAIL [UPCASE ['RANDOM [)LENGTH [TRUE \$SINGLE ] BLOCKWRITE ZDELETE ZFILLCHAR ZWRITELNZ RESETZSEEKEOLN [% BLOCKREADZIORESULT [& POS[INSERT Z HI [ SWAPWORD [ASSIGN ZSYSTEM N UNITVERSION\6WORD ]D$ PTRLEN ]BASE QfSIZE Qh PBASEPAGE] RBASEPAGE] rP_LOWTPA Qf`P_HITPAQfJTEXT Q6DATA Q"BSSQP_DTAQ fP_PARENT Q$ P_RESRVD0Q(P_ENVQ,fP_STDFHQ0  P_RESRVD1Q6bP_CURDRV Q7J P_RESRVD2Q8 J2 H 6P_CMDLIN Q vINPUTQ>OUTPUT Q>*IORESVAR QxAPPFLAGQrFPUMODEQ\HEAPORGQfFDEVCHAIN Qf.xHIGHSTAK QfLOWSTACK QfRANDSEED QFEXITPROC QfEXITCODE QERRORADD Qf LASTPC QSHFTSHFT QfpZBASEPAGE QXSTRAP5 QfBzSTRAP102 Qf* B System|RF1.ORF2.ORF3.ORF4.OFP1.oFP2.oFP3.oRM1.o XINIf XHLTLXMULIdXSQRIXDIVIXMODIXLDSXLACXSTSXSCPXCONXCPYXPOSXINSXDELXLDZXLZZXAZE*XAZR6XSTZNXZEQZXZGEfXZLErXZUN~XZDIXZISBXZINXNEWXDISXMEMXMAXXMOVXFLCXCRWXCRLXUPC0 X_FP& X_FPTRI ~DEVICEPx ~RSETTEXTr ~.REWRTEXTR WRCHARWRINT WRREALh JWRSTRWRBOOLz tWRLNf READCHARREADINTREADREAL READSTR READLINE CLSTEXT TEXTEOF TEXTEOLN SEOF SEOLN" RSETFILE *REWRFILE pWRFILE~ FREADFILE TSEEKFILEf 8CLSFILE& bFILSIZE8 ~FILPOSv FILEOF FREN FERAN ~PGETIORES^ ~CHKIORES WRPAGE 6REALSTR *INTSTR NSTRREAL BSTRINT XBKR &XBKWXSTKl ~ d$d8dDdTd|d2d>dNd|ddd^dddddd(d dddd(d( ddpdpdddddd$ddd ddd dd"ddd(ddd0d Bdd*dd&d*d"Bd"d&d0BdFdhd>d6dhdd>d>dd d ddRdXd`dldtddddddddddd dLddd drZdddddrLdrd:dHdVdvdd:dHdd:dHddVd,d,d,d,dddd ddhddddd,ddh0dZ:dhdLdhdL$dL.dhDd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n Cp`QBANCr"n ÈfrRA n0-@ N^.NuNV nCp`QBA"n NCr"nÈfrRA n0N^ _O NNVHptB -Wg +fRHad,?a&(*0HNN.gSn`v ( .fg` effD -g +gSadt=Catd&8.:LDEC=EjDE Eo`D6. .-fDCn6.NJ.gB& nN CvSL`.vS`v: NuJg&(*TBNRBNuN^NuNVH=@=A=|OHN I NANv gv-Jk0aFJng&6.8.D Cl Do nel6.RC ClvaN.f|Ep+8.jp-DD2<Amardar a ra`p/RAdANu6.nRC Ta6.4.k axQSCkb.afQ`R0SCk.RBg0QRBfJ.g |1` n -f U@"HRQ ILN^Nuf S|0NuBnJg>6SCM=CFCNJBoRnvN`vBxTQ=DNuA CovJCnvJgn8$*ҁрҁр҅тҁрz =EBEHE҅zх$4<QB 5e `R :e0Q1RnANup0QB `N^Nu _H?NALTJj 3DNNu"o o  # r< o r `aQB...Nu<am <zn< Nu _?9ByNJyfNu _?9/NJfaRJ)g HipAaaTBiNuJ9g`a"e3@Bi _Nu`N??)/pBaPONu/) ?)Bg?)p?a Nu/) ?)Bg?)p@a Nu"o0Sf NNBQ.Nu"o #o 3oBJ)g3i _ N2)ifNJifDNu/ "i 1"_Nutaf0ae,< bRi`ae< cRi|PgRBN`BNu _"Warfae Ri|?NBgNLtaRfape< gRi|gRB `.NuL/a$f aBeRi< fa2e < fRiNu g3=Nu )g3>Nu2)/ "i "_RA3AifNNutpaf"?@o SBp aQ4`aQNNu4/"oApa _XONL4/a _\NL/A` L/A` t` t`t`t _"_BgJg$aNeg< gg< bRi`RNL/BBYBBBXBNt`4<L faf2N`HaBy23oNgBQ _ N"o)SfN.NuA`A"oapf#o 3iNeig3@ _XONA`A"oa6f,#o 0/?)3@3@N3_"/g A0By _NNLaf 2)a4rN _PON"oa^2)a*/@Nu"oaL 2)a/@Nu$HBHBBBЂNu Ctv BAdAрQ&FNu"oaWD _XNavf*prN/prN/ /rN "NuprNuNV n C@N n"ONHWHo@BgpVNN^ _PONNV n"ONHWpANN^.Nu`Z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Aa*L8LN6H0HNL8zNL8NNuHL8NL8HLaL8N|o:JkJgHB?BBHBA|RF|gA XmnLeJFf Ava`ؼ|fa|A`aL8SEN`|f(&(*LNA.aL8a`Hp??L8WENSWf(H AL@HL8NL8NHL$L8 NL8NAa,L8NO0HB6BHBNu<NA|n|aL8.`DCgA Kd?L8BEHEa6`Nu~ގS1C%cz:@ ɿ6ŭ+pkxIϦՓGɀ =p ѷXe,wa敔M[ϱE9'9,F|dW(_#LDAH~#J9g$-mll$mb*//NڏJ9g+E// Bg?<JNA ataA,J9g m$ (ga"A,##NAa?<`Hz#NuJ9fAa~`a`&9g0Apad09>aFAqaTAxtJgaXHtaBaNuHz?<&NN\ONuxp<0<:m^a"QNuHQO ON OaPONuga`H ?/<NM\OLNuBaF#3.y yB oN`?9?<LNAAH x2| hg"h$#Nup98tg xp4Ug p5Sgp6 xαd y$f y|?/``p7 o`Apa(#Aa#Nu ypa y0</??<NMPONu Runtime error: at offset: ????. Not enough space for heap Accessory errorSystem2 UNI2*</ 9k Ol ~,Br`( 2SYSTEM2NCHAR128]^ ND <PCHAR128 ]D$TEXTREC]FINPFLAG QFOUTFLAG QFHANDLEQFBUFSIZE QFBUFPOSQFBUFENDQpFBUFPTRQ DV FINOUTPROC Qf@^FUSERQ,FNAMEQh @TFBUFFERQhFILEREC]d2FINPFLAG QFOUTFLAG Q|FHANDLEQfFBUFSIZE QNFPRIVATE QJ2 " 6zFUSERQFNAMEQ @TDEVBUF] |t KEYPRESSED 6XREADKEY6:(CLRSCR D6CLREOS DDCLREOL DRINSLINED`DELLINEDnGOTOXY D |ztWHEREX 6\>RWWHEREY 66>RWOMIT 6INCLUDE6SPTR 66.DELAYD b RUNFROMMEMORY6l VALIDREAL6 L>*@ _0||VOBSystem System2SYSTEM2KEYPRESSREADKEYCLRSCRCLREOSCLREOL(INSLINE4DELLINEGOTOXYZOMITfINCLUDE$~DELAYrRUNFROMMWRITECHSREADKEY2|:OUTESC*6DR(`4nNNCONIO@Z$f@rV~*j~GETHZ200CALLDOS2,(,. D*2d dddddd d&dZdrdddh|&h6h|h|&h|:hJh| h.d<dPdZddd hdddd( ddd@dh h&h.*h4hENHNDL \*EACCDN \EIHNDL \ENSMEM \EIMBA\EDRIVE \ENSAME \ENMFIL \ERANGE \EINTRN \xEPLFMT \dEGSBF\RREADONLY \<HIDDEN \(SYSFILE\VOLUMEID \^ DIRECTORY\ARCHIVE\ ANYFILE\?COMSTR ]PATHSTR]PODIRSTR ] \DCNAMESTR]08 EXTSTR ]TC_STR]  v SEARCHREC]rjRESERVED Q vl`ATTR QNTIME Q:SIZE Q&NAME Q ^  .DATETIME ]hT>*YEAR QMONTHQDAYQHOUR QMINQnSECQ \ JDOSERROR Q0 TOSVERSION 6ENVCOUNT 6(ENVSTR 6 6GETENV 6 D GETVERIFYD R SETVERIFYD `\ PARAMCOUNT 6@nPARAMSTR 6 |PACKTIME D UNPACKTIME D FINDFIRSTDrbFINDNEXT D rZSETFATTR D46JGETFATTR D 0GETDIR D ~CHDIRD  MKDIRD  RMDIRD  rDSETFTIME DRTNGETFTIME D$R("FSPLIT D2 0TFEXPAND6 @DISKSIZE 6 NDISKFREE 6 \|GETDATEDjXRLFzSETDATEDx"GETTIMEDSETTIMEDSETDRIVE D RGETDRIVE 6jSUPER6 fNfBEXEC D SWAPVECTORSD:MALLOC 6 fMFREED fMSHRINKDf$]BSystemOSystem2 Dos X.TOSVERSIDENVCOUNTPENVSTR\GETENVGETVERIFSETVERIFPARAMCOUPARAMSTRPACKTIMEUNPACKTIFINDFIRS FINDNEXTSETFATTR"GETFATTR:GETDIRFCHDIRRMKDIR^RMDIRSETFTIMEGETFTIMEdFSPLIT`FEXPANDlDISKSIZExDISKFREEGETDATESETDATEGETTIMESETTIMESETDRIVEGETDRIVESUPEREXECSWAPVECTMALLOCMFREEMSHRINK  V:<:,T$TF` @l Nx,\,jx2B0bHd 44&N(NINE@hRhITZFDELAt WR|@*TO2v0J848BB*DD(P 6\8Dv0vh AR<`2,NAP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?<CNHn?<p n?NHzHnN=_JnoVHnHn?<0.S@?NHn/. ?<NHnHn?.p.?NHn/.?<N`"Hn/. ?<NHz/.?<NN^ _ON .NV/9?<?<NMP/9?<?<NMPN^NuNV/./. /.Bg?<KNA3N^ _O NNqNqNV,/. Hn?<ON/.Hn0?<NB,HnHn0NHn,Hn0Hn0NN^ _PNNV/.?<HNA\O-@ N^.NuNV/.?<INA\ONN^.NuNV/./. Bg?<JNA NN^ _PNCrttem2`$FBSystemOSystem2 Printer(NPRINTER(IBBF*B 4N" ( dld d*l0d8l< dldl ldd4l dNqNqNVHyHz0NHyHy?<NHyBNN^NuPRN: NqNqNV#HyNN^NuNqNqNV#H@#NN^NuBiosterUNI2 jOhNh*phh~ $ R P  D l  F : : >r *   , x nBIOS NDMAREAD6^RRLF@DMAWRITE 6&(R NVMACCESS66RBCONMAP6 fD ESETSHIFT6 R~ EGETSHIFT6l`ESETBANK 6 Ln@ ESETCOLOR6 &| ESETPALETTEDR` EGETPALETTEDRESETGRAY 6  ESETSMEAR6 l`INITMOUS Df:f4.SSBRK6 f PHYSBASE 6fLOGBASE6fGETREZ 6 SETSCREENDff~ SETPALETTE D fVSETCOLOR 6 <$0*FLOPRD 62ffFLOPWR 6@ffFLOPFMT6 N vpjd^XRfLfFMIDIWS D\f"MFPINT DjfIOREC6 fxjKEYTBL 6ffff@X_RANDOM 6*PROTOBTD\VPfJ>FLOPVER62& ffSCRDMP DCURSCONF 6 XSETTIME D XGETTIME 6xBIOSKEYS DIKBDWS Df.(JDISINTD JENABINT D  GIACCESS 6 .RSCONF 6<|vpOFFGIBIT D JJONGIBITD X&DXBTIMERDffDOSOUNDD tf SETPRT 6 KBDVBASE 6fKBRATE 6 pd^PRTBLK D f:VSYNCDSUPEXECD fPUNTAESD GETMPB D fBCONSTAT 6  BCONIN 6 znBCONOUTD JDRWABS6."f SETEXC 6f*fTICKCAL68GETBPB 6 fF@BCOSTAT6 TzMEDIACH6 bbVDRVMAP 6>pKBSHIFT6 ~E_OK \ERROR\"EDRVNR \EUNCMD \E_CRC\$EBADRG \E_SEEK \EMEDIA \|ESECNF \hEPAPER \TEWRITEF\@EREADF \,0EWRPRO \E_CHNG \EUNDEV \`EBADSF \EOTHER \$BSystemOSystem2 Bios d,dDMAREADDMAWRITENVMACCESBCONMAPESETSHIFEGETSHIFESETBANKESETCOLOESETPALEEGETPALEESETGRAYESETSMEAINITMOUS(SSBRK4PHYSBASE@LOGBASELGETREZXSETSCREEdSETPALETpSETCOLOR|FLOPRDFLOPWRFLOPFMTMIDIWSMFPINTIORECKEYTBLX_RANDOMPROTOBTFLOPVERSCRDMP CURSCONFXSETTIME$XGETTIME0BIOSKEYS<IKBDWSHJDISINTTJENABINT`GIACCESSRSCONFlOFFGIBITxONGIBITXBTIMERDOSOUNDSETPRTKBDVBASEKBRATEPRTBLKVSYNCSUPEXECPUNTAESGETMPBBCONSTATBCONINBCONOUT RWABS,SETEXC8TICKCALDGETBPBPBCOSTAT\MEDIACHhDRVMAPtKBSHIFT,(,6,DR`n|""("4@LXd$p$|28@8N@\jx<4((8 $0<HT `.lJxXf(t ,0*8 8DFPT\bhpt~NV?./.?. /.?<*NN-@N^ _O NNV?./.?. /.?<+NN-@N^ _O NNV/.?. ?. ?.?<.NN =@N^ _O NNV?.?<,NNXO-@ N^ _TNNV?.?<PNNXO=@ N^ _TNNV?<QNNTO=@N^NuNV?.?<RNNXO=@ N^ _TNNV?. ?.?<SNN\O=@ N^.NuNV/. ?. ?.?<TNN N^ _PNNV/. ?. ?.?<UNN N^ _PNNV?.?<VNNXO=@ N^ _TNNV?.?<WNNXO=@ N^ _TNNV/./. ?.BgNN N^ _O NNV?.?<NNXO-@ N^ _TNNV?<NNTO-@N^NuNV?<NNTO-@N^NuNV?<NNTO=@N^NuNV?./. /.?<NN N^ _O NNV/.?<NN\ON^.NuNV?. ?.?<NN\O=@ N^.NuNV?.?.?.?.?./. /.?<NN=@N^ _ONNV?.?.?.?.?./. /.?< NN=@N^ _ONNV?./.?.?.?.?.?./. /.?< NN=@ N^ _ONNV/. ?.?< NNPON^ _\NNV/. ?.?< NNPON^ _\NNV?.?<NNXO-@ N^ _TNNV?.?.?.?. ?. ?.?<NN-@N^ _O NNV/./. /.?<NN-@N^ _O NNV?<NNTO-@N^NuNV?.?./. /.?<NNN^ _O NNV?.?.?.?.?./. /.?<NN-@N^ _ONNV?<NNTON^NuNV?. ?.?<NN\O=@ N^.NuNV/.?<NN\ON^.NuNV?<NNTO-@N^NuNV?<NNTON^NuNV/. ?.?<NNPON^ _\NNV?.?<NNXON^ _TNNV?.?<NNXON^ _TNNV?. ?.?<NN\O=@ N^.NuNV?.?<NNXON^ _TNNV?.?<NNXON^ _TNNV/.?. ?. ?.?<NN N^ _O NNV/.?< NN\ON^.NuNV?.?<!NNXO=@ N^ _TNNV?<"NNTO-@N^NuNV?. ?.?<#NN\O=@ N^.NuNV?<$NN\ON^.NuNV?<%NNTON^NuNV/.?<&NN\ON^.NuNV>|'NNTON^NuNV/.BgNM\ON^.NuNV?.?<NMXO?N^ _TNNV?.?<NMXO-@ N^ _TNNV?. ?.?<NM\ON^.NuNV?.?.?./. ?.?<NM-@N^ _O NNV/. ?.?<NMPO-@N^ _\NNV?<NMTO-@N^NuNV?.?<NMXO-@ N^ _TNNV?.?<NMXO-@ N^ _TNNV?.?< NMXO-@ N^ _TNNV?< NMTO-@N^NuNV?.?< NMXO-@ N^ _TN@@$$  P$@@$$  Q$@$ $$   A<#A X`B  $$* 6",   "2 H    Tbp (  L r0,"  "  f 2\Z         p,6h* @&(" l<" fTXPVDF  &2 $8 ,(  BDl& @Fx:jJ  "@  \*2  ^ xn$*L*    & H " *\     ,"&      <  2 &&   $: >,^       t 4@     : 4J     0     0      *TnVl."* rBRH v x    & "",  0   4*$:DF ,  $   &    "       &.   0 * &$    2*$0 2  &&& 2@ $ j&"     0(@ *4l>   $"  $"  Zt r4(2~P$   ,$ ( "   "4 " zd:D.Dh 6(*>   H DfB$" H   0@*@ "@   D  (GEMDECLN CONTROL_MAX\^ INTIN_MAX\H INTOUT_MAX \0 WORKOUT_MAX\8 ADDRIN_MAX \ ADDROUT_MAX\ GLOBAL_MAX \PTS_MAX\ AES_PARAM] ~lh VDI_PARAM]@P D~2, GLOBAL_ARRAY ]~ j CONTROL_ARRAY]   INTIN_ARRAY] xnb INTOUT_ARRAY ]6F :0"$ PTSIN_ARRAY]r "^ PTSOUT_ARRAY ] " ADDRIN_ARRAY ] @fxl ADDROUT_ARRAY],P D@f:. WORKOUT_ARRAY]j 8rVARRAY_2] ARRAY_3] ARRAY_4]j ^THARRAY_5]J2 & 6ARRAY_6]  nARRAY_8] ARRAY_10 ]  |rfARRAY_16 ].N B 8,ARRAY_37 ]h $JTGRECT]$2XQYQWQHQAES_PB QjVDI_PB Q@TCONTROLQ,>INTINQD*INTOUT QL6*PTSINQdrPTSOUT QADDRIN QADDROUTQ,GLOBAL Q(~MIN6 MAX6 x(lfHIPTR6 P6RDfLOPTR6 .DR"BITTEST6 R INTERSECT6` EMPTYRECT6 nMAKEXYXY D|xrMAKEXYWH DLF$BSystemOSystem2 GemDeclGEMDECLMINMAXHIPTRLOPTRBITTESTINTERSECEMPTYRECMAKEXYXYMAKEXYWH*(*6DR(`n0|RR "d(:d(`dddn dddd"d(d.d4d:d@dFdLdRdXd^dddjdpdvd|dddNqNqNV0. no =n `=n N^.NuNqNqNV0. nl =n `=n N^.NuNqNqNV/. H@=@ N^.NuNqNqNV/. =@ N^.NuNqNqNVp2. hHJVD@N^ _\NNqNqNV n C""U n??.N=_U n?(?.N=_U n0 nh?0.n?N=_U n0( nh?0.n?N=_0.n0.nUHnNJWD@A"n""N^ _PNNqNqNV nC""Jn_DJn_D@ N^.NuNqNqNV n C"""n2"n3n0.nS@"n3@0.nS@"n3@N^ _PNNqNqNV n C"""n2"n3n0.nR@"n3@0.nR@"n3@N^ _PNNqNqNVHy,#HyD#Hyd# HyL#$Hy#(Hy,#Hy(#HyD#HyL# Hy#Hy#N^NuGemAESlHBUNI2%ǀ~(6ת8&t((~$@P``p#J $j$FDLhz,"R#JL&#t!tt"J""l !H :!#f"GEMAES NMU_KEYBD \` MU_BUTTON\JMU_M1\8MU_M2\&MU_MESAG \MU_TIMER \ K_RSHIFT \bK_LSHIFT \K_CTRL \K_ALT\ MN_SELECTED\ WM_REDRAW\z WM_TOPPED\d WM_CLOSED\N WM_FULLED\8 WM_ARROWED \ WM_HSLID \ WM_VSLID \WM_SIZED \WM_MOVED \ WM_NEWTOP\AC_OPEN\(AC_CLOSE \)P FMD_START\rFMD_GROW \\ FMD_SHRINK \D FMD_FINISH \,R_TREE \R_OBJECT \ R_TEDINFO\ R_ICONBLK\R_BITBLK \R_STRING \ R_IMAGEDATA\R_OBSPEC \| R_TEPTEXT\f R_TEPTMPLT \N R_TEPVALID \6  R_IBPMASK\ R_IBPDATA\ R_IBPTEXT\ R_BIPDATA\R_FRSTR\R_FRIMG\NAME \CLOSER \FULLER \|MOVER\jINFO \XNSIZER\F UPARROW\2@DNARROW\VSLIDE \ LFARROW\ RTARROW\HSLIDE \ WC_BORDER\WC_WORK\xWF_KIND\WF_NAME\|WF_INFO\h WF_WORKXYWH\PF WF_CURRXYWH\8 WF_PREVXYWH\  WF_FULLXYWH\$ WF_HSLIDE\ WF_VSLIDE\ WF_TOP \ p WF_FIRSTXYWH \ ` WF_NEXTXYWH\ WF_RESVD \ WF_NEWDESK \h WF_HSLSIZE \P WF_VSLSIZE \8V WF_SCREEN\" END_UPDATE \ BEG_UPDATE \ END_MCTRL\ BEG_MCTRL\LARROW\ TEXT_CRSR\BUSYBEE\ HOURGLASS\t POINT_HAND \\ FLAT_HAND\F THIN_CROSS \. THICK_CROSS\ OUTLN_CROSS\lUSER_DEF \DM_OFF\M_ON \G_BOX\G_TEXT \ G_BOXTEXT\G_IMAGE\t G_USERDEF\^G_IBOX \JG_BUTTON \4 G_BOXCHAR\fG_STRING \G_FTEXT\ G_FBOXTEXT \G_ICON \LG_TITLE\ NONE \ SELECTABLE \RDEFAULT\vF_EXIT \bhEDITABLE \LRBUTTON\8LASTOB \$  TOUCHEXIT\@HIDETREE \VINDIRECT \bNORMAL \SELECTED \CROSSED\CHECKED\zDISABLED \zOUTLINED \dSHADOWED \N WHITE\<BLACK\*RED\fGREEN\BLUE \CYAN \TYELLOW \MAGENTA\XLWHITE \LBLACK \ LRED \ LGREEN \n LBLUE\\ LCYAN\J LYELLOW\6hLMAGENTA \ ,EDSTART\ EDINIT \EDCHAR \@EDEND\XTE_LEFT\TE_RIGHT \>TE_CNTR\p BACKSPACE\~TAB\n S_DELETE \XS S_INSERT \BR SHIFT_INS\,R0RETURN \ ENTER\r UNDO \aBHELP \bHOME \G(CUR_UP \HCUR_DOWN \PCUR_LEFT \KN CUR_RIGHT\zM, SHIFT_HOME \bG7SHIFT_CU \LH8zSHIFT_CD \6P2.SHIFT_CL \ K4SHIFT_CR \ M6ESC\CTRL_A \CTRL_B \0CTRL_C \.`CTRL_D \ CTRL_E \CTRL_F \!CTRL_G \n"CTRL_H \Z#CTRL_I \F <CTRL_J \2$ CTRL_K \% CTRL_L \ & &CTRL_M \2 CTRL_N \1tCTRL_O \CTRL_P \CTRL_Q \CTRL_R \CTRL_S \~.CTRL_T \jCTRL_U \V CTRL_V \B/`CTRL_W \.RCTRL_X \-$CTRL_Y \,6CTRL_Z \CTRL_1 \0CTRL_2 \CTRL_3 \CTRL_4 \CTRL_5 \&CTRL_6 \zCTRL_7 \fCTRL_8 \R CTRL_9 \> CTRL_0 \* ALT_A\ALT_B\0ALT_C\.ALT_D\ ALT_E\ALT_F\!ALT_G\" ALT_H\# ALT_I\ALT_J\v$ALT_K\d%ALT_L\R&ALT_M\@2dALT_N\.16ALT_O\~ALT_P\ RALT_Q\ALT_R\4ALT_S\ALT_T\ALT_U\ALT_V\/ALT_W\ALT_X\z-ALT_Y\h,ALT_Z\VALT_1\DxALT_2\2ytALT_3\ zALT_4\{~ALT_5\|ALT_6\}ALT_7\~ALT_8\2ALT_9\@ALT_0\F1 \;F2 \<vF3 \r=F4 \b>F5 \R?F6 \B@dF7 \2AF8 \"B F9 \CF10\DSHIFT_F1 \TSHIFT_F2 \USHIFT_F3 \VSHIFT_F4 \WSHIFT_F5 \XSHIFT_F6 \~YSHIFT_F7 \hZSHIFT_F8 \R[SHIFT_F9 \<\ SHIFT_F10\&]CTRL_AE\(CTRL_OE\'CTRL_UE\ALT_AE \(]ALT_OE \'[pALT_UE \@, SH_ALT_AE\(} SH_ALT_OE\'{f SH_ALT_UE\l\bGEMERROR 6P APPL_INIT60( APPL_FIND6 6R APPL_TRECORD 6DR APPL_READDRR APPL_WRITE D`ztRnn APPL_TPLAY DnRF@: APPL_EXITD|L EVNT_KEYBD 6 EVNT_DCLICK6  EVNT_MESAG D R EVNT_TIMER D zt EVNT_MULTI 6DXLF@:4.(" R EVNT_BUTTON6| EVNT_MOUSE D" TNHB<60*$MENU_BAR Df MENU_ICHECKDfT MENU_IENABLE DfN MENU_TNORMAL Dfd^X MENU_TEXTD$f2,R& MENU_REGISTER62ROBJC_ADD D@f6 OBJC_DELETEDNf OBJC_DRAWD\fpjd^XRL OBJC_FIND62jf&  OBJC_OFFSETDxf OBJC_ORDER Df OBJC_EDITDfztnhb\ OBJC_CHANGED f4.(" 0FORM_DO6f FORM_ALERT 6R FORM_ERROR 6 F FORM_CENTERDf\VPJD FORM_DIALD   GRAF_MOUSE DfR GRAF_MKSTATE D GRAF_RUBBOXD\VPJD> GRAF_DRAGBOX D  2 GRAF_MOVEBOX D. GRAF_GROWBOX D<lf`ZTNHBhGRAF_SHRINKBOX DJ p GRAF_WATCHBOX6Xf GRAF_SLIDEBOX6ffzt GRAF_HANDLE6XtLF@: SCRP_READD R SCRP_WRITE D R. FSEL_INPUT DRR߾߸~ FSEL_EXINPUT DRߎR߈߂R|B WIND_CLOSE D TF WIND_DELETED , WIND_FIND6 | WIND_UPDATED WIND_NEW Dz WIND_OPENDޒތކހz WIND_CREATE6^RLF@:WIND_GET DVWIND_SET D*ݾݸݲ WIND_CALCD$8 ݌݆݀ztnhb\V^ RSRC_LOADD FR0H RSRC_FREEDT RSRC_GADDR DbR` RSRC_SADDR DpܴܮfܨF RSRC_OBFIX D~܀fz SHEL_READDRTRNSHEL_GET DR("SHEL_PUT DR SHEL_FINDD R SHEL_ENVRN DfۨRۢ SHEL_WRITE DztnRhRb0&BSystemOSystem2GEMDECL GemAESLNGEMERRORAPPL_INI*APPL_FINBAPPL_TREAPPL_REAAPPL_WRI6APPL_TPLNAPPL_EXIZEVNT_KEYEVNT_DCL~EVNT_MESEVNT_TIMEVNT_MULfEVNT_BUTrEVNT_MOUMENU_BARMENU_ICHMENU_IENMENU_TNOMENU_TEXMENU_REGOBJC_ADDOBJC_DELOBJC_DRAOBJC_FIN&OBJC_OFF2OBJC_ORD>OBJC_EDIJOBJC_CHAVFORM_DOnFORM_ALEzFORM_ERRFORM_CENbFORM_DIAGRAF_MOUGRAF_MKSGRAF_RUBGRAF_DRAGRAF_MOVGRAF_GROGRAF_SHRGRAF_WATGRAF_SLIGRAF_HAN SCRP_REASCRP_WRI"FSEL_INP.FSEL_EXIRWIND_CLO^WIND_DELWIND_FINWIND_UPDWIND_NEWFWIND_OPE:WIND_CREjWIND_GETvWIND_SETWIND_CALRSRC_LOARSRC_FRERSRC_GADRSRC_SADRSRC_OBFSHEL_REASHEL_GETSHEL_PUTSHEL_FIN*SHEL_ENVSHEL_WRICALLAES6 (2RB`*B666nBBDNB|Z f( rp6~x<. 4<8@@@$D2B@@N8\b0j&Z*x2N>@J\*Vr<b@np<zB6X$\* |B.X*<h6Jh6XR$fJtV$8 N. ". .F:PFX*RP$^. j. v`**X*<. 8BF. T bBp@~8:V$::*. :h h hdh"h(h hhh6d hhh6dh$d*h hhh6d hh.d4hddh hhh2d8hDhNhXhbh hhh$h,hBdLhVh`hjhh$d hh*d hhh$h,h4h<hDhLhTh\hdhlhth~hhhdhhhhhhh hh*d0h hh,d hhh4d hhh4d hhh4d hhh6d hh.d4h hhh4d hh,d hhh$h,h4h<h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MPLE \MFDB ]MPTR Qf FORMWIDTHQ| FORMHEIGHT Qb WIDTHWORDQJ FORMATFLAG Q 0 MEMPLANESQ RES1 QRES2 QRES3 QSTRING80 ]RP STRING125]~}V_CLSWKD ZV_CLSVWK D (4V_CLRWKD 6V_UPDWKD DVST_UNLOAD_FONTS D RVS_CLIPD` VST_LOAD_FONTS 6 hn\VnV_OPNWKD|*,jV_OPNVWK DjPV_PLINEDr V_PMARKERDrV_GTEXTDnhbP V_FILLAREA D4.r  V_CONTOURFILLDVR_RECFL D V_CELLARRAYDzlV_BARDRD$V_ARCD*$  V_PIESLICE DV_CIRCLE D$ V_ELLIPSED2hb\VPV_RBOX D@,V_RFBOXDN(V_ELLARC D\V_ELLPIE Djztnh V_JUSTIFIEDDx@:4"(" VSWR_MODED VS_COLOR D`VSL_TYPE D  VSL_UDSTYD lf0 VSL_COLORD @:*VSL_ENDS DVSM_TYPE D  VSM_COLORD  VST_ROTATION D VST_FONT D ZT. VST_COLORD .( VST_EFFECTSD   VSF_INTERIOR D . VSF_STYLED < VSF_COLORD Jxrx VSF_PERIMETERD XHB VSF_UDPATDfRVR_TRNFM Dt V_GET_PIXELD VSM_HEIGHT D vp VSL_WIDTHD JD VST_HEIGHT D  VST_POINTDH VST_ALIGNMENTD~xx VRO_CPYFMDRL>4. VRT_CPYFMD VSIN_MODED VRQ_CHOICE DVSC_FORM Djh\V_SHOW_C D >8V_HIDE_C D *VVQ_KEY_S D8VQ_MOUSE DFt VSM_CHOICE 6T VRQ_VALUATOR DbVPJD VRQ_LOCATORDp  VSM_LOCATOR6~( VSM_VALUATOR D|v VRQ_STRING DNHB4*L VSM_STRING 6VEX_TIMV DffzVEX_BUTV Dff(VEX_MOTV Dff`fZdVEX_CURV D4f.f( VQ_EXTENDDj8VQL_ATTRIBUTES DLVQM_ATTRIBUTES D JjVQF_ATTRIBUTES DfJXVQT_ATTRIBUTES D&4&VQ_COLOR 64D VQT_EXTENT DB VQT_WIDTH6PVQT_NAME 6j^^XF@ VQ_CELLARRAY D l( 6: VQIN_MODEDz VQT_FONTINFO D| VQ_CHCELLS D\VP V_EXIT_CUR D (\ V_ENTER_CURD V_CURUPD  V_CURDOWND V V_CURRIGHT D  V_CURLEFTD hx V_CURHOMED BV_EEOS D V_EEOL D  VS_CURADDRESSD" V_CURTEXTD0V_RVON D >tLV_RVOFFD LP VQ_CURADDRESSDZ&  V_HARDCOPY D h.V_DSPCUR DvV_RMCURD J V_FORM_ADV D tV_OUTPUT_WINDOWDH:V_CLEAR_DISP_LISTD  VQP_FILMSDVSP_SAVE D n VSP_MESSAGED HV_META_EXTENTS Dnhb\Vj VM_FILENAMED. VQ_TABSTATUS 6  VS_PALETTE 6 H VQP_ERROR6 6 VQP_STATED",~xrlf.X VSP_STATED::4.(". V_WRITE_META DHr V_BIT_IMAGEDV00BSystemOSystem2GEMDECL GemVDIr h V_CLSWK$V_CLSVWK0V_CLRWK<V_UPDWKTVST_UNLO`VS_CLIPHVST_LOADV_OPNWKV_OPNVWKlV_PLINExV_PMARKEV_GTEXTV_FILLARV_CONTOUVR_RECFLV_CELLARV_BARV_ARCV_PIESLIV_CIRCLEV_ELLIPSV_RBOX V_RFBOXV_ELLARCV_ELLPIE,V_JUSTIF8VSWR_MODDVS_COLORPVSL_TYPE\VSL_UDSTtVSL_COLOVSL_ENDSVSM_TYPEVSM_COLOVST_ROTAVST_FONTVST_COLOVST_EFFE VSF_INTE VSF_STYL VSF_COLO (VSF_PERI 4VSF_UDPA XVR_TRNFM dV_GET_PIVSM_HEIGhVSL_WIDTVST_HEIGVST_POINVST_ALIG @VRO_CPYF LVRT_CPYF pVSIN_MOD VRQ_CHOI VSC_FORM V_SHOW_C V_HIDE_C $VQ_KEY_S 0VQ_MOUSE VSM_CHOI VRQ_VALU |VRQ_LOCA VSM_LOCA VSM_VALU VRQ_STRI VSM_STRI <VEX_TIMV VEX_BUTV VEX_MOTV VEX_CURV HVQ_EXTEN `VQL_ATTR lVQM_ATTR xVQF_ATTR VQT_ATTR TVQ_COLOR VQT_EXTE VQT_WIDT VQT_NAME VQ_CELLA VQIN_MOD VQT_FONT VQ_CHCEL V_EXIT_C V_ENTER_ V_CURUP V_CURDOW V_CURRIG V_CURLEF ,V_CURHOM 8V_EEOS DV_EEOL PVS_CURAD \V_CURTEX hV_RVON tV_RVOFF VQ_CURAD V_HARDCO V_DSPCUR V_RMCUR V_FORM_A V_OUTPUT V_CLEAR_ VQP_FILM VSP_SAVE (VSP_MESS @V_META_E XVM_FILEN VQ_TABST VS_PALET 4VQP_ERRO VQP_STAT VSP_STAT LV_WRITE_ V_BIT_IMrGEMVDIPd*GEMVDIF~2GENSET:GENSETP4RETCONTR$ GENESCAP0| **$*(0*6<*DH*nT8R`2`lvxrr*z|<F$lt`6`6$T0\h<jh<2V0@ tN,tx8HD PV*\ h t8 < H* d6^0      P$.  <  J ( X 4 f @J LN XZt dtB pP$ |<p Z*~ l6b H R$ <T : < B @ ^0 2* * ^0 $^08 02F <H Hf0 T$4 `$ lv x$ j& B $P Z*^ 6l 6z < H F      , 8 D P" \D$0 h$> tL Z 4 & h v D$   t V 6 @ 6, *: B ( 4 @&  LV0H X^$$ hhh hhh&h hhh*d~ hhh(dd hh hhh&ddh,h4hDddNhxhh hhddh"h,hDddNhxhh hhdd hhdd hhdd hhh*d~ hhh(dd hhhJhjdd hhFhfdd hhFhfddp|h*h2h:hrhdd hhNhndd hh"h*h2h:hDhNpXhndd hhh$h,h:dd hh@h`dd hhhHhhdd hhh$h,h4h<hDhRdd hhh$h,h4h<hDhRdd hhh"h*h2h:hHdd hhh$h,h4h<hDhLhZdd hhh$h,h4h<hDhLhZdd hhh"h*h2h:hHdd hhhHhhdd hhhHhhddp|h,h4hlhhhhhhhddd hhh$h0h<hJdddd hhh h.ddd hhh"h0ddd hhh"h(h0h>ddd hhh h.dd8hBhLhVh hhh(dd2h<hFhPhdddd hhh"h2d~Bhdddd hh h0p>dd hh h6&h2hD8hDh6JhVhD\hdhhdd hh h6&h2hD8hDh6J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.323d6p.rAm<=A=@`Rn0.S@H2.tA0CD30.nf?<?. NN^ _\NGraphIlrUNI2 bU&m< )9.  f ) ) b ~ G>U~V\ pxL> ,z H<FHJ\x D* V N \t*$,j .6 GRAPHN GRAPHVERSION \*^?GROK \F GRNOINITGRAPH\, GRNOTDETECTED\GRFILENOTFOUND \GRINVALIDDRIVER\ GRNOLOADMEM\j GRNOSCANMEM\ GRNOFLOODMEM \GRFONTNOTFOUND \t GRNOFONTMEM\\ GRINVALIDMODE\BGRERROR\. GRIOERROR\ GRINVALIDFONT\GRINVALIDFONTNUM \DETECT \CGA\MCGA \EGA\lEGA64\\EGAMONO\tIBM8514\`HERCMONO \JLATT400 \6VGA\& PC3270 \ STCOLOR\ STMONO \ .STLOW\STMEDIUM \NSTHIGH \CGAC0\CGAC1\CGAC2\xCGAC3\fCGAHI\TMCGAC0 \@MCGAC1 \,MCGAC2 \LMCGAC3 \MCGAMED\|MCGAHI \EGALO\EGAHI\EGA64LO\EGA64HI\ EGAMONOHI\z HERCMONOHI \bATT400C0 \LATT400C1 \6\ATT400C2 \ ATT400C3 \ ` ATT400MED\ATT400HI \VGALO\VGAMED \VGAHI\DPC3270HI \ IBM8514LO\z IBM8514HI\dRBLACK\RBLUE \@GREEN\.*CYAN \RED\ MAGENTA\BROWN\l LIGHTGRAY\DARKGRAY \T LIGHTBLUE\ LIGHTGREEN \ LIGHTCYAN\v LIGHTRED \`  LIGHTMAGENTA \F YELLOW \2WHITE\ :EGABLACK \ >EGABLUE\EGAGREEN \EGACYAN\EGARED \ EGAMAGENTA \EGABROWN \J EGALIGHTGRAY \p EGADARKGRAY\X8 EGALIGHTBLUE \>9 EGALIGHTGREEN\$: EGALIGHTCYAN \ ; EGALIGHTRED\<EGALIGHTMAGENTA\= EGAYELLOW\>EGAWHITE \?SOLIDLN\PDOTTEDLN \ CENTERLN \jDASHEDLN \T USERBITLN\>L NORMWIDTH\( THICKWIDTH \0 DEFAULTFONT\ TRIPLEXFONT\ SMALLFONT\ SANSSERIFFONT\ GOTHICFONT \HORIZDIR \VERTDIR\n USERCHARSIZE \TLEFTTEXT \> CENTERTEXT \& RIGHTTEXT\ BOTTOMTEXT \TOPTEXT\\CLIPON \CLIPOFF\FTOPON\TOPOFF \ EMPTYFILL\ SOLIDFILL\j>LINEFILL \T LTSLASHFILL\< SLASHFILL\& BKSLASHFILL\ LTBKSLASHFILL\4 HATCHFILL\ XHATCHFILL \INTERLEAVEFILL \ WIDEDOTFILL\ 6 CLOSEDOTFILL \x USERFILL \b NORMALPUT\LCOPYPUT\8XORPUT \$ORPUT\ANDPUT \NOTPUT \ MAXCOLORS\ PALETTETYPE] $SIZE QCOLORS Q l tj J :LINESETTINGSTYPE ] 0 LINESTYLEQDPATTERNQD THICKNESSQD R~TEXTSETTINGSTYPE ]F^FFONT QD DIRECTIONQD~CHARSIZE QDfHORIZQDRVERT QD> $FILLSETTINGSTYPE ]PATTERNQDCOLORQDt:FILLPATTERNTYPE] r POINTTYPE]8ZXQ\YQL&F VIEWPORTTYPE ]P<X1 QY1 QX2 QY2 QCLIP Q b ARCCOORDSTYPE]pvh<NXQxYQhXSTART QRYSTART Q<XEND Q(YEND Q  RESTORECRTMODE D GETARCCOORDS D (p SETVISUALPAGED 6D SETACTIVEPAGED DD^ SETWRITEMODE D R4 GRAPHDEFAULTSD` SETBKCOLOR D nD GETBKCOLOR 6D|^ SETALLPALETTED R GETPALETTE D  $X~ SETPALETTE D LFGETPALETTESIZE 6&GETDEFAULTPALETTED  $ SETRGBPALETTEDSETCOLOR D D"GETCOLOR 6DvL GETMAXCOLOR6DTOUTTEXTD * OUTTEXTXYD TEXTHEIGHT 6 D$ TEXTWIDTH6 D2SETTEXTJUSTIFY D @D~Dx* SETTEXTSTYLE DNDNDHDB|GETTEXTSETTINGSD \F CLEARVIEWPORTDj SETVIEWPORTDx~GETVIEWSETTINGSD jGETX 6pGETY 6TXMOVETO D *$MOVERELD & DETECTGRAPHD INITGRAPHD$ CLOSEGRAPH D GRAPHERRORMSG6 ZN| GRAPHRESULT62GETMAXX6FGETMAXY6 GETMAXMODE 6. GETGRAPHMODE 6< GETDRIVERNAME6JR GETMODENAME6 jX^ GETMODERANGE Df4.( SETGRAPHMODE D t2SETASPECTRATIO D DD"GETASPECTRATIO DDD. CLEARDEVICED FLOODFILLDRLDFSETFILLPATTERN DD SETFILLSTYLE D DDGETFILLPATTERN D GETFILLSETTINGSD p IMAGESIZE6rf`ZTGETIMAGE D.("RPUTIMAGE DRDLINE DXLINETO D *LINERELD 8\V SETLINESTYLE DFD,D&D jGETLINESETTINGSD T PUTPIXEL DbDGETPIXEL 6 DpBARD~vpjd"BAR3DDB<60D*$ FILLELLIPSEDDDDRAWPOLY DDRxFILLPOLY DDRnARCDrlDfD`DZ$CIRCLE D60D*PIESLICE DDDDR RECTANGLEDPELLIPSEDDD~DxDrFSECTOR D NHDBD<D6D0 HALFX6,HALFY6&` BSystemOSystem2STPASCALGEMDECL&GEMAES 0GEMVDIBBIOS Graph4 GRAPH RESTOREC GETARCCORSETVISUAFSETACTIV SETWRITEGRAPHDEFSETBKCOLGETBKCOL"SETALLPA.GETPALET:SETPALET GETPALETGETDEFAUFSETRGBPASETCOLORGETCOLORGETMAXCOOUTTEXTOUTTEXTXvTEXTHEIGTEXTWIDTSETTEXTJSETTEXTSGETTEXTS VCLEARVIE >SETVIEWP JGETVIEWShGETXtGETYPMOVETO\MOVERELDETECTGR,INITGRAP CLOSEGRA GRAPHERR bGRAPHRES nGETMAXX zGETMAXYGETMAXMOGETGRAPH GETDRIVE GETMODENGETMODER &SETGRAPHSETASPEC~GETASPEC 2CLEARDEVfFLOODFILSETFILLPSETFILLSGETFILLPGETFILLSRIMAGESIZ^GETIMAGEjPUTIMAGELINELINETOLINERELSETLINESGETLINESPUTPIXELGETPIXELBBARZBAR3D*FILLELLIDRAWPOLYFILLPOLYARCNCIRCLEPIESLICErRECTANGLELLIPSE6SECTOR4HALFX@HALFY@ &Z ZARLt6tE_REf*EE_R: GET_@GE l0 n OU**_MOUDDNE_C6P \4h:$t((EST _DISP NU_H*l0  n | $"f.:\ F*R0^*jbNv|N$B2BBv*N@*\*T*L*8\FZT(lLr*B6< BB~Nd0ZZfpHrH$~T*2pL$bNX`<Bgp$PNN$ . *:2f:D,FZDRt$6l*l^xZZF>`t<~fd.,<  J fX ` &*t 2p* >2*x JH V*j bzN n  z   $  l( ~R 8 @ d d .|d&t,4 dl d&dF dJdfd|"d,|6d@|JdT|^dh|rd||d|d|d|d|d|d|dd |d|"d,|6d@|JdT|^dh|rd||d|d|d|d|d|d|d|d|&d0| ddddd$d*d d6dd d*d0d d6dd d d6dd d4h$:d*d8h$d6dRdrdddddd,dJdjddddddd$lVdldrdhdddddd"d d6d0d6dDlJdXl^d d6dd d6ddd d6dd d d6dDdd.d~ddd:d d62dDdRl`djdvd d6rdddddld d6$df>dfndxD(d d6$df>dfddddd8dNlTd d6(4xNddddNdhlnd|d6$d.d6l<dJlB^dhdrlxd|d6$d.d6l<dJlB^dhdrlxd|d6*dRd2~d2d2dddld|d&d0d6d`d2jd d64dbdrddl dl dl dl dl d$(*d0d6d<lHdZd`d~l d6Rd^djddld d6d d d6d"d0d>dHdNdTl\pfdtlzdld dd"d,d2d<dBd dd>dHdRd d6Vd\dldzlddd(d2l8dBldld d6dd d6d&,d:Pbrddddd((l\dd d6*dL0d:dFd\dlrd((ljdd(&d<d d68d>dDdNdZdz((l\dd d6d"d,dJl2PdVdzl\dd d6dd&dF(V(^ljdd(dd d6d"d0d>dHdRlXd d6dd d,dBdRXdf|l\dd 2B`dfzdfd~ddd,dBdXd d6dd&d6l<d d6d"d0dJdldrdxlpdldld d6dd d6d"d(d d6dd&d6lBd dd4dBd d6 d8|ddddlpdld0l6d@lLdd6dd*dPdjdxldd d4d>PdVdbd8dd6ddlfd lJdl.(d4d:dFd d6dd d6d$d hdd&d.d 4d^tdddRdddd dd"d(d6d>d DdNTdbdjd pddDd6 d6(dLdVh\dhd d6(dHdVhbdhdtd d^&x@<x@Rx@ d^&x@<x@Rx@B|HdVd^hr|xddx"d:dDdNdZhfp(ptddlddh0dxBdRdpdxddddldddddlXdd dd6dD"dR(d.d`4ddd "dx(d2d@dFLdRd`dNld@ dhrdVd d6ddf d6dd d6d*|H|Nd d6d"d2`@NZd fdvdd|d*d<|Nd^`l~|d d6ddfDdNdTdbd dl6dd d$d*d d6Bdbdjdrdzddddl`d d6d d d"d,d|2d8dBlXd^dbdhdldrd dd d6dd d6dd |6h ddd,$d*d0d6l(<p|JhTd^dldx~ddhdh~ d6d:L^p$6Fbtdd,d dd&dNqNqNVUN0H=@N^NuNqNqNVUN0H=@N^NuNqNqNVp n 0=@p n0"n 2p0."n2N^ _PNNqNqNV n =P n"n 2"n2N^ _PNNqNqNV0.H/BgHn?<NHn/. ?<NN^ _TNNqNqNVHn?.NXHyHnBgNNBgNN^ _TNNqNqNV?9BgNN^NuNVHGp0?p0+?p0+?N&_N^NuNVHGp0.6p0.7@p0.7@p0. 7@0+klHkHkNp0. 7@p0.7@ &_N^ _O NNqNqNVHzHy"?<NHzHy,?<NHzHy6?<NHzHy@?<NHzHyJ?<NHzHyT?<NHzHy^?<NHzHyh?<NHzHyr?<NHzHy|?<NHzHy?<NHzHy?<NHy,Hy?<NN^Nu   @  p8 Hy?<*NHzLHy?<*NHzTHyf?<*NHz^Hy:?<*NHz`Hy?<*NHzlHy?<*NHzHy?<*NHzHy?<*NHzHy^?<*NHzHy2?<*NN^NuNo error Graph not initialized. Graphics hardware not detected.Device driver not found. Invalid device driver. !Not enough memory to load driver.Out of memory in scan fill.Out of memory in flood fill. Font file not found. Not enough memory to load font.*Invalid graphics mode for selected driver. Graphics error.Graphics I/O error.Invalid font file. Invalid font number. NqNqNVJ9 f ?=@=A`Rn0.HU?=@=A`Rn?9?.0.AHpN0.nfpr@m.=@=A`Rn0.2.C0.nfAC""""UN0 @f8pr@m*=@=A`Rn?.?.N0.nf`b @f:BgBgN?<?<N?<?<N?<?<N`" @fBgBgN?<?<NN^NuNVHNp0.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N^NuNqNqNV y$f y&f4/9./9*YBgBgUNUNN ?NHy.YBgBgUNUNN /NBgNBgNN^NuNqNqNVNp0. _Dr2.IA*JVDg,?h/:(/1p7B302<5;=f4,(<15.*)6;78$<>1n8z,(t>6=/=969;8!6L8(.=35$0*d; 811d7nSTPASCAL N LONG_MAXINT\\ SCREEN_DEVICE\BPRINTER_DEVICE \& MAX_C_STRING \ MAX_FN \ MAX_PATH \PALFA ]    SHORT_INTEGER] LONG_INTEGER ]|C_STRING ]BN V B8 STRING_PTR ]jB FILE_NAME] PATH_NAME]RP SHORT_ROUND6  SHORT_TRUNC6 x(l LONG_ROUND 6 P6D LONG_TRUNC 6 (DINT6 RCTOPSTRD`BPTOCSTRDnBST_SHL 6|~ST_SHR 6fZTPWROFTEN 6 *:.BASEPAGE D fCMD_ARGS 6 CMD_GETARG DOPTION 6 FILENAME 6 |pKEYPRESS 6V IO_RESULT66PEEK 6 WPEEK6 0LPEEK6 $POKE D2WPOKED@zLPOKEDNXRMOVE_B D\.("zMOVE_W DjMOVE_L DxCLOCK6SETDATED|vSETTIMEDRLF8GETDATED"GETTIMEDCUR_ON DCUR_OFFDCUR_UP DCUR_DOWN D CUR_RIGHTD`CUR_LEFT D CUR_UP_SCROLLD "CUR_DOWN_SCROLLD.CUR_HOME D< CLEAR_HOME DJp SAVE_CURSORDXRESTORE_CURSOR Df SELECT_COLOR D t.SELECT_BACKGROUNDD INV_ON DINV_OFFD DELETE_LINED CLEAR_LINE D< INSERT_LINED START_OF_LINED END_OF_LINEDP END_OF_SCREENDSTART_OF_SCREEND WRAP_ONDdWRAP_OFF DINSUPER6x*SUPERD 8PnSCRLEN_B \<}SCRLEN_W \&>BSCRLEN_L \@ERR_CODE ]SCREEN_B ] |} rSCREEN_I ] >} pSCREEN_L ] $X ?`}V 6 PTR_SCREEN ] L $PALETTE]  p| RESOLUTION ] SCREEN_TYPE] *RESQPALQ zPICQ" $h}" ^8 GET_SCREEN D F . PUT_SCREEN D T  READ_SCREEN6b WRITE_SCREEN 6p NO_PORT\ROOT \l NULL_INDEX \|bMAX_LEN\hQ MAX_DEPTH\RMAX_TREE \<d NO_WINDOW\& MAX_WTITLE \PR_TREE \TR_STRING \ E_KEYBOARD \E_BUTTON \E_MOUSE1 \E_MOUSE2 \ E_MESSAGE\tE_TIMER\` REPLACE_MODE \F TRANS_MODE \.XOR_MODE \(REV_TRANS_MODE \PAT1 \jPAT2 \PAT3 \RPAT4 \PAT5 \PAT6 \PAT7 \~PAT8 \l PAT9 \Z PAT10\H PAT11\6 PAT12\$ PAT13\PAT14\PAT15\PAT16\HPAT17\PAT18\PAT19\^PAT20\^PAT21\^PAT22\p^PAT23\^^PAT24\LbHATCH1 \8`HATCH2 \$^HATCH3 \\HATCH4 \ZHATCH5 \XHATCH6 \VHATCH7 \ THATCH8 \!HATCH9 \"HATCH10\#HATCH11\p$HATCH12\\%SOLID\JnLONGDASH \4DOTTED \ &DASHDOT\ DASHED \T DASHDOTDOT \\NORMAL \n THICKENED\z LIGHTENED\0SLANTED\ UNDERLINED \tOUTLINED \^pSHADOWED \H $ SYSTEM_FONT\0 SMALL_FONT \`G_BOX\BG_TEXT \< G_BOXTEXT\DG_IMAGE\ G_PROGDEF\G_IBOX \G_BUTTON \ G_BOXCHAR\rDG_STRING \\6G_FTEXT\Hf G_FBOXTEXT \0fG_ICON \zG_TITLE\ VNONE \ SELECTABLE \DEFAULT\XEXIT_BTN \EDITABLE \ RADIO_BTN\ LAST_OB\t TOUCH_EXIT \\@ HIDE_TREE\FPINDIRECT \0SELECTED \CROSSED\CHECKED\DISABLED \G_NAME \G_CLOSE\hG_FULL \G_MOVE \rG_INFO \xG_SIZE \d  G_UPARROW\N@ G_DNARROW\82G_VSLIDE \"XG_LARROW \ G_RARROW \VG_HSLIDE \G_ALL\nWHITE\BLACK\RED\GREEN\BLUE \vCYAN \dTYELLOW \PMAGENTA\<L_WHITE\(LL_BLACK\ L_RED\ :L_GREEN\ L_BLUE \ L_CYAN \ L_YELLOW \ L_MAGENTA\ MN_SELECTED\ WM_REDRAW\l WM_TOPPED\V WM_CLOSED\@ WM_FULLED\*< WM_ARROWED \BWM_HSLID \WM_VSLID \WM_SIZED \WM_MOVED \ WF_PREVXYWH\L WF_FULLXYWH\ WF_HSLIDE\t WF_VSLIDE\^ & WF_HSLSIZE \F WF_VSLSIZE \.AC_OPEN\(AC_CLOSE \) COLOR_REG]  DRAW_MODES ] B LINE_TYPES ] R PAINT_TYPES]Z %b GEM_DEVICE ]62 :*INQ_TYPE ]\ \^ OPEN_VALS\\EXT_VALS \\ MOUSE_TYPE ] M_ARROW\ M_TEXT_CURS\|M_BEE\j M_POINT_HAND \P M_FLAT_HAND\8 M_THIN_CROSS \\ M_THICK_CROSS\` M_OUTLN_CROSS\PTEXT_PTR ]XWORD16 ]   MOUSE_FORM ]tv*HOT_XQrHOT_YQ^RESQL MASK_COLOR Q2 DATA_COLOR QMASK Q DATA Q*J WINDOW_TITLE ]RPMESSAGE_BUFFER ]~  |\L CTRL_PARMS ]:B  J@&  INT_IN_PARMS ]x   d INT_OUT_PARMS] -\ PTS_IN_PARMS ]  ft PTS_OUT_PARMS]2J  RH( ADDR_IN_PARMS]p f \ADDR_OUT_PARMS ] fPOINT]XQYQb RECTANGLE]lF$2XQHYQ8WQ(HQ" STR30] STR255 ]TE_JUST] ~*TE_LEFT\nZTE_RIGHT \X TE_CENTER\B TREE_RANGE ] >* d2: TREE_INDEX ] f d *OB_TYPE]  ` TEXT_ED_INFO ]!ߴdTE_PTEXT Qjߒ TE_PTMPLTQjz TE_PVALIDQjbTE_FONTQ hTE_JUNK1 QPTE_JUSTQ:TE_COLOR Q"TE_JUNK2 Q TE_THICKNESS Q TE_TXTLENQ TE_TMPLENQ޾ ޘTED_PTR]!~!t SPEC_INFO]"zX0R>THICKQVCOLORQBINFO Q!PTRQSTRQj"OBJECT ]#OB_NEXTQOB_HEADQݰOB_TAILQݚOB_TYPEQ݄OB_FLAGS QlOB_STATE Q TxOB_SPECQ "z"OB_X Q*OB_Y Q|OB_W QOB_H Q"TREE ]#ܰ x#ܦ >ܢTREE_PTR ]#܊#܀*MENU_PTR ]#dJ DIALOG_PTR ]#P ICON_BLOCK ]%<|"8IB_PMASK Q6IB_PDATA QIB_PTEXT QIB_CHARQ IB_XCHAR QIB_YCHAR QIB_XICON QۨIB_YICON QېBIB_WICON QxIB_HICON Q`IB_XTEXT QHIB_YTEXT Q0IB_WTEXT QIB_HTEXT Q "$, BIT_BLOCK]&4ھnDVBI_PDATA QڸBI_WBQڤBI_HLQڐBI_X Q|BI_Y Q hBI_COLOR Q P%*.USER_BLK ]&UB_CODEQ UB_PARMQ&ZPARM_BLK ]'ٲPB_TREEQٮPB_OBJ Q٘ PB_PREVSTATE Q| PB_CURRSTATE Q`PB_X Q LPB_Y Q 8PB_W Q$PB_H QxPB_XCQPB_YCQPB_WCQPB_HCQPB_PARMQت&؄ ADD_DITEM6 fb~ #Vlf`ZTNHB ADD_MITEM6(# f ADD_MTITLE 6#lAES_CALL D׼xךהp׎׈ AES_VERSION6׈ BEGIN_MOUSED BEGIN_UPDATE D BORDER_RECTDBRING_TO_FRONT D  CENTER_DIALOGD #֊4 CLEAR_SCREEN D h CLOSE_WINDOW D X8 DELETE_DIALOGD &# DELETE_MENUD 4#( DELETE_WINDOWD BDO_ALERT 6P՚հ DO_DIALOG6Ֆ^#nՄHDRAGBOXD l `ZTNHB<60*ܞ DRAW_MENUD z# DRAW_MODED . DRAW_STRINGDԶ԰ԎhD_COLOR6ԒԆԀztn END_DIALOG D #*x END_MOUSED END_UPDATE D^ ERASE_MENU D #EXIT_GEM D4 FIND_ALERT DӔr FIND_DIALOGDf#D FIND_MENUD:# FIND_RESOURCE6 #"  FIND_WINDOW6 0 FIRST_RECT D>ҮҨҢҜҖ FRAME_ARCDLpjd^XR FRAME_OVAL DZ*$\ FRAME_RECT DhFRAME_ROUND_RECT DvѰѪѤў0 FREE_RESOURCED FRONT_WINDOW 6\t GET_DEDITD# f GET_EVENT6D мжаЪЈОИВЌІЀGET_EX_IN_FILE 6`82, GET_IN_FILE6,> GET_OUT_FILE 6 GET_WINDOW 6FGROWBOXDϤϞϘϒόφπzV HIDE_MOUSE DINIT_GEM 6> INIT_MOUSE D\JUSTIFIED_TEXT D,ΰ LINE_COLOR D :Έ LINE_ENDSTYLED Hztx LINE_STYLE D V0LINE_TOD d(" LINE_WIDTH D r LOAD_RESOURCE6 ʹ& MENU_CHECK D#͌ f͆͜ MENU_DISABLE D#V fP MENU_ENABLED#( f"& MENU_HILIGHT D# f MENU_NORMALD# f MENU_REGISTER6̶̔ MENU_TEXTD#n fhbMOVEBOXDZTNHB<MOVE_TOD  NEW_DIALOG 6# NEW_MENU 6#˜ˬˊ NEW_WINDOW 6ˊ(~\rlf` NEXT_RECTD6:4.("OBJ_DRAW DD# f f4OBJ_FIND 6ʾR#ʖʬʦʠʚ6 OBJ_FLAGS6ʀ`#X fR OBJ_OFFSET Dn#*@:4 OBJ_REDRAW D|# fܪ OBJ_SETFLAGS D# fɺ OBJ_SETSTATE D#Ɋ fɄɚɔOBJ_SIZE D#Rhb\VP OBJ_STATE66# f OPEN_WINDOWD PAINT_ARCDȾȸȲȬȦȠ PAINT_COLORD \` PAINT_OUTLINED N PAINT_OVAL D& ߔ PAINT_RECT DPAINT_ROUND_RECT DǬǦǠǚ PAINT_STYLED $rPLINED2PJD>LINE D@ PLOT D NvRECT_INTERSECT 6 \ƶưƪƤƞƘƒƌ REDO_DIALOG6pj#H^ RUBBERBOXDx82,& nSET_CLIP Dߦ SET_COLORDŠŶŰŪ SET_DEDITD#h fb\VPfD SET_DTEXTD# f( SET_MFORMD  SET_MOUSED ĺX SET_WINDOW D Į SET_WINFODĈf~ SET_WNAMED\: SET_WSIZED 0*$j SHOW_DIALOGD  #B SHOW_MOUSE D SHRINKBOXD .èâÜÖÐÊÄ~ SYS_FONT_SIZED <TNHBTEXT_ALIGNMENT D  J: TEXT_COLOR D  X TEXT_HEIGTHD  f TEXT_ROTATIOND  t–| TEXT_STYLE D  n VDI_CALL D& HB<6:x2WIND_GET D WIND_SET D  WORK_RECTD d^XRLZBSystemOSystem2GEMDECL&GEMAES0GEMVDI]DOSBIOS STPascal STPASCAL SHORT_RO SHORT_TR LONG_ROU LONG_TRU INT 8CTOPSTR DPTOCSTR ST_SHL ST_SHR PWROFTEN (BASEPAGE @CMD_ARGS LCMD_GETA rOPTION ~FILENAME KEYPRESS IO_RESUL PEEK WPEEK LPEEK POKE WPOKE LPOKE MOVE_B MOVE_W ,MOVE_L 4CLOCK PSETDATE \SETTIME hGETDATE tGETTIME CUR_ON CUR_OFF CUR_UP CUR_DOWN CUR_RIGH CUR_LEFT CUR_UP_S CUR_DOWN CUR_HOME CLEAR_HO SAVE_CUR RESTORE_ SELECT_C SELECT_B (INV_ON 4INV_OFF @DELETE_L LCLEAR_LI XINSERT_L dSTART_OF pEND_OF_L |END_OF_S START_OF WRAP_ON WRAP_OFF INSUPER SUPER GET_SCRE PUT_SCRE READ_SCR WRITE_SC ADD_DITE|ADD_MITEpADD_MTITAES_CALL AES_VERSBEGIN_MO6BEGIN_UPJBORDER_RBRING_TOCENTER_DrCLEAR_SCCLOSE_WI JDELETE_DdDELETE_MDELETE_W DO_ALERT$DO_DIALODRAGBOXDRAW_MENDRAW_MODDRAW_STRD_COLORHEND_DIALEND_MOUSBEND_UPDAERASE_ME EXIT_GEMFIND_ALEFIND_DIAFIND_MENFIND_RESFIND_WINbFIRST_REFRAME_ARFRAME_OVvFRAME_REFRAME_ROFREE_RESFRONT_WI0GET_DEDI*GET_EVEN`GET_EX_ITGET_IN_FlGET_OUT_GET_WINDGROWBOXHIDE_MOU INIT_GEMINIT_MOUXJUSTIFIELINE_COL@LINE_ENDLINE_STYRLINE_TO4LINE_WID~LOAD_RESMENU_CHEMENU_DISMENU_ENAMENU_HILMENU_NORMENU_REGMENU_TEXMOVEBOX.MOVE_TO >NEW_DIAL>.NEW_MENUNEW_WINDnNEXT_RECOBJ_DRAWpOBJ_FIND OBJ_FLAG|OBJ_OFFSOBJ_REDROBJ_SETF OBJ_SETSOBJ_SIZE OBJ_STATOPEN_WINPAINT_ARPAINT_CO PAINT_OUPAINT_OVjPAINT_REPAINT_ROPAINT_ST:PLINEFLINE^PLOTzRECT_INT<REDO_DIARUBBERBOSET_CLIPSET_COLO SET_DEDI SET_DTEXSET_MFORSET_MOUSSET_WIND>SET_WINF2SET_WNAM&SET_WSIZSHOW_DIASHOW_MOU(SHRINKBOfSYS_FONTdTEXT_ALITEXT_COLTEXT_HEILTEXT_ROT"TEXT_STYVDI_CALLNWIND_GETZWIND_SETVWORK_REC 4 ( 4 6 4 D 4 R  Z |  ( 4 @Z L f2  f: X r ~*  ~ ~ T ~ n    $ 2 "@ N \ 2j ,4x 84` Dfn Pt \" h$ t( ( 6 6 6 6 6 6 6. < 6J 6X 6f 6t X (X 46 @6 L6 X6 d6 p6 |6 6 6 6 6* 8 V*F T >b 6p 6 x P f 2 2Hy $ >J J ZV J& J VBgN~ J dANq J rHz J Hy" J N NqNq ~ 6N  $ dN J$ 4`$$0^0<0jH$Tb`0lH,Z3xpr*H:0.J"nJDLE ""IAE .ZVdvx.S_FOf.:XT_A.HXT_C4p6| <Pf|NESSz$&F &$((t B& 20>t$Jt$V0 b0>n06z0\~8&:L $ : :8V$ $ $ ` X"$ . : 2Fl0@Rl0d^(NjN$v0hH\$ZB~6vd$6LFz0  $*6BN Z0 f0 <r8 ~h$  0 X PHH$ bl@x00(8 .48r@ HL" tX ,d0 Jp* R|2n(0""&DD<L|. f8$ & >0&&&&$6l((0(B( lnl|&|<JVx| d X,lnRl|f|pd X~@N\hxd d dr~x|$8L|d X`|d d *4>Jx | $&&|lxlljl*t*t*t*t*t*t*t J*t*t*t*t6<Ht6<Ht*t*t*t*t*t*t*t*t*t*t*t ddd,l2d>dDlJd h&.hdh$ h&4h|(*.^&~&&p|(8.^4~44p t(dd d*d@ttFdLddpddpdVd:d$dddrd dp(t||$`2D|Tt x:dddd<Nd $`d $ld $Ld dd rd d d dd Vtdd HdVdddrdxt@|Zhdndn|(|:|b|d $dndndn<t\ddd d&tTtlt\|t"d`tVtdn dn2t@d`Nd`||$`2D|Rdn`dnvtd`d`||.d ^d~dd~dd~&dPd~td~dd^ddd&*d2d\htntd|ddddd Zdfd~t@d"d2dhv`dddddd d:dTdHdTdddt@ dd2t@T|zdd:dHdVddd6H|ZdddXblxxd $|"d2dDdTd dndd t@dBd dt@|dd*d@dZdfd ddx(t@*8dntttt"t:tttt$Jd ftdLd fttt"d ` 2|Jx6ZxDdd ` 2|Jx6ZxDdd "d "d "d "d Lx` ddd$d*d d dd&d .d d2d@p` dpd.p dpd,p dp dpJd p.&d.pJ4d>pPdZp.td~p.dp<dp.dp< d dp dp dddd*d8dDdLdRd`pdd*d8dDdLdRd`p ddd2dd(d0d6dDpdd.dBdNdXp^dxdhdd.d>dPdddtdddddp dd d0p26dPdZ dd d6p\dd.dBdNdXpN^dhdrp@dd.dBdNdXp@ dd d8pj>dHdRd^dvp\ dd d8p\|$`2D|JdTd`dlptttt dpttttt t"t"t* d |6|$`2D|NtFTxtbtbtb$d` tT` 2|Ft24d@dJdTdZx`djddddd.d ddd$d,d2d dddd&d0d:dDdddddddd6dVdxddddd$dHdlddddd dDdhdddddd@dbdddddd0dRdtddddd dBdddddddd0dRdtdddddd:d^ddddd d 2d Td2t "t"t.*t<*tJ dp dp dp|$`2D|JdTd`dxpx d p tjtxttb.t\"t\ ddd d&d,pt\ dddd$d*d0d6dxNqNqNV/.Hn?< CNHnB?<SN=@ N^.NuNqNqNV/.Hn?< CNHnB?<QN=@ N^.NuNqNqNV/.Hn?< CNHnB?<SN-@ N^.NuNqNqNV/.Hn?< CNHnB?<QN-@ N^.NuNqNqNV .=@ N^.NuNqNqNVAFC2""HnHn?< NHnHn?< NA"n ""2N^ _TN@]ݩNqNqNV . ".-@N^ _PNNqNqNV . ".-@N^ _PNNqNqNV"n"N^.NuNVHHnHnHnHnN0.Hr 100 objects) - abortingNVHU/.N=_0.&nG7n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p|"p:pBpVp|p|Jprp| dpd p$pd d(p.d<dFp|Zpjdvdpddp d&p*p.d6p.:p>dHpLpPdXp<\pNVB?< NA-x/@NA\ON^NuNqNqNVX/.Hn?<ONHnZHnNHnZB?<NN=_XJnXfHnZNNJnXWD@ N^.NuNqNqNV0.H/BgHn?<NHn/. ?<NN^ _TNNqNqNVUN0r.AfN^ _TNNqNqNV/.Hn?<NHzDHnN0J@oHnHz,HnN?<N`Hn/. ?<NN^.Nu NqNqNV/.Hn?<Np.rAm@=A=@`Rn0.2.tA0?Nr2C0.nfHn/. ?<NN^.NuNqNqNVHyNJfHyNN`N^NuNVH&nJg`0/ yCyfNNBNu <Nu 2/ o$"|X0/ JofHfS""""QBNuSQ`N2*O.|*m#r |a -Xy\?a | a0>yZo @m @o0<`p?a | aaap8 Ag AgFJ@lGg@Glym`|0` | 2`f | \a09a: | z`H ?f |a^`> Vg vfFB?< NA\O#n49Df PDA ` ByDA a/9n?< NA\O` @Og @ofBy\ByZA 7aN~ @Cg @cfA ,aA xCa A CaA 3RyCa09yy3A CaACa09H@3A @a2` | a$`?2y3X#rB?< NA\#n#r#v#~#r#v#~a/9n?< NA\ | :a0aP | Caa?</9r?<1B`Br | a\ | `BBB |D(o' for instructions Instructions:- You can specify the number of Kbytes of memory to allocate to the K-RAM disk, by just typing in the number in response to the prompt. Hitting by itself will use the default value (shown in square brackets). If the default value shown is zero then requesting more memory may affect other applications. Typing a value of zero will mean that K-RAM is not installed. Typing a negative value will cause K-RAM to LEAVE that much memory. E.G. -128 uses all but 128K of memory. Other goodies: ? : Prints this message V : Changes the state of the floppy disk verify flag. Disabling this improves speed of writing to floppies by almost 50% O : Over-rides K-RAMs built-in safety margin for memory left. K-RAM usually leaves 50K for GEM desktop workspace. This lets you allocate it for a K-RAM disk. BEWARE - the desktop crashes without it! C : Customize the Bios Parameter Block (BPB) for this K-RAM disk - allows you to change the size of root directory, etc. Use with caution! K-RAM not installed. p K K-RAM installed as drive A:q The drive will need installing into GEM desktop. Hit to return to desk... K of memory available for K-RAM. Use how many K? p[default =]q >>>> Type '?' for help and instructions <<<< There isn't that much free memory! You must allocate at leastK. Floppy read-after-write verify now enabled. Floppy read-after-write verify now disabled. pMemory safety margins over-ridden. You're on your own, sport.q Define a custom BPB for ramdisk (All numbers are in 512 Byte sectors) Size of root directory [Default = Size of File Att. Table [Default = Start of F.A.T 2 [Default = Start of data sectors [Default = Flags word [Default =] ? Invalid number!  *J ". $          l  :`@( ZKBy5J$f"O/91?<HNA\OJg.@1`@Ry5 m A#51"ҍ¼.A// Bg?<JNA #= y= /(,HhNFP/9<`RG0y/n2HA/20 n0Af0y/n0HA/00 nLN^NuHHz @ y=N@|NFLNsNuA5.=|\A4"HPgXHf0(LN^NuNVHHy2V/.NPfBG`Hy2\/.NPf><`Hy2b/.NPf><`0. |gR0. |?/.?<=NlP>J@m 0. |g&JGm??<>NlXBg/.?<`j0. |gD0. |?/.?<=NlP>J@m"??<>NlXBg/.?<`0. |?/.?<=NlP>JGl 340<`?. ?N X0LN^NuNV/.?<HNl\-@ .f-|34 .N^NuNV0./N XN^NuLB@ggSBAgHJ@gHANuNVH*n (MBn ng?.N 8T| fA&H. nU|`H| f S @  . nU| A|l0fD AH-@Hn/.?.?<@NlO <Hg 340<`dA&H0f~ =@`J/ 0./?.?<@NlO -@2.¼g .340<` .n0.L8N^NuNVA=t#=A<&#=ANlX=@g340<``0<NqN^NuA5s8B͔{& 1pO<3>q qB((/` ` 1yAQ!D! QQE'A`0liBiAi>B#` q x 0b*PȀ Sg ?B;M ` R# 1&( Cl("(R!`gay$!Or(J'0ΈPP#m 0Čr,8'SIrM3ykfcFsm!,b;nPȏs `bp`ǾGq` &B/"(!B0m0(Ƀ8#袊$"(2!0k'q q!qȢȘqq"/a͛qŖpUsb(DE-T3frx0π㍰bܓXi@!h>)n`00H(# 1 ("B)*"%6P`蠊$"$"%*1 02/ "(z( a &Ȣjr( BhA a&_ "( ͭfcfe60@!ɶB<\mgz(> 뢊( (y`< 0yqqȢqǞǀ0y/qyp)@<p`00Y p3#<<~||||||||xf8p<<~ ~<~<<`<<|f<f`f<|<|<~ffff~@x```8pf f0f0f`f ?f00ffff 4444044f z~~ ~` ~= 8 < ><0 Á<$8<` (fl>fl8ff8f ``ff 0ff<<pf~2Ǚf$o<<|>|8f|<|>|>~ffff~f<<<~~f~~f[<;f3hl~`f~ 0LÃ<< |||||||`(l<p~~v l|<>0 jf|`f||n~p`~f|f|<ff<0f`ff0fflfffff`fff>|66<n|16 llf~fnTk~f~~Ã~ ~~l0<0f~f0fn~f`f``ffx`nf`vlff<0 >f`f~0ffxffff`<fff 4ff~>`~~~ff|ffffffff`0`~8ff<<>Ifwdf06llffffTk`f0 2؟$foppf.|f8f0`f0f ff0f  ~0`fffl``fffl`ff`lfffflffff`f<|<>0bff<0f0~fffn><`0 6l~ffffff lff``fff``fljvf|f<f~x>|<><0f<f`|>lf~p~><>>>><<<<<><>~|`><<>fff0 ><<<~~~f f<~~f<<~~<<>f~~~p0Á<~`qT8`|p`|8|`<<<@@ff< ~~ `0p`|$<``||||||||f ff:``0::f[ |0 x8::x 0```f$``ff\ \\f |><<_|<8<@@@$@ f <$,4Bp@p$ $&8dx<<~~~<< `<|<|<|~~2f` Áf$g< @@ @$ $.ddTf8f `0ff0Fffbf``bf`bffffdffff l``0bbff`ff0ffb&&ffffffb``bfdff<\b L8. f`0f0`0Ǚ$<@8 ::<<>| |<|>6<zB`~0: <|||||||F@tpx0 T~n<&||ff` ff`f```f`zffffpffff Ffbffff ffff8bffff88`ffFFFFbfffff`ffffffffb0fl~FfffzFf6Ffnfffff(f``hzfp nBffFbfffbdYCf8l`~ `̼B<`| `\ПكgAf`ffff ffff0pffff 8`ff>>>>`fff~~|{ffffffff`|fff~>f02ll>f~n~~f>~`|p~f8~@ff>`fffp d[f8f` \~f|~0~П$,4A<y~@.0  f~ff>0ff`f``ff`^f`fffff0ff`f~ff ffff0<ff|<><>f f<|>0< >xf>~0<><>>>><<<<ff~~<<<>>><<<~><>fB><<` 2><~ff<<<f<~~B<8~~|~lnb><<f<<~~0lr`(n~~>||8A||||||| 0  ``?&. . 4&f.,*   ."(N8 $    &r HighSpeed Help Accessory ------------------------ 1. Introduction --------------- The new HighSpeed Pascal Help Accessory, in the following referred to as HHA, is an accessory that provides you with a gateway to the HighSpeed Pascal on-line help system, when you are operating outside the HIDE. 2. Installation --------------- Installing HHA requires two things. First, copy HHA.ACC and HHA.CFG to the root-directory of your boot-drive. Second, modify HHA.CFG so that the first line in this file contains the name of the directory in which the PASCAL.HLP file is located: If PASCAL.HLP is located in the directory C:\PASCAL, then the first line in HHA.CFG must read: C:\PASCAL. 3. Starting HHA --------------- After HHA has been installed, and your machine rebooted, HHA can be activated by clicking on "HighSpeed Help" in the desk menu. 4. Operating HHA ---------------- HHA is operated via a mixture of mouse and keyboard commands. Keyboard: Key Operation ----------------- ----------------------- Help = Show start-up help page Undo = Show previous help page ESC = Close HHA F1 = Page down F2 = Page up Home = Beginning of help page Shift+Home = End of help page Tab = 8 columns right Shift+Tab = 8 columns left Arrow down = Line down Arrow up = Line up Arrow left = Column left Arrow right = Column right Shift+Arrow down = Page down Shift+Arrow up = Page up Shift+Arrow left = 8 columns left Shift+Arrow right = 8 columns right Ctrl+S = Save block to disk Mouse: Double-clicking with the left mouse button, when the cursor is standing on an underlined word, will provide help on the underlined word. Pressing down the left mouse button, and at the same time moving the cursor around, will mark a block. 4.1 Blocks ---------- Marking a block in HHA is done in much the same way as in the HIDE. The only noticeable difference is that HHA marks blocks on a line-boundary, as opposed to HIDE where blocks can be single words, even single letters. Once a block has been marked, it can be saved on disk, by pressing CTRL and S at the same time. HHA automatically names the block, using a combination of the window title and '.HLP'. An example: You are currently getting help on the GEMVDI unit. You mark a block. You press CTRL and S. The saved block will be named: 'GEMVDI' + '.HLP' = GEMVDI.HLP If HHA finds a file with the same name as the block, you will be prompted before HHA overwrites the existing file. If HHA was able to successfully save the block on disk, the block will be de-marked. 5. Errors --------- The HHA recognizes the following error situations: 1. The PASCAL.HLP file cannot be located. Modify (or create) the HHA.CFG file, and put it into the same directory as HHA.ACC. The contents of HHA.CFG must be the name of the directory in which the PASCAL.HLP file is located. 2. The PASCAL.HLP file has been removed (from the disk drive). Insert the disk containing PASCAL.HLP into the disk drive. 3. No available windows. Close a window, and try again. 4. Insufficient disk space. Make some room on the disk, so that the currently marked block can be saved, or make the block smaller. towar1?8O1owar1?8Otowar3?8O