IMD 1.18: 14/11/2012 8:12:51 grafdraw 0.8 9/4/85 archive         GRAF0.8$mH  PAT00.PTRN \/H G.TEXT 1 \/H7220.PROC0.TEXTH7220.PROC1.TEXTH#7220.PROC2.TEXTH#/GRAF.CURS.TEXT/H/3GRAF.FLOOD.TEXTH3AGRAF.LINE.TEXT/HAgGRAF.CIRCL.TEXTHg{GRAF.FONT.TEXT/H{7220.FLOOD.TEXTH7220.MISC.TEXT/H7220.CIRCL.TEXTHG GRAFTEST.TEXT\/HGJ7220.PROC0.CODEHJN7220.PROC1.CODEHNd7220.CORE.TEXT/Hd| 7220.ARC.TEXT\/H|7220.RECT.T DDDDDD$""DDD""DDD$"DDDD"DDDD$DDDDDEXT/H7220.CORE.CODE/H GRAFDRAW.BACK\/HGRAF.MISC.TEXT/HGRAF.RECT.TEXT/H" PAT.COMP.CODE\/": FONT.B.TEXT \/{:=7220.PROC2.CODEH=kGRAFDRAW4.CODE/Hk GRAFTEST.CODE\/H FONT00.FONT \/H GRAFDRAW.TEXT\/HG.CODE 1 \/H GRAFDRAW.CODE\/H'GRAFDRAW2.CODE/H'^NGRAFDRAW4.CODEH^NGRAFDRAW2.CODEH FONT.A.TEXT \/{DSYSTEM.INFO \/$CURSOR $EQUAL :.O.HH lg  7220.proc0  7220.proc1  7220.proc2  7220.core    grafdraw.code    GRAF0.8$mH  PAT00.PTRN \/H G.TEXT 1 \/H7220.PROC0.TEXTH7220.PROC1.TEXTH#7220.PROC2.TEXTH#/GRAF.CURS.TEXT/H/3GRAF.FLOOD.TEXTH3AGRAF.LINE.TEXT/HAgGRAF.CIRCL.TEXTHg{GRAF.FONT.TEXT/H{7220.FLOOD.TEXTH7220.MISC.TEXT/H7220.CIRCL.TEXTHG GRAFTEST.TEXT\/HGJ7220.PROC0.CODEHJN7220.PROC1.CODEHNd7220.CORE.TEXT/Hd| 7220.ARC.TEXT\/H|7220.RECT.TEXT/H7220.CORE.CODE/H GRAFDRAW.BACK\/HGRAF.MISC.TEXT/HGRAF.RECT.TEXT/H" PAT.COMP.CODE\/": FONT.B.TEXT \/{:=7220.PROC2.CODEH=kGRAFDRAW4.CODE/Hk GRAFTEST.CODE\/H FONT00.FONT \/H GRAFDRAW.TEXT\/HG.CODE 1 \/H GRAFDRAW.CODE\/H'GRAFDRAW2.CODE/H'^NGRAFDRAW4.CODEH^NGRAFDRAW2.CODEH FONT.A.TEXT \/{DSYSTEM.INFO \/     $CURSOR $EQUAL WO.R (.NoPatchList ( (.Relproc GR_Text,13 ; Procedure GR_Text (X_Start, Y_Start : Integer; @; Var Pattern; @; P_Rows, P_Cols, @; Mag_X, Mag_Y, @; Color, Enabled, Overlay, @; Direct, SetMode, @; ClearMode : Integer); (.Ref Text ( (Lea AX,Text (Jmp AX   (.Relproc GR_R_Pat,11 ; Procedure GR_R_Pat (X_Start, Y_Start, @; Rect_X, Rect_Y : Integer; @; Var Pattern; @; Pat_X, Pat_Y, @; Pat_Start_X, Pat_Start_Y, @; Color, Overlay : Integer); (.Ref Rect_Pat ( (Lea AX,Rect_Pat (Jmp AX   (.Relproc GR_Read,5 ; Procedure GR_Read (X_Start, Y_Start : Integer; @; Var Pattern; @; Columns, Rows : Integer); (.Ref Read  (Lea AX,Read (Jmp AX   (.Relproc GR_Unpack,9 ; Procedure GR_Unpack ( (.NoPatchList ( (.Relproc GR_Init,1 ; Procedure GR_Init (Var Rec : Init_Rec); (.Ref Init ( (Lea AX,Init (Jmp AX  ( (.Relproc GR_Clear,7 ; Procedure GR_Clear (Start_X, Start_Y, ( ; Length_X, Length_Y, @; Color, Enabled, @; Overlay : Integer); (.Ref Clear ( (Lea AX,Clear (Jmp AX  ( (.Relproc GR_Line,8 ; Procedure GR_Line (X_Start, Y_Start, @; X_Length@; Var Pattern; @; Pat_X, Pat_Y : Integer; @; Var Red_Pat; @; Var Uses_Red : Boolean; @; Var Green_Pat; @; Var Uses_Green : Boolean; @; Var Blue_Pat; @; Var Uses_Blue : Boolean); 7 (.Ref Unpack  (Lea AX,Unpack (Jmp AX   (.Relproc GR_Fill_Circle,6 ; Procedure Fill_Circle (Center_X, Center_Y, A; Radius, Over, Y_Length, @; Pattern, Color, @; Enabled, Overlay : Integer); (.Ref Line  (Lea AX,Line (Jmp AX  (.Relproc GR_Box,8 ; Procedure GR_Box (X_Start, Y_Start, @; X_Length, Y_Length, @; Pattern, Color, Enabled, @; Overlay : Integer); (.Ref Box ( (Lea AX,Box (Jmp AX  (.Relproc GR_R_Fill,7 ; Procedure GR_R_Fill (Start_X, Start_Y, lay, A; Color, A; Enabled : Integer); 7 (.Ref Cir_Fill  (Lea AX,Cir_Fill (Jmp AX  ( (.Relproc GR_Cir_Pat,8 ; Procedure GR_Cir_Pat (Center_X, Center_Y, A; Radius : Integer; A; Var Pattern; A; Pat_X, Pat_Y, Color, A; Overlay : Integer); 7 (.Ref Cir_Pat  (Lea AX,Cir_Pat (Jmp AX   @; Length_X, Length_Y, @; Color, Enabled, @; Overlay : Integer); (.Ref Rect_Fill ( (Lea AX,Rect_Fill (Jmp AX  ( (.Relproc GR_R_Fill,7 ; Procedure GR_R_Fill (Start_X, Start_Y, @; Length_X, Length_Y, @; Color, Enabled, @; Overlay : Integer); (.Ref Rect_Fill ( (Lea AX,Rect_Fill (Jmp AX  ( (.Relproc GR_Universe,2; Procedure GR_Universe (Di(.Relproc GR_Area_Solid,5 ; Procedure GR_Area_Solid (X, Y, H; Color, Enclosed, H; Overlay : Integer); (.Ref Area_Solid (Lea AX,Area_Solid (Jmp AX  ( (.RelProc GR_Arc,13 ; Procedure GR_Arc (X, Y, Radius, H; Oct_Start, Len_Start, H; Oct_End, Len_End : Integer; H; Trunc_Prm, Round_Prm, H; Pattern, Color, Enabled, H; Overlay : Integer); (.Ref Arc (Lea AX,Arc (Jmp AX ( ( " .RelProcsplay, @; Draw : Integer); (.Ref Universe ( (Lea AX,Universe (Jmp AX  ( (.End  GR_Region,4 ; Procedure GR_Region ( H; X_Start, H; Y_Start, H; X_Length, H; Y_Length : Integer); (.Ref Region (Lea AX,Region (Jmp AX ( ( (.End $CURSOR $EQUAL $LAST $SYNTAX dO.RX$CURSOR $EQUAL $LAST $SYNTAX oKoO.RX     = X + CSR_Size; $ $GR_Line (Low, Y, High - Low, 0, 255, -Ord (C_White) - Ord (Odd (Core^.Background) And Odd (7)), 7, -Xor);   {$B Is_Textron-} $If Y - CSR_Size < 0 Then &Begin (Low := 0; (Core^.Draw_Result := Draw_Clipped; &End {of If} $Else  {$E Is_Textron-} & &Low := Y - CSR_Size;   {$B Is_Textron-} $If Y + CSR_Size > Core^.Y_Max Then &Begin (High := Core^.Y_Max; & Core^.Draw_Result := Draw_Clipped; &End {of If} $Else  {$E Is_Textron-} & &High := Y + CSR_Size; $  (.NoPatchList ( (.Relproc GR_Start,0 ; Procedure GR_Start; (.Ref Start ( (Lea AX,Start (Jmp AX   (.Relproc GR_Stop,0 ; Procedure GR_Stop; (.Ref Stop ( (Lea AX,Stop (Jmp AX   (.Relproc GR_Window,5 ; Procedure GR_Window (Win_Num, X_Org, Y_Org, @; X_Size, Y_Size : Integer; (.Ref Window  (Lea AX,Window (Jmp AX ( ( (.Relfunc GR_Y_Val,2 ; Function Y_Val (Radius, N) : Integer; (.Ref Y_Val  (Lea AX,Y_Va$GR_Line (X, Low, 0, High - Low, 255, -Ord (C_White) - Ord (Odd (Core^.Background) And Odd (7)), 7, Xor); "End {of Draw_Cursor}; " " " "Procedure Move_Cursor {X_Position, 9Y_Position : Point}; "Begin $With Core^ Do &If CSR_Is_Enabled Then (Begin   {$B Is_Textron-} *Draw_Result := Draw_Overflow; *If (X_Position >= 0) And (X_Position <= X_Max) Then ,If (Y_Position >= 0) And (Y_Position <= Y_Max) Then .Begin  {$E Is_Textron-} 0 0If CSR_Is_Visible Then 2Draw_Cursor (Cursor_X, Cursor_Y); l (Jmp AX ( ( (.Relfunc GR_Scan_Until,3 ; Function Scan_Until (Radius, Max_Y_Val, @; N) : Integer; (.Ref Scan_Until  (Lea AX,Scan_Until (Jmp AX ( ( (.Relproc GR_Text_Fast,9 ; Procedure GR_Text_Fast (X_Start, B; Y_Start : Integer; B; Var Pattern; B; P_Rows, Color, B; Enabled, Overlay, B; SetMode, 0Cursor_X := X_Position; 0Cursor_Y := Y_Position; 0If CSR_Is_Visible Then 2Draw_Cursor (Cursor_X, Cursor_Y)   {$B Is_Textron-} 0Else 2Draw_Result := Draw_OK; .End {of If (Y_Position};  {$E Is_Textron-} ( (End {of If CSR_} "  {$B Is_Textron-} &Else (Draw_Result := Draw_OK;  {$E Is_Textron-} " "End {of Move_Cursor};    "Procedure Set_Cursor {Attrib : Cur_Attribute}; "Begin   {$B Is_Textron-} $Core^.Draw_Result := Draw_OK;  {$E Is_Textron-} $ $If Attrib <= Cur_Enable Then B; ClearMode : Integer); (.Ref Text_Fast ( (Lea AX,Text_Fast (Jmp AX   (.End &Begin (If CSR_Is_Enabled <> (Attrib = Cur_Enable) Then *If CSR_Is_Visible Then ,Draw_Cursor (Cursor_X, Cursor_Y); (CSR_Is_Enabled := Attrib = Cur_Enable; &End {of If <= Cur_Enable} $Else &If CSR_Is_Enabled Then (If Attrib <= Cur_Invisible Then *Begin ,If CSR_Is_Visible <> (Attrib = Cur_Visible) Then .Draw_Cursor (Cursor_X, Cursor_Y); ,CSR_Is_Visible := Attrib = Cur_Visible; *End {of <= Cur_Invisible} (Else *If Attrib = Cur_Small Then ,Size_Cursor (Small_Cursor_Size) *Else ,Size_Cursor (Large_Cursor_Size);   {$B Is_Textron-} $If Not CSR_Is_Enabled Or Not CSR_Is_Visible Then &Core^.Draw_Result := Draw_OK;  {$E Is_Textron-} " "End {of Set_Cursor};    "Procedure Size_Cursor {Size : Integer}; "Begin $  {$B Is_Textron-} $Core^.Draw_Result := Draw_OK;  {$E Is_Textron-} $ $If CSR_Is_Enabled And (CSR_Size <> Size) Then &If Size >= 0 Then (Begin *If CSR_Is_Visible Then ,Draw_Cursor (Cursor_X, Cursor_Y); *CSR_Size := Size; *If CSR_Is_Visible Then $CURSOR $EQUAL $TAG $SYNTAX &O.rh ,Draw_Cursor (Cursor_X, Cursor_Y); (End {of If Size} &  {$B Is_Textron-} &Else & Core^.Draw_Result := Draw_Overflow;  {$E Is_Textron-} " "End {of Size_Cursor};   "Procedure Move_Abs {X_Position, 6Y_Position : Point}; "Begin $With Core^ Do &  {$B Is_Textron-} &If (X_Position >= 0) And (X_Position <= X_Max) Then (If (Y_Position >= 0) And (Y_Position <= Y_Max) Then *Begin * Draw_Result := Draw_OK; ,X_CP := X_Position; ,Y_CP := Y_Position; *End {of If (Y_Position} (Else & Draw_Result := Draw_Overflow &Else (Draw_Result := Draw_Overflow;  {$E Is_Textron-} "  {$B Is_Textron+} *Begin ,X_CP := X_Position; ,Y_CP := Y_Position; *End {of With};  {$E Is_Textron+} " "End {of Move_Abs};    "  {$B Is_Textron-} "Procedure Move_Rel {Delta_X, 6Delta_Y : Point}; "Var New_X, &New_Y : Integer; "Begin $With Core^ Do &Begin (New_X := X_CP + Delta_X; (New_Y := Y_CP + Delta_Y; (If (New_X >= 0) And (New_X <= X_Max) Then *If (New_Y >= 0) And (New_Y <= Y_Max) Then { Beginning of Graf.Curs Include File }  {$N+} 8 "Procedure Draw_Cursor (X, Y : Integer); "Var Low, &High : Integer; "Begin   {$B Is_Textron-} $Core^.Draw_Result := Draw_OK; $If X - CSR_Size < 0 Then &Begin (Low := 0; (Core^.Draw_Result := Draw_Clipped; &End {of If} $Else  {$E Is_Textron-} & &Low := X - CSR_Size;   {$B Is_Textron-} $If X + CSR_Size > Core^.X_Max Then &Begin (High := Core^.X_Max; (Core^.Draw_Result := Draw_Clipped; &End {of If} $Else  {$E Is_Textron-} & &High :     ,Begin .Draw_Result := Draw_OK; .X_CP := New_X; .Y_CP := New_Y; ,End {of If (Y_Position} *Else ,Draw_Result := Draw_Overflow (Else *Draw_Result := Draw_Overflow; $ End {of With}; "End {of Move_Rel};  {$E Is_Textron-}      {$N^}  { Ending of Graf.Curs Include File }   { Beginning of Graf.Line Include File } 8 " "Procedure Set_Line_Style {Dot_1, O.Rh(If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); (  {$B Is_Textron-} (If (X_CP + X_Length > X_Max) Or (X_CP < -X_Length) Then *Begin ,If X_CP < -X_Length Then .New_Length := -X_CP ,Else .New_Length := X_Max - X_CP; ,Y_Length := Round (Y_Length / Abs (X_Length) * Abs (New_Length)); ,X_Length := New_Length; * Result := Draw_Clipped; *End {of If X_CP}; (If (Y_CP + Y_Length > Y_Max) Or (Y_CP < -Y_Length) Then *Begin ,If Y_CP < -Y_Length Then .New_Length := -Y_CP ,Else .New_Length := Y_Max - Y_CP; ,X_Length := Round (X_Length / Abs (Y_Length) * Abs (New_Length)); ,Y_Length := New_Length; ,Result := Draw_Clipped; *End {of If Y_CP};  {$E Is_Textron-} ( (GR_Line (X_CP, Y_CP, X_Length, Y_Length, Line_Style, 1Line_Index, Planes_On, Overlay_Mode); (If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); (  {$B Is_Textron-} (Draw_Result := Result;  {$E Is_Textron-} ( (X_CP := X_CP + X_Length; (Y_CP := Y_CP + Y_Length; &End {of With}; "End {of Line_Rel}; "{$N^} " " 6   { Beginning of Graf.Flood Include File } 8 " "  {$B Is_Textron-} "Procedure Flood; "Var Kill_Cursor : Boolean; "Begin $With Core^ Do &Begin (Kill_Cursor := (Overlay_Mode = Replace) And CSR_Is_Enabled And 7CSR_Is_Visible; (If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); (If Polygon_Interior = Plain Then *GR_Area_Solid (X_CP, Y_CP, Fill_Index, Planes_On, Overlay_Mode) (Else *{Insert GR_Area_Pattern call here}; (If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); " Draw_"Procedure Line_Abs {X_End, 6Y_End : Point}; "Begin $Line_Rel (X_End - Core^.X_CP, Y_End - Core^.Y_CP); "End {of Line_Abs}; " "  "{$N+} "Procedure PLine_Abs {Var X_End, ;Y_End : Point_Array; ;Count : Integer}; "Var New_X, &New_Y : Point; &Result, &New_Len, &Len_X, &Len_Y, &I : Integer; &Kill_Cursor, &Draw : Boolean; "Begin $Draw := True; $Kill_Cursor := (Core^.Overlay_Mode = Replace) And CSR_Is_Enabled And 3CSR_Is_Visible; $If Kill_Cursor Then &Draw_Cursor (Cursor_X, CursoResult := Draw_OK; &End {of With Core^}; "End {of Flood};  {$E Is_Textron-}     { Ending of Graf.Flood Include File } 8 "  r_Y); $  {$B Is_Textron-} $Result := Draw_OK;  {$E Is_Textron-} $ $With Core^ Do &For I := 1 To Count Do (Begin *  {$B Is_Textron-} *Result := Draw_OK;  {$E Is_Textron-} * *New_X := X_End[I]; *New_Y := Y_End[I]; *Len_X := New_X - X_CP; *Len_Y := New_Y - Y_CP; *  {$B Is_Textron-} *If (X_CP + Len_X > X_Max) Or (X_CP < -Len_X) Then ,Begin .If X_CP < -Len_X Then 0New_Len := -X_CP .Else 0New_Len := X_Max - X_CP; .Len_Y := Round (Len_Y / Abs (Len_X) * Abs (New_Len)); $CURSOR $EQUAL $TAG $SYNTAX $LAST O.rh .Len_X := New_Len; , Result := Draw_Clipped; ,End {of If X_CP}; *If (Y_CP + Len_Y > Y_Max) Or (Y_CP < -Len_Y) Then ,Begin .If Y_CP < -Len_Y Then 0New_Len := -Y_CP .Else 0New_Len := Y_Max - Y_CP; .Len_X := Round (Len_X / Abs (Len_Y) * Abs (New_Len)); .Len_Y := New_Len; .Result := Draw_Clipped; ,End {of If Y_CP};  {$E Is_Textron-} * *If Draw Then ,GR_Line (X_CP, Y_CP, Len_X, Len_Y, Line_Style, 5Line_Index, Planes_On, Overlay_Mode); *Draw := (Len_X <> 0) Or (Len_Y <> 0); *X_CP := New_X;      *Y_CP := New_Y; (End {of For}; $If Kill_Cursor Then &Draw_Cursor (Cursor_X, Cursor_Y); "  {$B Is_Textron-} $Core^.Draw_Result := Result;  {$E Is_Textron-} " "End {of PLine_Abs}; "{$N^} " " " "{$N+} "  {$B Is_Textron-} "Procedure PLine_Rel {Var X_Length, ;Y_Length : Point_Array; ;Count : Integer}; "Var Len_X, &Len_Y, &Result, &New_Len, &I : Integer; &Kill_Cursor, &Draw : Boolean; "Begin $Draw := True; t_Cols, Pat_Rows, 2, Overlay_Mode); *If (Pat_Uses_Blue Or (Overlay_Mode = Replace)) /And (Ord (Odd (Planes_On) And Odd (4)) = 4) Then ,GR_Cir_Pat (X_CP, Y_CP, Radius, 8Pat_Blue_Ptr^, Pat_Cols, Pat_Rows, 4, Overlay_Mode); (End {of If Pat_Is_Valid}; "End {of Circle_Pattern};  {$E Is_Textron-} " " " " "  {$B Is_Textron-} "Procedure Arc_Rel {Radius : Integer; 5Start_Angle, 5End_Angle : Real; 1Var X_Start, 5Y_Start, 5X_End, 5Y_End : Integer}; "Var Oct_End, &Oct_Start, $Kill_Cursor := (Core^.Overlay_Mode = Replace) And CSR_Is_Enabled And 3CSR_Is_Visible; $If Kill_Cursor Then &Draw_Cursor (Cursor_X, Cursor_Y); $Result := Draw_OK; $With Core^ Do &For I := 1 To Count Do (Begin *Len_X := X_Length[I]; *Len_Y := Y_Length[I]; *Result := Draw_OK; *If (X_CP + Len_X > X_Max) Or (X_CP < -Len_X) Then ,Begin .If X_CP < -Len_X Then 0New_Len := -X_CP .Else 0New_Len := X_Max - X_CP; .Len_Y := Round (Len_Y / Abs (Len_X) * Abs (New_Len)); .Len_X := New_Len; , Result :=&Len_Start, &Len_End, &Bias, &Max_Clockwise, &Max_Counterwise, &Result : Integer; &First_Line, &Fudge_Circle, &Doing_Circle, &Enabled, &Kill_Cursor : Boolean; &Raw_Length, &Cos_Start, &Cos_End, &Sin_Start, &Sin_End : Real; "  {$N+} $Procedure Clip_Arc (Radius, 8Start_Octant, 8Start_Offset, 8End_Octant, 8End_Offset, 8Clk, 8Cntr, 8E_Y_Val : Integer); $Var Has_Offset, (Done, (Abort, (Long_Arc, (Is_First : Boolean; (Delta_X, (Delta_Y, (S_Octant, (S_O Draw_Clipped; ,End {of If X_CP}; *If (Y_CP + Len_Y > Y_Max) Or (Y_CP < -Len_Y) Then ,Begin .If Y_CP < -Len_Y Then 0New_Len := -Y_CP .Else 0New_Len := Y_Max - Y_CP; .Len_X := Round (Len_X / Abs (Len_Y) * Abs (New_Len)); .Len_Y := New_Len; .Result := Draw_Clipped; ,End {of If Y_CP}; *If Draw Then ,GR_Line (X_CP, Y_CP, Len_X, Len_Y, Line_Style, 5Line_Index, Planes_On, Overlay_Mode); *Draw := (Len_X <> 0) Or (Len_Y <> 0); *X_CP := X_CP + Len_X; *Y_CP := Y_CP + Len_Y; (End {of For}; ffset, (E_Octant, (E_Offset : Integer; $Begin &Delta_X := Core^.X_Max - Core^.X_CP; &Delta_Y := Core^.Y_Max - Core^.Y_CP; &If Start_Octant = End_Octant Then (If Odd (Start_Octant) Then *Long_Arc := Start_Offset > End_Offset (Else *Long_Arc := Start_Offset < End_Offset &Else (Long_Arc := End_Octant <> (Start_Octant + 7) Mod 8; &Is_First := True; &Done := False; &S_Octant := Succ (Start_Octant) Mod 8; &Repeat (Has_Offset := False; (Repeat *S_Octant := (S_Octant + 7) Mod 8; $If Kill_Cursor Then &Draw_Cursor (Cursor_X, Cursor_Y); " Core^.Draw_Result := Result; "End {of PLine_Rel};  {$E Is_Textron-} " "{$N^} "  { Ending of Graf.Line Include File } 8 "   {$B Debug_Arcs} *Writeln ('Checking out start octant ', S_Octant);  {$E Debug_Arcs} *Case S_Octant Of ,0 : Begin 2If Delta_Y < Cntr Then 4S_Offset := Delta_Y 2Else 4S_Offset := Cntr; 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset < S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := GR_Y_Val (Radius, S_Offset) <= Delta_X; 0End {of 0}; ,1 : Begin 2S_Offset := GR_Scan_Until (Radius, Delta_Y, Clk); 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset > S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := (S_Offset <= Clk) And (S_Offset <= Delta_X); 0End {of 1}; ,2 : Begin 2If Core^.X_CP < Cntr Then 4S_Offset := Core^.X_CP 2Else 4S_Offset := Cntr; 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset < S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := GR_Y_Val (Radius, S_Offset) <= Delta_Y; 0End {of 2}; ,3 : Begin 2S_Offset := GR_Scan_Until (Radius, Core^.X_CP, Clk); 2If Is_First Then $CURSOR $EQUAL $TAG $SYNTAX $LAST  568 O.Rh4If Start_Octant = S_Octant Then 6If Start_Offset > S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := (S_Offset <= Clk) And (S_Offset <= Delta_Y); 0End {of 3}; ,4 : Begin 2If Core^.Y_CP < Cntr Then 4S_Offset := Core^.Y_CP 2Else 4S_Offset := Cntr; 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset < S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := GR_Y_Val (Radius, S_Offset) <= Core^.X_CP; 0End {of 4}; ,5 : Begin 2S_Offset := GR_Scan_Until (Radius, Core^.Y_CP, Clk); 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset > S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := (S_Offset <= Clk) And (S_Offset <= Core^.X_CP); 0End {of 5}; ,6 : Begin 2If Delta_X < Cntr Then 4S_Offset := Delta_X 2Else 4S_Offset := Cntr; 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset < S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := GR_Y_Val (Radius, S_Offset) <= Core^.Y_CP; 0End {of 6}; ,7 : Begin  { Beginning of Graf.Circl Include File } 8 " "  {$B Is_Textron-} "Procedure Circle_Pattern (Radius : Integer); "Begin $With Core^, Pat_Rec Do &If Pat_Is_Valid Then (Begin *If (Pat_Uses_Red Or (Overlay_Mode = Replace)) And Odd (Planes_On) Then ,GR_Cir_Pat (X_CP, Y_CP, Radius, 8Pat_Red_Ptr^, Pat_Cols, Pat_Rows, 1, Overlay_Mode); *If (Pat_Uses_Green Or (Overlay_Mode = Replace)) .And (Ord (Odd (Planes_On) And Odd (2)) = 2) Then ,GR_Cir_Pat (X_CP, Y_CP, Radius, , Pat_Green_Ptr^, Pa     2S_Offset := GR_Scan_Until (Radius, Delta_X, Clk); 2If Is_First Then 4If Start_Octant = S_Octant Then 6If Start_Offset > S_Offset Then 8S_Offset := Start_Offset; 2Has_Offset := (S_Offset <= Clk) And (S_Offset <= Core^.Y_CP); 0End {of 7}; *End {of Case}; (Until Has_Offset Or .((S_Octant = End_Octant) And -((Long_Arc And Not Is_First) Or (Not Long_Arc And Is_First)));  {$B Debug_Arcs} (Writeln ('Long_Arc = ', Ord (Long_Arc), ' Is_First = ', Ord (Is_First)); (Writeln ('End_Octant = ', End_Octant.Start_X_Line := X_Point; .Start_Y_Line := Y_Point; ,End {of 1}; (2 : Begin .Start_X_Line := -X_Point; .Start_Y_Line := Y_Point; ,End {of 2}; (3 : Begin .Start_X_Line := -Y_Point; .Start_Y_Line := X_Point; ,End {of 3}; (4 : Begin .Start_X_Line := -Y_Point; .Start_Y_Line := -X_Point; ,End {of 4}; (5 : Begin .Start_X_Line := -X_Point; .Start_Y_Line := -Y_Point; ,End {of 5}; (6 : Begin .Start_X_Line := X_Point; .Start_Y_Line := -Y_Point; ,End {of 6}; (7 : Begin .Start_X_Line := Y_Point, ' Start_Octant = ', Start_Octant); (Writeln ('Starting octant = ', S_Octant, ' offset = ', S_Offset);  {$E Debug_Arcs} ( (Done := Not Has_Offset; (If Has_Offset Then *Begin ,E_Octant := Succ (S_Octant) Mod 8; ,Has_Offset := False; ,Repeat .E_Octant := (E_Octant + 7) Mod 8;  {$B Debug_Arcs} .Writeln ('Checking out last octant ', E_Octant);  {$E Debug_Arcs} .Case E_Octant Of 00 : If Radius > Delta_X Then 6Begin 8E_Offset := Delta_X; 8If End_Octant = E_Octant Then ; .Start_Y_Line := -X_Point; ,End {of 7}; &End {of Case}; &If Offset = 1 Then (Move_Abs (Center_X, Center_Y) &Else (Move_Abs (Center_X + Round (X_Delta), Center_Y + Round (Y_Delta));  {$B Debug_Arcs} &Writeln ('Drawing line to (', X_Point, ', ', Y_Point, ') Octant: ', /Octant); &Writeln ('Start_X_Line = ', Start_X_Line, ' Start_Y_Line = ', /Start_Y_Line); &Writeln (' Delta_X = ', X_Delta, ' Delta_Y = ', Y_Delta); &Writeln ('Drawing line from (', Core^.X_CP, ', ', Core^.Y_CP, ') for (', :If E_Y_Val < E_Offset Then = Delta_X Then 6Begin 8E_Offset := Delta_X; 8Has_Offset := True; 6End {of If}; 02 : If Radius > Delta_Y Then 6Begin 8E_Offset := Delta_Y; 8If End_Octant = E_Octant Then :If E_Y_Val < E_Offset Then = Delta_Y Then 6Begi/Round (Start_X_Line - Offset * X_Delta), ', ', /Round (Start_Y_Line - Offset * Y_Delta), ')');  {$E Debug_Arcs} &Line_Rel (Round (Start_X_Line - Offset * X_Delta), 0Round (Start_Y_Line - Offset * Y_Delta)); &Move_Abs (Center_X, Center_Y); $End {of Draw_Lines}; 8 " "Begin {of Arc_Rel} $With Core^ Do &If Polygon_Edge = Solid_Line Then (Begin *Result := Draw_OK; *Kill_Cursor := (Overlay_Mode = Replace) And CSR_Is_Enabled And 9CSR_Is_Visible And Not Drawing_Circle; *If Kill_Cursor Then ,Drawn 8E_Offset := Delta_Y; 8Has_Offset := True; 6End {of If}; 04 : If Radius > Core^.X_CP Then 6Begin 8E_Offset := Core^.X_CP; 8If End_Octant = E_Octant Then :If E_Y_Val < E_Offset Then = Core^.X_CP Then 6Begin 8E_Offset := Core^.X_CP; 8Has_Offset := True; 6End {of If}; 06 : If Radius > Core^.Y_CP Then 6Begin 8E_Offset := Core^.Y_CP; 8If End_Octant = E_Octant Then _Cursor (Cursor_X, Cursor_Y); *Raw_Length := Radius * Sin_45; *Max_Counterwise := Trunc (Raw_Length + 0.25); *Max_Clockwise := Trunc (Raw_Length + 0.75); *If Not Drawing_Circle Then ,Begin .Radius := Abs (Radius); .If Start_Angle < 0 Then 0Start_Angle := PI_x2 + Start_Angle; .If End_Angle < 0 Then 0End_Angle := PI_x2 + End_Angle; ,End {of If}; 0 *If (X_CP + Radius > X_Max) Or (X_CP - Radius < 0) Or -(Y_CP + Radius > Y_Max) Or (Y_CP - Radius < 0) Then ,Begin .Result := Draw_Clipped; :If E_Y_Val < E_Offset Then = Core^.Y_CP Then 6Begin 8E_Offset := Core^.Y_CP; 8Has_Offset := True; 6End {of If}; .End {of Case}; ,Until Has_Offset Or 2((E_Octant = End_Octant) And 3Not (Long_Arc And Is_First And (End_Octant = Start_Octant))); ,If Not Has_Offset Then .E_Offset := End_Offset; ,Abort := False; ,If E_Octant = S_Octant Then .Begin 0If (S_Octant = End_Oc.Doing_Circle := False; ,End {of If X_CP} *Else ,Doing_Circle := Drawing_Circle; . *If Doing_Circle Then ,GR_Arc (X_CP, Y_CP, Radius, 7, 0, 0, 0, 4Max_Counterwise, Max_Clockwise, Line_Style, 4Line_Index, Planes_On, Overlay_Mode) *Else ,Begin  {$B Debug_Arcs} .Writeln ('Start Angle = ', Start_Angle, 7', End_Angle = ', End_Angle, ' Radius = ', Radius);  {$E Debug_Arcs} .Oct_Start := Trunc (Start_Angle / PI_4 + 0.0083) Mod 8; .Oct_End := Trunc (End_Angle / PI_4 + 0.0083) Mod 8; .Sin_Start :tant) And Not Long_Arc Then 2If Odd (E_Octant) Then 4Done := S_Offset > End_Offset 2Else 4Done := S_Offset < End_Offset; 0If (End_Octant = E_Octant) And Long_Arc And Not Is_First Then 2If Odd (E_Octant) Then 4Abort := E_Offset > End_Offset 2Else 4Abort := E_Offset < End_Offset; .End {of If E_Octant};  {$B Debug_Arcs} ,Writeln ('Ending octant = ', E_Octant, ' offset = ', E_Offset); ,Writeln ('Abort = ', Ord (Abort), ' Done = ', Ord (Done), 5' Long_Arc = ', Ord (Long_Arc));  {$E Debug_Arcs} = Sin (Start_Angle); .Cos_Start := Cos (Start_Angle); .Sin_End := Sin (End_Angle); .Cos_End := Cos (End_Angle); .If Oct_Start In [0, 7, 3, 4] Then 0Len_Start := Round (Abs (Radius * Sin_Start)) .Else 0Len_Start := Round (Abs (Radius * Cos_Start)); .If Oct_End In [0, 7, 3, 4] Then 0Len_End := Round (Abs (Radius * Sin_End)) .Else 0Len_End := Round (Abs (Radius * Cos_End)); .Fudge_Circle := False; .If Odd (Oct_Start) Then . Begin 2If Len_Start > Max_Clockwise Then ,If Not (Abort Or Done) Then .GR_Arc (Core^.X_CP, Core^.Y_CP, Radius, 6S_Octant, S_Offset, E_Octant, E_Offset, 6Cntr, Clk, Core^.Line_Style, Core^.Line_Index, 6Planes_On, Core^.Overlay_Mode); ,If Not Done Then .If (End_Octant = E_Octant) Then 0Done := Not Long_Arc Or Not Is_First 8Or (End_Octant <> Start_Octant); *End {of If Has_Offset}; (Is_First := False; (S_Octant := E_Octant; &Until Done; $End {of Clip_Arc};  {$N^}   $Procedure Draw_Lines (Center_X, :Center_Y : Integer; :X_Poi4Len_Start := Max_Clockwise; 0 If Oct_End = Succ (Oct_Start) Mod 8 Then 4If (Len_Start = 0) And (Len_End = 0) Then 6Begin 8Fudge_Circle := True; 8Len_End := 1; 6End {of If (Len_Start}; 0End {of If} .Else 0Begin 2If Len_Start > Max_Counterwise Then 4Len_Start := Max_Counterwise; 0End {of Else}; .If Odd (Oct_End) Then . Begin 2If Len_End > Max_Clockwise Then 4Len_End := Max_Clockwise; 0End {of If} .Else 0Begin 2If Len_End > Max_Counterwise Then 4Len_End := Max_Counterwise; 0End {of Elnt, :Y_Point : Integer; :Octant : Integer; :Sin_Angle, :Cos_Angle : Real; :Offset : Integer); $Var Start_X_Line, (Start_Y_Line : Integer; (Normal, (X_Delta, (Y_Delta : Real; $Begin &If Abs (Cos_Angle) > Abs (Sin_Angle) Then (Normal := Abs (Cos_Angle) &Else (Normal := Abs (Sin_Angle); &Y_Delta := Sin_Angle / Normal; &X_Delta := Cos_Angle / Normal; &Case Octant Of (0 : Begin .Start_X_Line := Y_Point; .Start_Y_Line := X_Point; ,End {of 0}; (1 : Begin      se};  {$B Debug_Arcs} .Writeln ('Start Octant = ', Oct_Start, ', Length = ', Len_Start); .Writeln ('End Octant = ', Oct_End, ', Length = ', Len_End);  Writeln ('Clk = ', Max_Clockwise, ' Cntr = ', Max_Counterwise);  {$E Debug_Arcs} .If Drawing_Circle Then 0Y_End := Radius .Else 0Begin 2Enabled := CSR_Is_Enabled; 2CSR_Is_Enabled := False; 2If Odd (Oct_Start) Then 4X_Start := Len_Start 2Else 4X_Start := Len_Start - 1; 2Y_Start := GR_Y_Val (Radius, Succ (X_Start)); of With Core^}; "End {of Circle_Rel};  {$E Is_Textron-} " " " " "  {$B Is_Textron-} "Procedure Circle_Abs {X_Of_Edge, Y_Of_Edge : Point}; "Var Kill_Cursor : Boolean; &Junk, &Radius : Integer; "Begin $With Core^ Do &Begin (Radius := Round (Sqrt (Sqr (X_Of_Edge - X_CP + 0.0) + ?Sqr (Y_Of_Edge - Y_CP + 0.0))); (Kill_Cursor := (Overlay_Mode = Replace) And CSR_Is_Enabled And 7CSR_Is_Visible; (If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); (If Polygon_Edge = Solid_Line Then 2If X_Start < 0 Then 4X_Start := 0; 2If Fudge_Circle Then 4X_End := 0 2Else 4X_End := Len_End; 2Y_End := GR_Y_Val (Radius, Succ (X_End));  {$B Debug_Arcs} 2Writeln (' X_Start = ', X_Start, ' Y_Start = ', Y_Start); 2Writeln (' X_End = ', X_End, ' Y_End = ', Y_End);  {$E Debug_Arcs} 0End {of Else Drawing_Circle}; .If Result = Draw_OK Then 0GR_Arc (X_CP, Y_CP, Radius, Oct_Start, Len_Start, 8Oct_End, Len_End, Max_Counterwise, Max_Clockwise, 8Line_Style, Line_Index, Planes_On, Overlay_Mode) .E*Begin * Drawing_Circle := True; ,Arc_Rel (Radius, Deg_359, 0, Junk, Junk, Junk, Junk); ,Drawing_Circle := False; *End {of If}; (If Display_Mode = Fill Then *If Polygon_Interior = Plain Then ,GR_Fill_Circle (X_CP, Y_CP, Radius, Overlay_Mode,  X_Max) Or (X_CP - Radius < 0) Or +(Y_CP + Radius > Y_Max) Or (Y_CP - Radius < 0) Then *Draw_Result := Draw_Clipped (lse 0Clip_Arc (Radius, Oct_Start, Len_Start, Oct_End, Len_End, :Max_Clockwise, Max_Counterwise, Y_End); .If Not Drawing_Circle Then 0Begin 2First_Line := (X_End < X_Start) Or @((X_End = X_Start) And (Y_End < Y_Start)); 2If First_Line Then 4Begin 4 Draw_Lines (X_CP, Y_CP, X_Start, Y_Start, Oct_Start, BSin_Start, Cos_Start, 1); 6Bias := 2; 4End {of If} 2Else 4Bias := 1; 2Draw_Lines (X_CP, Y_CP, X_End, Y_End, Oct_End, >Sin_End, Cos_End, Bias); 2If Not First_Line Then Else *Draw_Result := Draw_OK; &End {of With Core^}; "End {of Circle_Abs};  {$E Is_Textron-}     {$B Is_Textron+} "Procedure G_Arc {X_Start, 3Y_Start, 3Radius, 3Oct_Start, 3Off_Start, 3Oct_End, 3Off_End, 3Trnc_Prm, 3Rnd_Prm : Integer};  Begin $With Core^ Do &GR_Arc (X_Start, Y_Start, Radius, Oct_Start, Off_Start, Oct_End, Off_End, .Trnc_Prm, Rnd_Prm, Line_Style, Line_Index, Planes_On, .Overlay_Mode); "End {of G_Arc};  {$E Is_Textron+}    4Draw_Lines (X_CP, Y_CP, X_Start, Y_Start, Oct_Start, @Sin_Start, Cos_Start, 3 - Bias); 2CSR_Is_Enabled := Enabled; 0End {of If Drawing_Circle}; ,End {of If Doing_Circle}; *If Kill_Cursor Then ,Draw_Cursor (Cursor_X, Cursor_Y); ( Draw_Result := Result; (End {of If Polygon_Edge}; "End {of Arc_Rel};  {$E Is_Textron-} " " " " "  {$B Is_Textron-} "Procedure Arc_Abs {Var Radius : Integer; 5Var Start_Angle, 9End_Angle : Real; 9X_Start, 9Y_Start, 9X_End, 9Y_End : Integer}; "  { Ending of Graf.Circl Include File } 8 "  $Function Angle_Calculate (Center_X, >Center_Y, >X_Edge, >Y_Edge : Integer) : Real; $Var Real_Angle : Real; $Begin &If X_Edge = Center_X Then (If Y_Edge >= Center_Y Then *Real_Angle := PI_2 (Else *Real_Angle := -PI_2 &Else (Real_Angle := Atan ((Y_Edge - Center_Y) / (X_Edge - Center_X)); &If X_Edge < Center_X Then (Real_Angle := Real_Angle + PI &Else (If Y_Edge < Center_Y Then *Real_Angle := Real_Angle + PI_x2; &Angle_Calculate := Real_Angle;  {$B Debug_Arcs} &Writeln ('Edge = (', X_Edge, ', ', Y_Edge, '), Radians = ', Real_Angle, /', Degrees = ', Round (Real_Angle * PI_180));  {$E Debug_Arcs} $End {of Angle_Calculate}; $ " "Begin {of Arc_Abs} $With Core^ Do &Begin (Radius := Round (Sqrt (Sqr (X_Start - X_CP + 0.0) + ?Sqr (Y_Start - Y_CP + 0.0))); (Start_Angle := Angle_Calculate (X_CP, Y_CP, X_Start, Y_Start); (End_Angle := Angle_Calculate (X_CP, Y_CP, X_End, Y_End); (Arc_Rel (Radius, Start_Angle, End_Angle, 3X_Start, Y_Start, X_End, Y_End); " $CURSOR $EQUAL $TAG $LAST $SYNTAX  EO.rh End {of With}; "End {of Arc_Abs};  {$E Is_Textron-} " " " " "  {$B Is_Textron-} "Procedure Circle_Rel {Radius : Point}; "Var Kill_Cursor : Boolean; " Result, &Junk : Integer; "Begin $With Core^ Do &Begin (Kill_Cursor := (Overlay_Mode = Replace) And CSR_Is_Enabled And 7CSR_Is_Visible; (If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); (Radius := Abs (Radius); (If Polygon_Edge = Solid_Line Then *Begin * Drawing_Circle := True; ,Arc_Rel (Radius, Deg_359, 0, Junk, Junk, Junk, Junk); ,Drawing_Circle := False; *End {of If}; (If Display_Mode = Fill Then *If Polygon_Interior = Plain Then ,GR_Fill_Circle (X_CP, Y_CP, Radius, Overlay_Mode,  X_Max) Or (X_CP - Radius < 0) Or +(Y_CP + Radius > Y_Max) Or (Y_CP - Radius < 0) Then *Draw_Result := Draw_Clipped (Else *Draw_Result := Draw_OK; &End {      { Beginning of Graf.Font Include File } 8 " "Procedure Set_Font {Font_Num : Font_Type}; Var Read_Words, &N_Words, &Valid_Words, &Index : Integer; &Bad_IO : Boolean; &Font_Name : String; &Font_File : File; &Font_Buff : Record 4Font_X : Integer; 4Font_Y : Integer; 4Min_Ch : Char; 4Max_Ch : Char; 4Trash : Array [0..255] Of Integer; 2End {of Font_Buff}; "Begin $If FontNum <> Core^.Font_Number Then {UOP 04 Jul 85 BD Optimization} &Begin (If Core^.Font_Number >= 0 Then *Be4If DY_Charup = 1 Then  {$E Is_Textron-} 6 6If Char_Path = Right Then 8If Top_Bottom = Top Then <  {$B Is_Textron-} :If Left_Right = Left Then FastText := Char_Spacing = 0.0;  {$E Is_Textron-} >  {$B Is_Textron+} :FastText := Left_Right = Left;  {$E Is_Textron+} > *If Fast_Text Then ,Begin .Y := Y - FontRows; .For Index := 1 To Length (The_String) Do 0Begin 2GR_Text_Fast (X, Y, @Font_Ptr^[(Ord (The_String[Index]) - JOrd (Font_Min_Chgin ,Var_Dispose (Font_Ptr, Font_Im_Size); ,Core^.Font_Number := -1; *End {of If}; (Font_Name := 'Fontxx.Font'; (Font_Name[5] := Chr (Font_Num Div 10 + Ord ('0')); (Font_Name[6] := Chr (Font_Num Mod 10 + Ord ('0'));  {$I-} Reset (Font_File, Concat (Core^.File_Prefix, ':', Font_Name)); (  {$B Is_Textron-} (Core^.Draw_Result := Draw_Not_Found;  {$E Is_Textron-} ( (If IO_Result = 0 Then *If Blockread (Font_File, Font_Buff, 1) = 1 Then ,With Font_Buff Do .Begin )) * Font_Size], @Font_Rows, Text_Index, Planes_On, @Overlay_Mode, SetMode, ClearMode); 2X := X + Font_Cols; 0End {of For}; ,End {of If Fast_Text} *Else ,Begin .X_Mag := (Char_Width + Font_Cols Div 2) Div Font_Cols; .Y_Mag := (Char_Height + Font_Rows Div 2) Div Font_Rows; .  {$B Is_Textron-} .Rotation := Text_Rotations[DX_Charup, DY_Charup]; .If (DX_Charup <> 0) = (Char_Path <= Right) Then 0Begin 2R_Length := Y_Mag * Font_Rows; 2R_Width := X_Mag * Font_Cols; 0End {of If} .Else 0Begin 0N_Words := Succ (Ord (Max_Ch) - Ord (Min_Ch)) * ;(Succ (Font_Y * ((Font_X + 7) Div 8)) Div 2); 0Font_Im_Size := Var_New (Font_Ptr, N_Words); 0If Font_Im_Size <> 0 Then 2Begin 4Bad_IO := False; 4Valid_Words := 252; 4Index := 0; 4Repeat 6If N_Words <= Valid_Words Then 8Read_Words := N_Words 6Else 8Read_Words := Valid_Words; 6Moveleft (Trash, Font_Ptr^[Index], Read_Words * 2); 6Index := Index + Read_Words; 6N_Words := N_Words - Read_Words; 6If N_Words <> 0 Then 8Bad_IO := Blockread (Font_Fil2R_Length := X_Mag * Font_Cols; 2R_Width := Y_Mag * Font_Rows; 0End {of Else}; .Spacing := Trunc (R_Length * (Char_Spacing + 1));  {$E Is_Textron-} .  {$B Is_Textron+} .R_Length := X_Mag * Font_Cols; .R_Width := Y_Mag * Font_Rows; .Spacing := R_Length;  Rotation := 2 {no rotation, left to right};  {$E Is_Textron+} . .L_Length := Pred (Length (The_String)) * Spacing; .Case Char_Path Of 0Left : Begin :Case Top_Bottom Of  1; 6Valid_Words := 256; 4Until Bad_IO Or (N_Words = 0); 4If Not Bad_IO Then 6With Core^ Do 8Begin :Font_Number := Font_Num; :Font_Cols := Font_X; :Font_Rows := Font_Y; :Font_Min_Ch := Min_Ch; :Font_Max_Ch := Max_Ch; :  {$B Is_Textron-} :Draw_Result := Draw_OK;  {$E Is_Textron-} 8 8End {of With}; 2End {of If Font_Im_Size} 0  {$B Is_Textron-} 0Else 2Core^.Draw_Result := Draw_No_Memory;  {$E Is_Textron-} , ,End {of If Blockread};  {$I^} End {of If FontNum} $ ;  Y_Max) Then = Abs (DX_Charup) Then &Begin (Core^.DX_Charup := 0; (If DY_Charup = 0 Then *Core^.DY_Charup := 1 (Else *Core^.DY_Charup := DY_Charup Div Abs (DY_Charup); &End {of If Abs} $Else &Begin (Core^.DY_Charup := 0; (Core^.DX_Charup := DX_Charup Div Abs (DX_Charup); &End {of Else Abs};:End {of Case Top_Bottom}; :Case Left_Right Of  Y_Max) Then = 0 Then (Begin  {$B Is_Textron-} *Result := Draw_OK;  {$E Is_Textron-} $ Case Left_Right Of  X_Max) Then  X_Max) Then = Font_Min_Ch) And ock} ,Begin .SetMode := D_Replace; .ClearMode := D_Replace; ,End {of If Core} *Else ,Begin .SetMode := D_On; .ClearMode := D_Off; ,End {of Else Core}; * *X := X_CP; *Y := Y_CP; *Kill_Cursor := (Overlay_Mode = Replace) And CSR_Is_Enabled 9And CSR_Is_Visible; *Font_Size := ((Font_Cols + 7) Div 8 * Font_Rows) Div 2; *FastText := False; *If Font_Cols = 8 Then ,If Char_Width = 8 Then .If Char_Height = Font_Rows Then 0If Not Kill_Cursor Then 2  {$B Is_Textron-} 2If DX_Charup = 0 Then      7(The_String[Index] <= Font_Max_Ch) Then 6Begin 8Case Char_Path Of :Left : Begin DNew_X := X - Spacing; D  {$B Is_Textron-} DDo_Char := (X + Spacing <= X_Max) And O(New_X >= -1);  {$E Is_Textron-} B BEnd {of Left}; :Right : Begin DNew_X := X + Spacing; D  {$B Is_Textron-} DDo_Char := (X >= 0) And (Pred (New_X) <= X_Max);  {$E Is_Textron-} B BEnd {of Right}; :Up : Begin DNew_Y := Y + Spacing; D  {$B Is_Textron-} DDo_Char := (Y >= 0) And (Pred (New_Y) <= Y_Max); (And (BP+AS_Color_Offset),AL (Jnz $00 (Cmpbim (BP+AS_Overlay_Mode),01H (Je $10  $00: Mov CX,(BP+AS_X_Offset) ; Calculate X coordinate global based (Mov AX,SS:X_Clip_Base (Add CX,AX (Mov (BP+AS_X_Offset),CX (Mov DX,(BP+AS_Y_Offset) ; Calculate Y coordinate global based (Mov BX,SS:Y_Clip_Base (Add DX,BX (Mov (BP+AS_Y_Offset),DX (Add AX,SS:X_Clip ; Calculate boundaries global based (Inc AX (Mov AS_X_Clip1,AX (Add BX,SS:Y_Clip  {$E Is_Textron-} B BEnd {of Up}; :Down : Begin DNew_Y := Y - Spacing; D  {$B Is_Textron-} DDo_Char := (Y + Spacing <= Y_Max) And (Y >= 0);  {$E Is_Textron-} B BEnd {of Down}; 8End {of Case}; 8  {$B Is_Textron-} 8If Do_Char Then  {$E Is_Textron-} : :GR_Text (X, Y, Font_Ptr^[(Ord (The_String[Index]) - SOrd (Font_Min_Ch)) * Font_Size], CFont_Cols, Font_Rows, X_Mag, Y_Mag, CText_Index, Planes_On, COverlay_Mode, Rotation, SetMode, ClearMode) 8  {$B Is_Textron-} 8Else :Result := Draw(Mov AS_Y_Clip,BX (Call AS_Get_Pixel ; Get the current pixel value (Mov AS_Pattern,AL ; Set up background pattern (Cmpbim (BP+AS_Overlay_Mode),00H (Jne $02 (Cmp (BP+AS_Color_Offset),AL (Je $10  $02: SetUniverse (Mov CX,(BP+AS_X_Offset) (Mov DX,(BP+AS_Y_Offset) (Mov BX,0001H " Call AS_Fill ; Fill upper half of pattern (Mov DX,(BP+AS_Y_Offset) (Mov BX,0FFFFH " Add DX,BX (Mov SI,CX (Add CX,DI ; Star_Clipped  {$E Is_Textron-} ; 8 8X := New_X; 8Y := New_Y; 6End {of If (The_String}; 2If Kill_Cursor Then 4Draw_Cursor (Cursor_X, Cursor_Y); 0End {of If Result}; ,End {of Else Fast_Text}; *  {$B Is_Textron-} *Draw_Result := Result;  {$E Is_Textron-} ( (End {of If Font_Number} &  {$B Is_Textron-} &Else (Draw_Result := Draw_No_Font;  {$E Is_Textron-} " "End {of Text};  {$N^}  { Ending of Graf.Font Include File } 8 "  t lower half at midpoint (Shr CX,1 (Call AS_Fill_0 ; Fill lower half of pattern  ResetUniverse  $10: (.ENDC (  Retl 10 " ( (.IF ~Is_Textron (  AS_Fill: ; Fill area starting at (CX,DX) in BX direction 0; Return CX as X_R and DI as X_L on first attempted row (Call AS_Left ; Go set up Last_X_L (Mov DI,AX (Call AS_Right ; Go set up Last_X_R (Mov SI,AX  AS_Fill_0: ; Fill lower half of pattern $EQUAL $CURSOR $TAG $LAST $SYNTAX a:O.諙(Push SI ; Save this for the return value  Push DI  $00: Cmp DX,SS:Y_Clip_Base ; Are we off the screen ? (Jl $30 (Mov CX,SI ; Pull X coordinate out to middle (Add CX,DI (Shr CX,1 (Call AS_Left ; Get first dot to left (Push AX (Call AS_Right (Pop CX ; Draw line between (and not including) (Call AS_Draw_Line ; CX and AX on line DX (Push AX ; Save X_R (Push AX (Push SI  ; Save Last_X_R ( (Mov AX,CX ; Is X_L - 1 > Last_X_L ? (Dec AX (Cmp AX,DI (Jle $10 (Mov SI,BX ; Yes, recurse down (Mov AX,DX (Xchg DI,CX (Call AS_Search_Fill ; Sub_Area_Fill (Last_X_L, X_L, Y, Y_Inc) (Xchg DI,CX (Jmp $18   $10: Add AX,0002H ; Is X_L + 1 < Last_X_L ? " Cmp AX,DI (Jge $18 (Mov SI,BX ; Yes, recurse back up (Neg SI (Mov AX,DX (Add AX,SI  ;  ; Beginning of 7220.Flood.Text include file  ; ( (  AS_X_Offset .Equ 12 ; Offset of starting X coordinate  AS_Y_Offset .Equ 10 ; Offset of starting Y coordinate  AS_Color_Offset .Equ 8 ; Offset of color  AS_Enabled .Equ 6 ; Offset of planes enabled  AS_Overlay_Mode .Equ 4 ; Offset of overlay mode  Read_Delay .Equ 30 ; Delay for 7220 fifo turn around  AS_Line .Block <(Call AS_Search_Fill ; Sub_Area_Fill (X_L, Last_X_L, Y - Y_Inc, -Y_Inc);   $18: Pop SI ; Restore Last_X_R (Pop AX ; Restore X_R  Push CX ; Save X_L (Mov CX,AX (Mov DI,SI ( (Inc AX ; Is X_R + 1 < Last_X_R ? (Cmp AX,DI (Jge $20 (Mov SI,BX ; Yes, recurse down (Mov AX,DX (Call AS_Search_Fill ; Sub_Area_Fill (X_R, Last_X_R, Y, Y_Inc) (Jmp $28   $20: Sub AX,0002H Pitch+Pitch>*3 ; Temp for scan line  AS_Bad_Planes .Byte ; Planes not to count on  AS_Pattern .Byte ; Current internal pattern  AS_Y_Clip .Word ; Global coordinate Y clip value  AS_X_Clip1 .Word ; Global coordinate X clip value + 1  AS_Cur_Addr .Word ; Current memory address for memory read   Area_Solid: ; Fill area between X and X' on line Y in Y_Inc direction "  ; Is X_R - 1 > Last_X_R ? " Cmp AX,DI (Jle $28 (Mov SI,BX ; Yes, recurse back up (Neg SI (Mov AX,DX (Add AX,SI (Xchg DI,CX (Call AS_Search_Fill ; Sub_Area_Fill (Last_X_R, X_R, Y - Y_Inc, -Y_Inc); (Xchg DI,CX   $28: Pop DI ; Assign new Last_X_L (Pop SI ; Assign new Last_X_R & Add DX,BX ; Adjust Y for next row (Cmp DX,AS_Y_Clip ; Has Y moved off screen ? (Jg $30 (.IF ~Is_Textron ( (Mov BP,SP ; Set up stack environment (Movbim GR_Mask_L,0FFH ; Set mask for word increments (Movbim GR_Mask_H,0FFH (Movbim GR_Text_P1,0FFH ; Set up for solid line (Movbim GR_Text_P2,0FFH (Mov CX,2 (Call GR_Text_W ; Set up pattern (Xor SI,SI ; We need a word of zeros all over here (Mov GR_V_P10,SI (Mov AL,(BP+AS_Enabled) (Not AL (Or AL,SS:Planes_Absent (And AL,07H (Mov AS_Bad_Planes,AL (Not AL      (Cmp SI,DI ; Is X_R = X_L ? (Jne $00  $30: Pop DI ; Return first X_L (Pop CX ; Return first X_R (Ret "  AS_Search_Fill: ; Fill any OFF's in search space : (CX,AX) to (DI,AX)  ; Direction contained in SI (Push BX (Push CX (Push DX (Push DI (Push SI (Push AX   $00: Inc CX ; Move to first actual position (Cmp CX,DI ; Is X_Start < X_End ? (Jge $90 (Pop DX(Mov DX,SI ; Recover X coordinate (Mov CL,DL ; Calculate initial shift (And CL,0FH  Test AS_Pattern,BL ; Is this bit ON ? (Jz $20 (Mov BX,0FFFFH ; Set mask for background color set (Not AX (BitFwd AX,CL ; Position bit for testing (Not AX (Jmp $00  $20: Xor BX,BX ; Set mask for background color clear (BitFwd AX,CL ; Position bit for testing (  $00: Cmp AX,BX ; Are ther ; Set up Y coordinate (Push DX (Push SI ; Save direction (Call AS_Get_Buffer ; Get line buffer (Mov CX,SI ; Calculate number of good bits in first word (And CL,0FH (Sub CL,10H (Neg CL (  $10: Xor AL,AL ; Construct composite image (BitFwd (BX+4),1 (Rcl AL,1 ; Capture blue bit (BitFwd (BX+2),1 (Rcl AL,1 ; Capture green bit (BitFwd (BX),1 (Rcl AL,1 ; Capture red bit e any bits in this word ? (Jne $01 (Add DX,0010H ; No, update X coordinate (And DL,0F0H (Cmp DI,DX ; Are we out of screen ? (Jbe AS_Scan_Done  Call GR_Read_Word ; Fetch next word (Jmp $00 (  $02: Inc DX ; Count up one pixel  $01: BitFwd AX,1 ; Get low order bit into carry (Rcr BX,1 (Jno $02 ; Is this bit different ? (Cmp DI,DX ; Set up comparison  AS_Scan_Done: (Cmp AL,AS_Pattern ; Is it what we're looking for ? (Je $20 (Inc SI ; No, move to next coordinate (Cmp SI,DI ; Have we run out of our limit ? (Jge $80 (Dec CL ; We have one less bit (Jnz $10 (Mov CL,10H ; Set up new bit count (Add BX,0006H ; Move to new word (Jmp $10 ; Go another round   $20: Pop BX ; Recover Y_Inc (Pop DX (Push DX ; Recover Y (Pu(Jge $10 ; Should we switch ? (Mov DX,DI ; Yes, we went under, use mimimum  $10: (.IF ~Is_APC_III (Cmp GR_V_P2,0000H ; Are there any bytes left to read ? (Jz AS_Ret  $12: In AL,GR_Status (Test AL,02H ; Is the fifo full of data ? (Jnz AS_Ret (Call GR_Read_Word (Jnz $12 (.ENDC (  AS_Ret: (.IF Is_APC_III  Addbim GR_Ead+1,40H ; Set up for next color plane (.ELSE (Incmb GR_Dad ; Set up fosh DI ; Save X_End (Push BX ; Save Y_Inc (Mov CX,SI ; Set up X coordinate (Call AS_Fill ; Area_Fill (X, Y, Y_Inc); -- Return next X (Pop SI ; Recover Y_Inc (Pop DI ; Restore X_Start and X_End (Jmp $00 (  $80: Pop AX ; Trash out extra Y_Inc  $90: Pop AX (Pop SI (Pop DI (Pop DX (Pop CX (Pop BX (Ret  r next color plane (.ENDC (Ret (   AS_Scan_Left: ; Scan to the left from SI until we find a dot that is not ON 0; Scan no further than DX, Return X coordinate in DX (Test AS_Bad_Planes,BL ; Can we draw this plane ? (Jnz AS_Ret (Cmp SI,DX ; Yes, should we scan at all ? (Je AS_Ret (Mov AL,06H ; Set direction backward (Mov CX,Pitch ; Set maximum count (Call AS_Read_Start ; Start up read and set up X and limit  AS_Right: ; Scan to the right starting at (CX, DX) for a dot that's not AX 0; Return new X in AX (Push SI (Push DI (Push BX (Push CX (Push DX (Mov SI,CX ; Hold on to starting X coordinate (And CL,0F0H ; Use word aligned address (Call GR_Raw_CV ; Convert to screen coordinates (Mov GR_Ead,DX ; Save address in plane 0 (Mov GR_Dad,CL (Mov DX,AS_X_Clip1 ; Get upper bound for search (Mov BL,02H (Call AS_Scan_Right (Mov DI,DX ; Get search end (Mov DX,SI ; Recover X coordinate (Mov CL,DL ; Calculate initial shift 15 - X Mod 16 (Sub CL,0FH (Neg CL (And CL,0FH (Test AS_Pattern,BL ; Is this bit ON ? (Jz $20 (Mov BX,0FFFFH ; Set mask for background color set (Not AX (BitBwd AX,CL ; Position bit for testing (Not AX (Jmp $00  $20: Xor BX,BX ; Set mask for background color clear (BitBwd AX,CL  ; Scan green plane (Mov BL,04H (Call AS_Scan_Right ; Scan blue plane (Mov BL,01H (Call AS_Scan_Right ; Scan red plane (Mov AX,DX (Pop DX (Pop CX (Pop BX (Pop DI (Pop SI (Ret    AS_Left: ; Scan to the left starting at (CX, DX) for a dot that's ON 0; Return new X in AX (Push SI (Push DI (Push BX (Push CX (Push DX (Mov SI,CX ; Hold on to starting X coordinate  ; Position bit for testing (  $00: Cmp AX,BX ; Are there any bits different in this word ? (Jne $01 (And DL,0F0H ; No, update X coordinate (Sub DX,0010H (Or DL,0FH (Cmp DX,DI ; Are we out of screen ? (Jle AS_Scan_Done  Call GR_Read_Word ; Fetch next word (Jmp $00 (  $02: Dec DX ; Count up one pixel  $01: BitBwd AX,1 ; Get high order bit into carry (Rcr BX,1 (And CL,0F0H ; Use word aligned address (Call GR_Raw_CV ; Convert to screen coordinates (Mov GR_Ead,DX ; Save address in plane 0 (Mov GR_Dad,CL (Mov DX,SS:X_Clip_Base ; Get lower bound for search (Dec DX (Mov BL,02H (Call AS_Scan_Left ; Scan green plane (Mov BL,04H (Call AS_Scan_Left ; Scan blue plane (Mov BL,01H (Call AS_Scan_Left ; Scan red plane (Mov AX,DX (Pop DX (Pop CX (Pop BX (Pop DI (Pop (Jno $02 ; Is this bit different ? (Cmp DX,DI ; Set up comparison (Jmp AS_Scan_Done (   AS_Get_Pixel: ; Read pixel at (CX, DX), return in AL (Mov DI,CX ; Go only as far as one pixel (Call AS_Get_Buffer ; Get first pixel for background comparisons (Xor AL,AL ; Construct composite image (BitFwd (BX+4),1 (Rcl AL,1 ; Capture blue bit (BitFwd (BX+2),1 (Rcl AL,1 ; Capture green bit (BitFwd (BX),1  SI  Ret    AS_Scan_Right: ; Scan to the right from SI until we find a dot that is not ON 0; Scan no further than DX, Return X coordinate in DX (Test AS_Bad_Planes,BL ; Can we draw this plane ? (Jnz AS_Ret (Cmp SI,DX ; Yes, should we scan at all ? (Je AS_Ret (Mov AL,02H ; Set direction forward (Mov CX,Pitch ; Set maximum count (Call AS_Read_Start ; Start up read and set up X and limit (Mov DI,DX ; Get search end      (Rcl AL,1 ; Capture red bit  Ret ( (  AS_Get_Buffer: ; Get line into AS_Line buffer from (CX, DX) to (DI, DX) 0; Return X coordinate in SI, buffer pointer in BX (Mov SI,CX (Call GR_Raw_CV ; Set up starting coordinates (Mov GR_Ead,DX (Mov GR_Dad,CL (Lea BX,AS_Line+2 ; Get green image (Testbim AS_Bad_Planes,02H ; Can we draw in the green plane ? (Call AS_Read_Line (Lea BX,AS_Line+4 ; Get blue image sh AX (Push BX (Push CX (Push DX (Inc CX ; Move to starting position (Movbim GR_V_P1,0AH ; Set up line vector (Sub AX,CX ; Calculate line length (Dec AX (Js $10 ; Is there any line to draw ? (Mov GR_V_P2,AX (Neg AX (Mov GR_V_P4,AX (Shl AX,1 (Mov GR_V_P6,AX (Mov GR_V_P8,0000H ( (Call GR_Raw_CV ; Set up cursor position command (Mov GR_Ead,DX (Mov GR_Dad,CL (Testbim AS_Bad_Planes,04H ; Can we draw in the green plane ? (Call AS_Read_Line (Lea BX,AS_Line ; Get red image (Testbim AS_Bad_Planes,01H ; Can we draw in the green plane ? (Call AS_Read_Line (Lea BX,AS_Line  Ret (  AS_Read_Line: ; Read a scan line between SI and DI into buffer BX 0; Clear buffer to zeros if NZ 0 (Pushf ; Save Zero flag until length is known (Mov AX,SI ; Calculate pixel count (And AL,0F0H ; Word align a(Mov AH,(BP+AS_Color_Offset) ; Get Ramtek colors (Mov AL,(BP+AS_Enabled) (Lea BX,Color_Table ; Derive NEC colors (Xlat  Xchg AH,AL (Xlat   $05: Shr AH,1 ; Can we even draw in this plane ? (Jc $09  Shr AL,1 ; No, junk this color bit (Jmp $08  $09: Shr AL,1 ; Get low order bit into Carry (Push AX (Mov BL,(BP+AS_Overlay_Mode) ; Set up for overlay mode (Jc $04 ; Should a color be dddress (Sub AX,DI (Neg AX (Add AX,0010H ; Convert to a word count (Mov CL,04H (Shr AX,CL (Mov CX,AX (Popf ; Should we fill zeros instead ? (Jnz $20 (Push AX (Mov AL,02H ; Set direction forward  Call AS_Read_Start ; Start up read and return first word in AX  Mov CX,SI ; Shift word appropriately (And CL,0FH (BitFwd AX,CL (Pop CX rawn ? (Or BL,BL ; No, is this replace mode ? (Jnz $06 (Mov BL,02H ; Yes, set mode to clear  $04: Call GR_Mode ; Set up overlay mode (Call GR_CSR_R ; Set cursor in plane (Mov CX,0BH ; Declare vector parameters (Call GR_Vect_W (Call GR_Vect_E ; Execute vector  $06: Pop AX  $08: (.IF Is_APC_III (Addbim GR_Ead+1,40H ; Move to next plane (.ELSE  $00: Mov (BX),AX ; Store word in buffer (Dec CX ; Count down words (Jz $10 (Add BX,0006H ; Move to next location in buffer (Call GR_Read_Word ; Get next word (Jmp $00  $20: Xor AX,AX ; Clear out buffer, no plane here  $21: Mov (BX),AX (Add BX,0006H (Loop $21  $10: (.IF Is_APC_III (Addbim GR_Ead+1,40H ; Move on to next plane (.ELSE  Incmb GR_Dad ; Move on to next plane (.E Incmb GR_Dad ; Move to next plane (.ENDC ( (Cmp AL,01H ; Are there more planes left ? (Jnz $05   $10: Pop DX (Pop CX (Pop BX (Pop AX (Ret  .ENDC   ;  ; End of 7220.Flood.Text include file  ; NDC ( (Ret ( (  AS_Read_Start: ; Start read in direction AL, maximum words in CX, limit in DI 0; Return word in AX (Mov GR_V_P2,CX ; Set up vector word count parameter (Mov GR_V_P1,AL ; Set up direction and mode ( (.IF Is_APC_III ( (Cld (Test AL,4 ; Is this a backward read? (Jz $20 (Std ; Yes, setup a backward read  $20: Mov AX,GR_Ead ; Get graphics address (Mov CX,AX (And CX,3FFFH ; Isolate word address (Shl CX,1 ; Convert to byte address (Mov AS_Cur_Addr,CX (And AX,0C000H ; Isolate plane address (Shr AH,1 ; Construct memory segment address (Shr AH,1 (Shr AH,1 (Or AH,0A0H (Mov ES,AX ; Setup segment for addressing (Call GR_Wait ; Wait until 7220 is finished with last draw ( (.ELSE ( (Push BX (Call GR_CSR_R ; Position cursor (Call GR_Mask ; $EQUAL $CURSOR $TAG $LAST $SYNTAX  >22[O.#@Set up mask for word increments (Mov CX,0003H (Call GR_Vect_W ; Issue vector (mode and word count) (Call GR_Read ; Start read  Pop BX  (.ENDC   GR_Read_Word: ; Read word from GDC and return in AX ( (.IF Is_APC_III ( (Push SI (Mov SI,AS_Cur_Addr ; Get current graphics word address (Lodsw AX,ES:(SI) (Xchg AH,AL (Mov AS_Cur_Addr,SI ; Save it away for next time (Pop SI ( (.ELSE ( (In AL,GR_Status (Test AL,01H ; Is read data ready ? (Jz GR_Read_Word (In AL,GR_R_Data ; Yes, get low order data byte (Mov AH,AL ; Save low order byte  $01: In AL,GR_Status (Test AL,01H ; Is high byte ready ? (Jz $01 (In AL,GR_R_Data ; Get high byte (Xchg AL,AH ; Set word correctly ( (.ENDC ( (Dec GR_V_P2 ; Another word bytes the dust (Ret (  AS_Draw_Line: ; Draw a line between CX+1 and AX-1 on the DX line (Pu     ;  ; Beginning of 7220.Misc Include File  ;   Rec_Offset .Equ 4 ; Offset of pointer to init record  GL_X_Size .Equ 0 ; Offset in record of global X size  GL_Y_Size .Equ 2 ; Offset in record of global Y size  Win_X_Size .Equ 4 ; Offset in record of window X size  Win_Y_Size .Equ 6 ; Offset in record of window Y size  Planes .Equ 8 ; Offset in record of planes ena U_Draw .Equ 4 ; Offset of page to draw  Universe: ; Set the draw and display pages  (.IF Is_APC_III ( (Mov BP,SP ; Set up stack environment (Mov AL,(BP+U_Draw) ; Get page to draw (Mov SS:Cur_Draw_Page,AL ( (.ENDC ( (Retl 4       Reg_X_Start .Equ 10 ; Offset of X_Start parameter  Reg_Y_Start .Equ 8 ; Offset of Y_Start parameter  Reg_X_Length .Equ 6 ; Ofbled  Win_X_Res .Equ 10 ; Offset in record of window X res  Win_Y_Res .Equ 12 ; Offset in record of window Y res  N_Universes .Equ 14 ; Offset in record of universe count   Init: ; Initialize 7220, clear display RAM, and start displaying (Xor AX,AX ; Set up .Privates (Mov SS:X_Clip_Base,AX (Mov SS:Y_Clip_Base,AX (Mov SS:Cur_Draw_Page,AX (Mov SS:X_Clip, (Mov SS:Y_Clip, ( fset of X_Length parameter  Reg_Y_Length .Equ 4 ; Offset of Y_Length parameter   Region: ; Set region variables  (.IF ~Is_Textron ( (Mov BP,SP ; Establish stack addressing (Mov AX,(BP+Reg_X_Start) ; Get global X coordinate (Mov SS:X_Clip_Base,AX (Mov AX,(BP+Reg_Y_Start) ; Get global Y coordinate (Mov SS:Y_Clip_Base,AX (Mov AX,(BP+Reg_X_Length) ; Calculate maximum X value (Dec AX (.IF Is_APC_III ( (Xor AL,AL ; Pretend that all planes are available (Mov BX,2 ; There are two display pages ( (.ELSE ( (Mov AL,Reset_Cmd ; Reset 7220 (Out GR_Cmd,AL ( (Mov AL,01H ; Enable graphics board (Out 76H,AL (Mov AL,08H (Out 46H,AL ( (Call GR_GDC_C1 ; Synchronize with text controller (Mov AL,Slv_Cmd (Out GR_Cmd,AL ( (Mov CX,8 ; Syncronize horizontally and vertically (Lea BX,D(Mov SS:X_Clip,AX (Mov AX,(BP+Reg_Y_Length) ; Calculate maximum Y value (Dec AX (Mov SS:Y_Clip,AX ( (.ENDC ( (Retl 08   W_Win_Num .Equ 12 ; Offset of window number  W_Win_X_Org .Equ 10 ; Offset of window X coordinate  W_Win_Y_Org .Equ 8 ; Offset of window Y coordinate  W_X_Size .Equ 6 ; Offset of window X size  W_Y_Size .Equ 4 ; Offset of window Y size   WinA_Sync (Call GRM_Out ( (Mov CX,1 ; Set up horizontal dot spacing (Lea BX,DA_Pitch (Call GRM_Out ( (Mov CX,1 ; Set up zoom factor (Lea BX,DA_Zoom (Call GRM_Out ( (Mov CX,3 ; Initialize cursor form (Lea BX,DA_CSR_Form (Call GRM_Out ( (Call GR_Scroll ; Set up window parameters ( (Xor AX,AX (Push AX ; Set up starting X (Push AX ; Set up starting Y dow: ; Define a viewing window ( (.IF ~Is_Textron ( (Mov BP,SP ; Establish stack environment (Mov CX,(BP+W_Win_X_Org) ; Get coordinates of lower left corner (Mov DX,(BP+W_Win_Y_Org) (Mov DI,(BP+W_Y_Size) ; Compute upper left corner (Add DX,DI (Dec DX (Call GR_Raw_CV ; Compute memory address (Lea BX,GR_Sad_1 ; Compute table address (Mov SI,(BP+W_Win_Num) (Shl SI,1 (Shl SI,1 (Mov BX,Glob_X ; Set X length of full screen (Push BX (Mov BX,Glob_Y ; Set Y length of full memory (Push BX (Push AX ; Clear all colors (Mov BX,0007H ; Clear all planes (Push BX (Push AX ; Move in replace mode (Push CS (Call Clear ; Clear out RAM ( (Mov CX,0002H ; Wait for two vertical sync periods $02: In AL,GR_Status ; Wait until vertical sync is up (Test AL,20H (Jz $02  $03(Mov (SI)(BX),DX ; Save starting address (Mov CL,04H ; Position row count (Shl DI,CL (Mov (SI)(BX+2),DI (Call GR_Scroll ; Register new window parameters ( (.ENDC ( (Retl 10 ( (   TF_X_Start .Equ 20 ; Offset of X_Start parameter  TF_Y_Start .Equ 18 ; Offset of Y_Start parameter  TF_Pattern .Equ 16 ; Offset of Pattern pointer parameter  TF_Row .Equ 14 : In AL,GR_Status ; Ok, now wait until it is down (Test AL,20H (Jnz $03 (Loop $02 ( (Call GR_GDC_C1 ; Start display (Mov AL,Start_Cmd (Out GR_Cmd,AL ( (Xor CX,CX ; Find out which planes are REALLY there (Xor DX,DX (Mov SS:Planes_Absent,CL (Call AS_Get_Pixel (Mov BX,1 ; There is one display page ( (.ENDC ( (Mov SS:Planes_Absent,AL ( (Mov BP,SP ; Establish stack addressing  ; Offset of Pattern rows parameter  TF_Color .Equ 12 ; Offset of Color parameter  TF_Enabled .Equ 10 ; Offset of Planes enabled parameter  TF_Overlay .Equ 8 ; Offset of Overlay parameter  TF_SetMode .Equ 6 ; Offset of SetMode parameter  TF_ClearMode .Equ 4 ; Offset of ClearMode parameter   TextFast: ; Draw a pattern at a given set of coordinates, assuming pattern (Mov BP,(BP+Rec_Offset) ; Get pointer to initialization record (Mov (BP+GL_X_Size),Glob_X (Mov (BP+GL_Y_Size),Glob_Y (Mov (BP+Win_X_Size),Win_X (Mov (BP+Win_Y_Size),Win_Y (Xor AL,07H ; Invert so active planes are represented (Xor AH,AH ; Clear out upper byte (Mov (BP+Planes),AX (Mov AL,01H ; Set up Y resolution  Mov (BP+Win_Y_Res),AX (Mov AL,10H ; Set up X resolution (Mov (BP+Win_X_Res),AX  Mov ( ; is 8 columns wide, right-side up (Mov BP,SP ; Set up parameter addressing environment (Movbim GR_V_P1,12H ; Set block draw mode, no rotation into vector (Mov GR_V_P4,08 ; Setup D := number of columns (Mov GR_V_P6,08 ; Setup D2 := number of columns ( (SetUniverse (Mov AX,CS (Mov ES,AX (Mov BX,(BP+TF_Row) ; Get number of rows left (Mov SI,(BP+TF_Pattern) ; Get pointer to pattern (  TF_More: (Or BX,BX ; Are there any (BP+N_Universes),BX  (Retl 02   Start: ; Start up video display (Call GR_GDC_C1 ; Wait for fifo empty (Mov AL,Start_Cmd (Out GR_Cmd,AL ; Start display (Retl ( (  Stop: ; Shut down video display (Call GR_GDC_C1 ; Wait for fifo empty (Mov AL,Stop_Cmd (Out GR_Cmd,AL ; Stop display (Retl ( (  U_Display .Equ 6 ; Offset of page to display       rows left ? (Jnz $00 (Jmp TF_Done   $00: Mov CX,8 ; Yes, setup maximum number of rows, this pass (Lea DI,GR_Text_P8 ; Set display address  $01: Cld (Lodsb SS:(SI) (Std (Stosb (Dec BX ; Count down a row (Loopnz $01 ; Are we out of source or destination rows? (Mov (BP+TF_Row),BX ; Yes, update source pattern rows counter ( (Xor CX,7 ; Calculate number of rows - 1 (7 - CH) environment ( (Mov AL,(BP+T_Row) ; Get pattern height - 1 in case we need it (Mul AL,(BP+T_Mag_Y) (Dec AX (Js $06 ; Is there any pattern to worry about ? (Mov BX,AX (Mov AL,(BP+T_Col) ; Get pattern width - 1 in case we need it (Mul AL,(BP+T_Mag_X) (Dec AX (Jns $01 ; Is there any pattern to worry about ?  $06: Jmp Text_Done  $01: Mov CL,(BP+T_Dir) ; Get rotation direction (either 0, 2, 4, or 6) (Mov GR_V_P2,CX ; Setup DC := number of rows - 1 ( (Mov P_Last,0000H ; Clear out last pattern pointer (Mov CX,(BP+TF_X_Start) ; Get working coordinate (Mov DX,(BP+TF_Y_Start) ; Get Y-coordinate (Call GR_XY_CV ; Set up cursor position command (Mov GR_Ead,DX (Mov GR_Dad,CL ( (Mov AH,(BP+TF_Color) ; Get Ramtek colors (Mov AL,(BP+TF_Enabled) (Lea BX,Color_Table ; Derive NEC colors (Xlat  Xchg AH,AL (Xlat   $05: Shr AH,1 (And CL,06H ; Just in case (Or CL,10H ; Include character drawing bit (Mov GR_V_P1,CL ; Set into vector (Jp $02 ; Is the direction either 0 or 6 ? (Test CL,06H ; Yes, is it 6 ? (Jz $05 (Add (BP+T_Y_Start),BX ; Yes (Jmp $02  $05: Add (BP+T_Y_Start),AX ; No  $02: Test CL,04H ; Is direction either 4 or 6 ? (Jz $04 (Test CL,02H ; Yes, is it 6 ? (Jz $03 (Mov BX,AX  $03:  ; Should we even draw this plane ? (Jc $17 (Shr AL,1 ; No, trash this color bit (Jmp $18  $17: Lea DI,GR_Text_W ; Assume we are using the pattern we have built (Mov BL,(BP+TF_Overlay) (Shr AL,1 ; Get low order bit into Carry (Push AX (Jc $16 ; Should a color be drawn ? (Or BL,BL (Jnz $15 ; No, but is this replace mode ? (Mov BL,(BP+TF_ClearMode) ; Yes, use CLEAR mode Add (BP+T_X_Start),BX ; Start over on the right somewhere  $04: Movbim P_Row_Pos,00H ; Set pattern row position (Mov AL,(BP+T_Mag_Y) ; Set Y-magnification counter (Mov Mag_Y_T,AL  SetUniverse (  Text_Band: (Mov AX,(BP+T_X_Start) ; Set working coordinate in X direction (Testbim GR_V_P1,02H ; Is direction actually 0 or 4 ? (Jnz $01 (Mov AX,(BP+T_Y_Start) ; Yes, make working coordinate Y  $01: Mov X_T,AX  Or BL,BL (Jnz $06 ; Are we clearing only what we are writing? (Lea DI,GR_Text_Zeros; No, clear entire block (Jmp $06 (  $16: Or BL,BL ; Is this replace mode ? (Jnz $06 (Mov BL,(BP+TF_SetMode) ; Yes, use SET mode instead  $06: Call GR_Mode ; Set up overlay mode (Cmp DI,P_Last ; Is the pattern already loaded ? (Mov P_Last,DI (Je $08 (Mov CX,8 (Call DI ; Write pattern to paramete(Movbim P_Col_Pos,00H ; Set pattern column position (Mov AL,(BP+T_Mag_X) ; Set X-magnification counter (Mov Mag_X_T,AL   Text_Block:  Mov CH,08H ; Set display row (Lea DI,GR_Text_P8 ; Set display address (Mov AL,Mag_Y_T ; Set working Y-magnification counter (Mov Mag_Y_TT,AL (Mov AL,P_Row_Pos ; Set working row position (Mov P_Row_Pos_T,AL (Mov SI,(BP+T_Pattern) ; Get pointer to pattern (  Text_Row: (Mov DL,Mag_X_T ; Ser RAM   $08: Call GR_CSR_R ; Set cursor to (X_Start, Y_Start) in plane (Mov CX,7 ; Declare vector parameters (Call GR_Vect_W (Call GR_Text_E ; Execute vector (  $15: Pop AX  $18: (.IF Is_APC_III (Addbim GR_Ead+1,40H  .ELSE  Incmb GR_Dad ; Move to next plane (.ENDC ( (Cmp AL,1 ; Are there more planes left ? (Jnz $05 ( (Add (BP+TF_Y_Start),8 ; Go no next Y coordinate t working X-magnification counter (Mov AH,08H ; Set display column (Mov DH,P_Col_Pos ; Get working column position (Mov BL,DH ; Move working pattern pointer to right column (Shr BL,1 (Shr BL,1 (Shr BL,1 (Xor BH,BH (Add BX,SI (Jmp Text_Byte_New ; Go set up pattern byte   Text_Col: (Test DH,07H ; Is the column now byte aligned ? (Jnz Text_New_Bit (Cmp DL,(BP+T_Mag_X) ; Yes, is this the first repitition ? (And GR_Ead+1,3FH ( (Mov BX,(BP+TF_Row) ; Do we have more rows ? (Jmp TF_More (  TF_Done: (ResetUniverse (Retl 18 ( ( (   T_X_Start .Equ 28 ; Offset of X_Start parameter  T_Y_Start .Equ 26 ; Offset of Y_Start parameter  T_Pattern .Equ 24 ; Offset of Pattern pointer parameter  T_Col .Equ 22 ; Offset of Pattern columns parameter  T_Row .Equ 20 ; Offset of Pat(Jnz Text_New_Bit   Text_Byte_New:  Mov AL,SS:(BX) ; Yes, load a new pattern byte (Inc BX (Mov CL,DH ; Get column position (And CL,07H ; Prepare to shift pattern byte into position (Shr AL,CL  Text_New_Bit: (Test AL,01H ; Put low order bit of pattern into carry (Jz $01 (Stc  $01: Rcrmb (DI),1 ; Shift into display image (Dec DL ; Decrement working X-magnification counter (Jnz $04 tern rows parameter  T_Mag_X .Equ 18 ; Offset of X-magnification parameter  T_Mag_Y .Equ 16 ; Offset of Y-magnification parameter  T_Color .Equ 14 ; Offset of Color parameter  T_Enabled .Equ 12 ; Offset of Planes enabled parameter  T_Overlay .Equ 10 ; Offset of Overlay parameter  T_Dir .Equ 8 ; Offset of Direction parameter  ; Should we get a new bit next time ? (Shr AL,1 ; Yes, set up next bit (Inc DH ; Move working column counter (Mov DL,(BP+T_Mag_X) ; Reset working X-magnification counter  $04: Dec AH ; Decrement display column number (Jz $02 ; Is the display buffer byte full ? (Cmp DH,(BP+T_Col) ; No, is this the last column of pattern ? (Jnz Text_Col  $02: Mov CL,AH ; Yes, finish shifting display pattern T_SetMode .Equ 6 ; Offset of SetMode parameter  T_ClearMode .Equ 4 ; Offset of ClearMode parameter  P_Row_Pos .Byte 00H P_Row_Pos_T .Byte 00H  P_Col_Pos .Byte 00H  Mag_Y_T .Byte 00H Mag_Y_TT .Byte 00H Mag_X_T .Byte 00H  X_T .Word 00H  P_Last .Word 00H  Text: ; Draw a pattern at a given set of coordinates with magnification (Mov BP,SP ; Set up parameter addressing      (Shrmb (DI),CL (Dec DI ; No, go to new display row (Decmb Mag_Y_TT ; Decrement working Y-magnification counter (Jnz $07 ; Should we move to a new pattern row ? ( (Incmb P_Row_Pos_T ; Yes, bump working pattern row number (Mov CL,(BP+T_Mag_Y) ; Reset working Y-magnification counter (Mov Mag_Y_TT,CL (Mov BL,(BP+T_Col) ; Get number of columns in pattern (Add BL,07H ; Calculate number of bytes in pattern row (Shr BL,1 (S(Mov AX,0008H (Cmpbim GR_V_P1,14H ; Is direction 4 or 6 ? (Jb $12 (Neg AX ; Yes, we are decrementing our position  $12: Testbim GR_V_P1,02H ; Is direction 2 or 6 ? (Jnz $13 (Add (BP+T_X_Start),AX ; Yes, go to next X coordinate (Jmp $14  $13: Add (BP+T_Y_Start),AX ; Go no next Y coordinate  $14: Mov CL,P_Row_Pos_T ; Update real pattern row number  Mov P_Row_Pos,CL (Cmp CL,(BP+T_Row) ; Do we have more rows of blockshr BL,1 (Shr BL,1 (Xor BH,BH (Add SI,BX ; Move pattern pointer to next row (  $07: Dec CH ; Decrement display row counter (Jz $03 ; Is this the last row of the display buffer ? (Mov CL,P_Row_Pos_T ; No, is this the last row of pattern ? (Cmp CL,(BP+T_Row) (Je $03  Jmp Text_Row  $03: Mov P_Col_Pos,DH ; Yes, update real column position (Mov Mag_X_T,DL ; Update real X-magnification counter  ? (Je $90 (Jmp Text_Band  $90: ResetUniverse   Text_Done: (Retl 1AH    L_X_Start .Equ 18 ; Offset of X_Start parameter  L_Y_Start .Equ 16 ; Offset of Y_Start parameter  L_X_Length .Equ 14 ; Offset of X_Length parameter  L_Y_Length .Equ 12 ; Offset of Y_Length parameter  L_Pattern .Equ 10 ; Offset of Pattern parameter ( (Mov AL,08H ; Calculate number of columns (8 - AH) (Sub AL,AH (Xor AH,AH (Mov GR_V_P4,AX ; Setup D := number of columns (Mov GR_V_P6,AX ; Setup D2 := number of columns ( (Mov CL,07H ; Calculate number of rows - 1 (7 - CH) (Sub CL,CH (Xor CH,CH (Mov GR_V_P2,CX ; Setup DC := number of rows - 1 ( (Mov P_Last,0000H ; Clear out last pattern pointer (Mov CX,X_T ; Get working coordinate (Mov DX,(BP+T_Y_St L_Color .Equ 8 ; Offset of Color parameter  L_Enabled .Equ 6 ; Offset of Planes enabled parameter  L_Overlay .Equ 4 ; Offset of Overlay parameter  Line: ; Draw a line according to the parameters on the stack   Mov BP,SP ; Set up stack addressing ( (Mov AX,(BP+L_Y_Start) (Mov BX,(BP+L_X_Start) (Mov DX,(BP+L_X_Length) (Mov CX,(BP+L_Y_Length) (Xor AL,AL ; Clear direction art) ; Get Y-coordinate (Testbim GR_V_P1,02H ; Is direction actually 0 or 4 ? (Jnz $09 (Mov DX,(BP+T_X_Start) ; Yes, the working coordinate is Y, get X  Xchg CX,DX ; Set up X and Y for cursor positioning  $09: Call GR_XY_CV ; Set up cursor position command (Mov GR_Ead,DX (Mov GR_Dad,CL (Mov AH,(BP+T_Color) ; Get Ramtek colors (Mov AL,(BP+T_Enabled) (Lea BX,Color_Table ; Derive NEC colors (Xlat  Xchg AH,AL (Xlat  (Or DX,DX ; Is X' < 0 ? (Jns $01 (Neg DX ; Yes, take absolute value (Or AL,04H ; Refine direction  $01: Or CX,CX ; Is Y' < 0 ? (Jns $02 (Neg CX ; Yes, take absolute value (Or AL,02H ; Refine direction further  $02: Cmp DX,CX ; Is |X'| < |Y'| ? (Jae $03 (Xchg DX,CX ; Exchange places for further calculations Inc AL   $05: Shr AH,1 ; Should we even draw this plane ? (Jc $17 (Shr AL,1 ; No, trash this color bit (Jmp $18  $17: Lea DI,GR_Text_W ; Assume we are using the pattern we have built (Mov BL,(BP+T_Overlay) (Shr AL,1 ; Get low order bit into Carry (Push AX (Jc $16 ; Should a color be drawn ? (Or BL,BL (Jnz $15 ; No, but is this replace mode ? (Mov BL,(BP+T_ClearMode) ; Yes, use C $03: Lea BX,Line_Dir_Table ; Translate to appropriate direction (Xlat (Or AL,08H ; Draw a line (Mov GR_V_P1,AL ; Setup direction (Mov AX,DX (Mov GR_V_P2,AX ; Setup DC := |X'| (Mov BX,CX ; Save Y' (Or CX,AX ; Set DX, CX <> 0 if either X' or Y' <> 0 (Mov DX,CX (Shl BX,1 (Mov GR_V_P8,BX ; Setup D1 := 2 x |Y'| (Mov GR_V_P4,BX (Sub GR_V_P4,AX ; Setup D := 2 x |Y'| - |X'| (Shl AX,1 (Sub BXLEAR mode  Or BL,BL (Jnz $06 ; Are we clearing only what we are writing? (Lea DI,GR_Text_Zeros; No, clear entire block (Jmp $06 (  $16: Or BL,BL ; Is this replace mode ? (Jnz $06 (Mov BL,(BP+T_SetMode) ; Yes, use SET mode instead  $06: Call GR_Mode ; Set up overlay mode (Cmp DI,P_Last ; Is the pattern already loaded ? (Mov P_Last,DI (Je $08 (Mov CX,8 ,AX (Mov GR_V_P6,BX ; Setup D2 := 2 x |Y'| - 2 x |X'| ( (Jmp B_L_Draw ; Go draw line   ;  ; End of 7220.Misc Include File  ;  (Call DI ; Write pattern to parameter RAM   $08: Call GR_CSR_R ; Set cursor to (X_Start, Y_Start) in plane (Mov CX,07H ; Declare vector parameters (Call GR_Vect_W (Call GR_Text_E ; Execute vector (  $15: Pop AX  $18: (.IF Is_APC_III (Addbim GR_Ead+1,40H  .ELSE  Incmb GR_Dad ; Move to next plane (.ENDC ( (Cmp AL,01H ; Are there more planes left ? (Jnz $05 ( (Testbim GR_V_P1,01$CURSOR $EQUAL $TAG $LAST $SYNTAX  O.R*6H ; Is the direction 2 or 4 ? (Jnp $10 (Add X_T,0008H ; Yes, position on screen out for next block (Jmp $11  $10: Sub X_T,0008H ; No, move new position in for next block  $11: Mov CL,P_Col_Pos ; Is this the last of the pattern row ? (Cmp CL,(BP+T_Col) (Jz $99 (Jmp Text_Block  $99: Mov (BP+T_Pattern),SI ; Update pattern ptr for next group of blocks (Mov CL,Mag_Y_TT ; Update real Y-magnification counter (Mov Mag_Y_T,CL       BX,CX ; Yes, adjust length of draw (Xor CX,CX ; Jam start of draw to left border  $30: Mov AX,SS:X_Clip ; Check for clipping on right side (Sub AX,BX ; Must we ? (Sub AX,CX (Jns $31 (Add BX,AX ; Yes, adjust length accordingly  $31: Mov GR_V_P2,BX ; Setup DC := |X'| (Neg BX (Mov GR_V_P4,BX ; Setup D := 2 * |Y'| - |X'| (Shl BX,1 (Mov GR_V_P6,BX ; Setup D2 := 2 x (|Y'| - |X'|)  ;  ; Beginning of 7220.Circl Include File  ;   FC_X .Equ 14 ; Offset of X center coordinate  FC_Y .Equ 12 ; Offset of Y center coordinate  FC_Radius .Equ 10 ; Offset of circle radius  FC_Overlay .Equ 8 ; Offset of overlay mode  FC_Color .Equ 6 ; Offset of filling color  FC_Enabled .Equ 4 ; Offset of planes enabled   FC_Last_Y .Word   Cir_Fill(Movbim GR_V_P1,0AH ; Set direction for down to up (Mov DX,(BP+FC_Y) ; Get center Y coordinate (Add DX,DI ; Calculate Center Y + Edge Y (Cmp DX,SS:Y_Clip ; Are we out of the region entirely ? (Jg $32 (Push CX ; Save starting X for later (Call FC_Draw ; Go draw top filling line (Pop CX (  $32: Mov DX,(BP+FC_Y) ; Calculate Center Y - Edge Y  Sub DX,DI (Js $33 ; Are we out of the region entir: ; Fill a circle solid ( (.IF ~Is_Textron ( (Mov BP,SP ; Set up stack addressing environment (Movbim GR_Text_P1,0FFH ; Set up line to look solid (Movbim GR_Text_P2,0FFH ; Set up line to look solid  Mov CX,2 (Call GR_Text_W ; Feed pattern parameters  (SetUniverse (Xor SI,SI ; Set X edge to 0 (Mov DI,(BP+FC_Radius) ; Set Y edge to Radius (Mov FC_Last_Y,DI (Or DI,DI (Jz $99 ely ? (Call FC_Draw ; Go draw bottom filling line (  $33: Pop BX ; Retrieve draw length (Mov DX,(BP+FC_Y) ; Get center Y coordinate (Sub DX,SI ; Calculate Center Y - Edge X + 1 (Inc DX (Jns $34 ; Are we within the region ? (Add BX,DX ; No, shorten the draw length (Xor DX,DX ; Jam Y coordinate to zero  $34: Mov AX,SS:Y_Clip ; Are we out of region on top ? (Sub AX,BX (Sub AX,DX (Mov DX,0003H ; Set edge D to 3 - 2 * Radius (Sub DX,DI (Sub DX,DI (  $00: Cmp DI,FC_Last_Y ; Has there been movement toward center ? (Je $01 (Mov FC_Last_Y,DI ; Yes, fill further (Call FC_Fill  $01: Mov AX,SI ; Is edge D < 0 ? (Or DX,DX (Jns $02 (Shl AX,1 ; No, make D offset 4 * X + 6 (Shl AX,1 (Add AX,0006H (Jmp $03  $02: Sub AX,DI ; Yes, make D offset 4 * (X - Y) + 10 (Shl  Jge $35 (Add BX,AX ; Yes, shorten the draw length  $35: Mov GR_V_P2,BX ; Setup DC := |X'| (Neg BX (Mov GR_V_P4,BX ; Setup D := 2 * |Y'| - |X'| (Shl BX,1 (Mov GR_V_P6,BX ; Setup D2 := 2 x (|Y'| - |X'|) (Movbim GR_V_P1,0CH ; Set direction for down to up (Mov CX,(BP+FC_X) ; Get center X coordinate (Sub CX,DI ; Calculate Center X - Edge Y (Js $36 ; Are we out of the region entirely ? (Push  AX,1 (Shl AX,1 (Add AX,000AH (Dec DI ; Move in toward center  $03: Add DX,AX ; Apply offset to edge D (Inc SI ; Move to next X (Cmp SI,DI ; Are there still more pixels in this section ? (Jb $00 ( (Jne $10 ; Did we leave one off ? (Cmp DI,FC_Last_Y (Je $10 (Call FC_Fill ; Yes, fill that row too (  $10: Mov AX,SI DX ; Save result for later (Call FC_Draw ; Go draw left filling line (Pop DX (  $36: Mov CX,(BP+FC_X) ; Get center X coordinate (Add CX,DI ; Calculate Center X + Edge Y (Cmp CX,SS:X_Clip ; Are we off the end of the region ? (Jg $37 (Call FC_Draw ; Go draw right filling line (  $37: Pop DX ; Retrieve Edge D (Ret   FC_Draw: (Call GR_XY_CV ; Set up cursor position command (Shl SI,1 ; Start out with X length same as Y length (Mov DI,SI (Mov DX,(BP+FC_X) ; Set up to fill middle rectangle (Sub DX,AX (Jns $11 ; Are we out of the region ? (Add SI,DX ; Yes, adjust back in (Inc SI (Xor DX,DX (Dec DX  $11: Push DX ; Stack starting X (Mov DX,(BP+FC_Y) (Sub DX,AX (Jns $12 ; Are we out of the region ? (Add DI,DX ; Yes, adjust back in (Inc D(Mov GR_Ead,DX (Mov GR_Dad,CL (Mov AH,(BP+FC_Color) ; Get Ramtek colors (Mov AL,(BP+FC_Enabled) (Lea BX,Color_Table ; Derive NEC colors (Xlat  Xchg AH,AL (Xlat   $05: Shr AH,1 ; Should we even draw in this plane ? (Jc $00  Shr AL,1 ; No, ignore this color  Jmp $02  $00: Shr AL,1 ; Get low order bit into Carry (Push AX (Mov BL,(BP+FC_Overlay) ; Get overlay mode (Jc $01 I (Xor DX,DX (Dec DX  $12: Push DX ; Stack starting Y (Push SI ; Stack X length (Push DI ; Stack Y length (Push (BP+FC_Color) ; Stack colors (Push (BP+FC_Enabled) ; Stack planes enabled (Push (BP+FC_Overlay) ; Stack overlay mode (Push CS ; Stack part of return long address (Call Rect_Fill ; Draw interior block  $99: (ResetUniverse ( (.ENDC (  Retl 12 ( ( (.IF ~Is_Textron (  ; Should a color be drawn ? (Or BL,BL ; No, but is this replacement mode ? (Jne $06 (Mov BL,02H ; Set to clear mode  $01: Call GR_Mode ; Set up overlay mode (Call GR_CSR_R ; Set cursor in appropriate plane (Mov CX,0BH ; Declare vector parameters (Call GR_Vect_W (Call GR_Vect_E ; Execute vector (  $06: Pop AX  $02: (.IF Is_APC_III (Addbim GR_Ead+1,40H ; Move to next plane (.ELSE  FC_Fill: ; Fill a rectangular pattern at (CX, DX) constrained by circle  Push DX ; Save edge D (Mov BX,SI ; Calculate 2 * Edge Y - 2 (Dec BX (Shl BX,1 (Push BX ; Save initial draw length (Mov GR_V_P8,0000H ; Setup D1 := 2 x |Y'| ( (Mov CX,(BP+FC_X) ; Get center X coordinate (Sub CX,SI ; Calculate Center X - Edge X + 1 (Inc CX (Jns $30 ; Need we clip on left side ?  Add       Incmb GR_Dad ; Move to next plane (.ENDC ( (Cmp AL,01H ; Are there more planes left ? (Jnz $05 (Ret ( (.ENDC (    CP_X_Center .Equ 18 ; Offset of center X coordinate  CP_Y_Center .Equ 16 ; Offset of center Y coordinate  CP_Radius .Equ 14 ; Offset of radius  CP_Pattern .Equ 12 ; Offset of pointer to pattern  CP_Pat_X .Equ 10 ; Offset of horizontal pa(Mov CP_Last_X,0001H ; Start last X out conflicting  (Mov SI,DX ; Set starting pattern row (Mov DI,0001H ; Draw axis with height of 1 (Xor AX,AX ; Set X to 0 (Call CP_Draw_LR ; Draw left and right sides (Xor AX,AX ; We really want X = 0 (Mov SI,DX ; Set Pat_Pos_LY to Pat_Pos_HY (Mov DI,0003H ; Start D out as 3 - 2 * Radius (Sub DI,CX (Sub DI,CX (Js $11 ; Is there any more pattern ?ttern size  CP_Pat_Y .Equ 8 ; Offset of vertical pattern size  CP_Color .Equ 6 ; Offset of draw color  CP_Overlay .Equ 4 ; Offset of overlay mode   CP_Pos_RX .Word  CP_Last_X .Word  CP_X_Limit .Word  CP_Last_Y .Word 0.Private CP_Stack_Space:13 ; Make sure this is in SS   Cir_Pat: ; Draw a circle with a pattern in it according to parameters ( (.IF ~Is_Textron ( (SetUniverse (  (Jmp Cir_Pat_End  $11: Inc DX ; Move to next pattern row for upper (Cmp DX,(BP+CP_Pat_Y) ; Should we wrap around to row 0 ? (Jne $20 (Xor DX,DX ; Yes, that was easy   $20: Inc AX ; Move to next circle row (Or DI,DI ; Is D < 0 ? (Js $21 (Add DI,0004H ; No, calculate D = D + 4 * (X - Y) + 6 (Sub DI,CX (Sub DI,CX (Sub DI,CX (Sub DI,CX (Mov BP,SP ; Set up stack addressing and parameter frame (Mov AX,(BP+CP_Pattern) (Mov BX,(BP+CP_Pat_X) (Mov SI,(BP+CP_Pat_Y) (Mov DX,(BP+CP_Color) (Mov CX,(BP+CP_Overlay) (Lea BP,CP_Stack_Space (Mov (BP+RP_Pattern),AX (Mov (BP+RP_Pat_X),BX (Mov (BP+RP_Pat_Y),SI (Mov (BP+RP_Color),DX (Mov (BP+RP_Overlay),CX (Mov (BP+RP_Rect_Y),0001H (Mov BP,SP ( (Mov CX,(BP+CP_Radius) ; Set Y to Radius (Mov AX,CX (Mov CP_Last_Y,AX(Push DI ; Save D and X while we draw pattern (Push AX (Push SI ; Save Pat_Pos_LY during drawing (Mov DI,AX ; Set Y Length to X - Last_X (Sub DI,CP_Last_X (Jbe $26 (Push DI ; We will use this for upper circle (Neg AX ; Pass Y coordinate -X + 1 (Inc AX (Call CP_Draw_LR ; Draw lower circle left and right (Pop DI ; Retrieve Y length (Mov SI,DX ; Draw with upper patter ; Start Last_Y as current Y (Divmb (BP+CP_Pat_X) ; Set Pat_Pos_LX to Radius Mod Pat_X (Mov BL,AH (Xor BH,BH (Mov AX,CX ; Calculate Radius * 2 (Shl AX,1 (Jnz $00 ; Is radius 0 ? (Jmp Cir_Pat_End  $00: Mov DI,0003H ; No, set D to 3 - 2 * Radius (Sub DI,AX (Dec AX ; Set Pat_Pos_HY to (2 * Radius) - 1 Mod Pat_Y (Xor DX,DX (Div SI (Dec SI ; Set Pat_Pos_LY to Pat_Y - 1 n row position (Mov AX,CP_Last_X (Call CP_Draw_LR ; Draw upper circle left and right  $26: Pop SI ; Retrieve Pat_Pos_LY (Pop AX ; Retrieve X coordinate (Pop DI ; Retrieve D  (Add DX,AX ; Bump pattern for next group of rows (Sub DX,CP_Last_X  $25: Cmp DX,(BP+CP_Pat_Y) ; Should we wrap pattern around ? (Jb $24 (Sub DX,(BP+CP_Pat_Y) ; Take no chances on this Mod (Jmp $25 (Xor AX,AX ; Set X to 0 (  $01: Cmp CX,CP_Last_Y ; Has there been a change in Y ? (Je $02  Mov CP_Last_Y,CX ; Yes, draw upper and lower lines (Call CP_Draw_HL   $02: Or DI,DI ; Is D < 0 ? (Js $03 (Add DI,0004H ; No, calculate D := D + 4 * (X - Y) + 10 (Sub DI,CX (Sub DI,CX (Sub DI,CX (Sub DI,CX  Dec CX ; Move down one line (Inc SI ; Move to next pattern  $24: Inc BX ; Move to next pattern row (Cmp BX,(BP+CP_Pat_Y) ; Should we wrap around (Jne $23 (Xor BX,BX  $23: Dec CX ; Move Y up one row (Mov CP_Last_X,AX ; Set marker for next time around  $21: Add DI,0002H ; Finish D calculation (Add DI,AX (Add DI,AX (Add DI,AX (Add DI,AX (Or SI,SI ; Should we wrap low pattern row ? (Jnz $22 (Mov SI,(BP+CP_Pat_Y) ; Yes, wrap to top of pattern  $row for lower circle (Cmp SI,(BP+CP_Pat_Y) ; Should we wrap around to pattern start ? (Jne $04 (Xor SI,SI ; Yes, that was easy  $04: Or DX,DX ; Should we wrap upper circle's pattern ? (Jne $05 (Mov DX,(BP+CP_Pat_Y)  $05: Dec DX ; Move to next pattern row for upper circle  $03: Add DI,AX ; Finish calculating new D by adding 4 * X + 6 (Add DI,AX (Add DI,AX (Add DI,AX  Add DI,0006H 22: Dec SI ; Move to next pattern row  (Cmp AX,CX ; Is X >= Y ? (Js $20 (  Cir_Pat_Center: (Mov DX,AX ; Calculate Y coordinate (Neg DX (Inc DX (Shl AX,1 ; Calculate Y length (Dec AX (Add DX,(BP+CP_Y_Center) (Jns $30 ; Are we still within the region ? (Sub SI,DX ; No, adjust back into region (Add AX,DX (Xor DX,DX ( (Inc AX ; Move one pixel to the left (Or BX,BX ; Should we wrap around to last column ? (Jne $06 (Mov BX,(BP+CP_Pat_X)  $06: Dec BX ; Move one column in for pattern (Cmp AX,CX ; Is X >= Y ? (Js $01 ( (Jne $10 ; Yes, but are there any leftovers ? (Cmp CX,CP_Last_Y (Je $10 (Call CP_Draw_HL   $10: Dec AX (Mov CP_X_Limit,AX ; Save inner edge of inside box (Mov CX,(BP+CP_Ra $30: Mov DI,SS:Y_Clip ; Are we still within the region ?  Sub DI,DX (Sub DI,AX (Inc DI (Jns $31  Add AX,DI ; No, truncate draw height   $31: Inc SI ; Calculate pattern row number  $34: Cmp SI,(BP+CP_Pat_Y) (Jl $33 (Sub SI,(BP+CP_Pat_Y) (Jmp $34   $33: Add BX,CX ; Calculate pattern column number (Mov CX,CP_X_Limit (Sub BX,CX (Mov DI,CX ; Calculate X lengthdius) ; Set Y to Radius (Mov CP_Last_Y,CX (Add AX,CX ; Calculate Pat_Pos_RX (Dec AX ; as (Radius + X_Limit - 1) Mod Pat_X (Xor DX,DX (Div (BP+CP_Pat_X) (Mov CP_Pos_RX,DX (Mov AX,CX ; Calculate Pat_Pos_HY (Dec AX ; as (Radius - 1) Mod Pat_Y (Divmb (BP+CP_Pat_Y) ; No, draw, sucker (Xor DH,DH (Mov DL,AH (Xor BX,BX ; Set Pat_Pos_LX to 0        (Shl DI,1 (Dec DI (Neg CX ; Calculate X coordinate (Inc CX  Add CX,(BP+CP_X_Center) (Jns $32 ; Are we still in region ? (Sub BX,CX ; No, adjust into region (Add DI,CX (Xor CX,CX   $32: Cmp BX,(BP+CP_Pat_X) ; Must we MOD the pattern column ? (Jb $35 (Sub BX,(BP+CP_Pat_X) (Jmp $32   $35: Mov BP,SS:X_Clip ; Are we still in region ? (Sub BP,CX (Sub BP,DI (Inc BP  ; Are there rows left ?   $20: Mov DX,(BP+CP_X_Center) (Add DX,CP_X_Limit ; Calculate next X coordinate (Push DX (Add DX,CX ; Calculate right edge of circle (Sub DX,CP_X_Limit (Dec DX (Sub DX,SS:X_Clip ; Are we still within the region ? (Neg DX (Js $21 (Xor DX,DX ; Yes, don't apply a bias  $21: Add DX,CX ; Calculate number of columns on right (Sub DX,CP_X_Limit (Jns $36 (Add DI,BP ; No, truncate draw length   $36: Lea BP,CP_Stack_Space ; Set up parameters for center section (Mov (BP+RP_Start_X),CX (Mov (BP+RP_Start_Y),DX (Mov (BP+RP_Pat_X_Start),BX (Mov (BP+RP_Pat_Y_Start),SI (Mov (BP+RP_Rect_X),DI (Mov (BP+RP_Rect_Y),AX (Call Rect_Draw_Pat ; Draw center section (  Cir_Pat_End: ( (ResetUniverse ( (.ENDC ( (Retl 16 ( ( (.IF ~Is_Textron (  CP_Draw_HL: ; Draw horizontal hi(Push DX ( (Mov DX,CX ; Calculate the number of columns (Sub DX,CP_X_Limit (Neg CX ; Calculate lefthand X coordinate (Inc CX (Add CX,(BP+CP_X_Center) (Jns $30 ; Are we still in clipping region ? (Sub BX,CX ; No, adjust pattern start (Add DX,CX ; Adjust number of columns (Xor CX,CX ; Jam to left margin  $22: Cmp BX,(BP+CP_Pat_X) ; Dogh and low lines (Push BP ; Save addressing environment (Push AX ; Save X (Push BX ; Save Pat_Pos_LX (Push CX ; Save Y (Push SI ; Save Pat_Pos_LY (Push DI ; Save D (Push DX ; Save Pat_Pos_HY (Mov DX,AX (Shl DX,1 ; Calculate X length as 2 * X - 1 (Dec DX (Neg AX ; X coordinate is X_Center - X + 1 (Inc AX (Add AX,(BP+CP_X_Center)  we need to MOD this ? (Jl $30 (Sub BX,(BP+CP_Pat_X) (Jmp $22   $30: Lea BP,CP_Stack_Space (Mov (BP+RP_Start_X),CX ; Set X coordinate (Mov (BP+RP_Rect_X),DX ; Set number of columns (Mov (BP+RP_Start_Y),AX ; Set Y coordinate (Mov (BP+RP_Rect_Y),DI ; Set number of rows (Mov (BP+RP_Pat_Y_Start),SI ; Set starting pattern row (Mov (BP+RP_Pat_X_Start),BX ; Set starting pattern column (Jns $30 ; Are we off the region ? (Sub BX,AX ; Yes, adjust back in (Add DX,AX (Xor AX,AX  $31: Cmp BX,(BP+CP_Pat_X); Do we need to MOD the pattern start (Jl $30 (Sub BX,(BP+CP_Pat_X) (Jmp $31  $30: Mov DI,SS:X_Clip ; Are we off the region ? (Sub DI,AX (Sub DI,DX (Inc DI (Jns $34 (Add DX,DI ; Yes, truncate draw length   $34: Mov DI,(BP+CP_Y_Center) (Add DI,CX (Shl CX,1 (Neg (Push AX ; Save Y coordinate for next call (Or DX,DX ; Are there any columns to draw ? (Jz $32 (Js $32 (Call Rect_Draw_Pat ; Draw left hand image (  $32: Mov AX,CP_Pos_RX (Mov (BP+RP_Pat_X_Start),AX ; Set starting pattern column (Pop (BP+RP_Start_Y) ; Set starting Y coordinate (Pop AX ; Get number of columns (Or AX,AX (Mov (BP+RP_Rect_X),AX ; Set number of co CX ; Y coordinate is Y_Center - Y (Add CX,DI (Lea BP,CP_Stack_Space (Mov (BP+RP_Rect_X),DX Mov (BP+RP_Pat_X_Start),BX (Mov (BP+RP_Start_X),AX (Mov (BP+RP_Start_Y),CX (Mov (BP+RP_Pat_Y_Start),SI (Push DI ; Save this Y for draw of upper circle (Js $32 ; Was Y coordinate off region ? (Call Rect_Draw_Pat ; Draw pattern in lower circle  $32: Pop CX ; Get Y back lumns (Pop AX ; Get new right hand X coordinate (Js $01 ; Are there any columns to draw ? (Jz $01 (Cmp (BP+RP_Start_X),AX ; Is it the same as the last one ? (Je $01 (Mov (BP+RP_Start_X),AX ; No, draw this line, too (Call Rect_Draw_Pat ; Draw right hand image (  $01: Pop CX (Pop DX (Pop BX (Pop BP (Ret H .ENDC H  ;  ; End of 7220.Circl Include File  ;     (Cmp CX,SS:Y_Clip ; Is Y coordinate in region ? (Jg $33 (Pop DX ; Get Pat_Pos_HY back (Push DX (Mov (BP+RP_Start_Y),CX (Mov (BP+RP_Pat_Y_Start),DX (Call Rect_Draw_Pat ; Draw pattern in upper circle  $33: Pop DX ; Restore Pat_Pos_HY (Pop DI ; Restore D (Pop SI ; Restore Pat_Pos_LY (Pop CX ; Restore Y (Pop BX ; Restore Pat_Pos_LX (Pop AX ; Restore X $TAG $CURSOR $EQUAL $LAST $SYNTAX 1 2 3 4 $$!"$z_@@O.#諁 (Pop BP ; Restore addressing environment (Ret H  CP_Draw_LR: ; Draw regions on the left and right on either upper or lower  Push BP (Push BX (Push DX (Push CX ( (Add AX,(BP+CP_Y_Center) ; Calculate absolute Y coordinate (Jns $10 ; Are we still within the region ? (Add DI,AX ; No, adjust row count (Jle $12 ; Do we have any rows to draw ? (Sub SI,AX ; Yes, adjust starting pattern row  Xor AX,AX ; Force Y coordinate to zero  $11: Cmp SI,(BP+CP_Pat_Y) ; Should we MOD the result ? (Jl $10 (Sub SI,(BP+CP_Pat_Y) (Jmp $11  $10: Mov DX,SS:Y_Clip ; Is the draw within the region ? (Sub DX,AX (Sub DX,DI (Inc DX (Jge $20  Add DI,DX ; No, shorten the row count  $12: Jle $01        Program Test_Core;  Uses {$U Grafdraw.Code} Graf_Draw;  Const Print_Errors = False; &Esc = 27; { Escape key }  CR = 13; { Return key } &Up_Key = 31; { Up arrow key } &Down_Key = 10; { Down arrow key } &Right_Key = 28; { Right arrow key } &Left_Key = 15; { Left arrow key }  BS_Key = 8; { Backspace key } &Home_Key = 25; { Home key }  Type Result_Set = Set Of Draw_OK..Draw_Max;  Char_Set = Set Of Char;  Var Font_ID : Font_Type; $Pat_ID : $Box_Cursor (30); $Box_Cursor (2000); " Set_Cursor (Cur_Invisible); $Check_Result ([Draw_OK]); $Set_Cursor (Cur_Small); $Check_Result ([Draw_OK]); $Move_Cursor (Succ (X_Max_2), Succ (Y_Max_2)); $Check_Result ([Draw_OK]); $Set_Cursor (Cur_Visible); $Check_Result ([Draw_OK, Draw_Clipped]); $Continue; $Set_Cursor (Cur_Disable); $Check_Result ([Draw_OK]); "End {of Test_Cursor};   " "Procedure Test_Line; "Var I : Integer; " X, &Y : Point_Array; "Begin $With Core^ Do &Begin (Line_InPat_Type;  Planes, $X_Max_2, $Y_Max_2, $Reg_X, $Reg_Y, $Reg_X_Size, $Reg_Y_Size : Integer;   "Function Read_Key (Allowed : Char_Set) : Char; "Var Ch : Char; &Hit_Digit : Boolean; &Move_Mult : Integer; &W : Win_Rec; "Begin $Move_Mult := 1; $Hit_Digit := False; $Repeat &Read (Keyboard, Ch); $ If Eoln (Keyboard) Then (Ch := Chr (CR); $ W := Core^.Window_List^; &With Core^.Window_List^ Do (Case Ord (Ch) Of *Down_Key : Win_Y_Org := Win_Y_Org + Move_Mult; dex := 1; (Set_Line_Style (On, On, Off, On, On, Off, On, On); (Check_Result ([Draw_OK]); (Overlay_Mode := Xor; (For I := Y_Min To Y_Max Div 4 Do *Begin ,Move_Abs (I * 2, I * 2); ,Check_Result ([Draw_OK]); ,Line_Abs (I * 2, Y_Max - I * 2); ,Check_Result ([Draw_OK]); ,Line_Abs (X_Max - I * 2, I * 2); ,Check_Result ([Draw_OK]); ,Line_Abs (X_Max - I * 2, Y_Max - I * 2); ,Check_Result ([Draw_OK]); ,Line_Abs (I * 2, I * 2); ,Check_Result ([Draw_OK]); *End {of For}; ( (Continue; *Up_Key : Win_Y_Org := Win_Y_Org - Move_Mult; *Right_Key : Win_X_Org := Win_X_Org - Move_Mult; *BS_Key, *Left_Key : Win_X_Org := Win_X_Org + Move_Mult; ( Home_Key : Begin 8Win_X_Org := 0; 8Win_Y_Org := 0; 6End {of Home_Key}; *48, 49, 50, {'0'..'9'} *51, 52, 53, *54, 55, 56, *57 : Begin 8If Not Hit_Digit Then :Move_Mult := 0; 8Move_Mult := Move_Mult * 10 + Ord (Ch) - Ord ('0'); 6 Hit_Digit := True; 6End {of '0'..'9'}; (End {of Case}; $ If W <> Core^.Window_List^ Then (Begi(Line_Index := Succ (Line_Index); (Move_Abs (X_Min, Y_Min); (Check_Result ([Draw_OK]); (For I := Y_Min To Y_Max Div 4 Do *Begin ,Line_Rel (0, Y_Max - 4 * I); ,Check_Result ([Draw_OK]); ,Line_Rel (X_Max - 4 * I, 0); ,Check_Result ([Draw_OK]); ,Line_Rel (0, -Y_Max + 4 * I); ,Check_Result ([Draw_OK]); ,Line_Rel (-X_Max + 4 * I, 0); ,Check_Result ([Draw_OK]); ,Move_Rel (2, 2); ,Check_Result ([Draw_OK]); *End {of For}; ( (Continue; (Line_Index := Succ (Line_Index); (Overlay_Mode := Replace; n *Hit_Digit := False; *Set_Window (Core^.Window_List); *If (Core^.Draw_Result <> Draw_OK) And Print_Errors Then ,Writeln (' Draw result on window movement was ', Core^.Draw_Result); *If Core^.Draw_Result >= Draw_Overflow Then ,Core^.Window_List^ := W; (End {of If W}; $Until Ch In Allowed; " Read_Key := Ch; "End {of Read_Key}; " " " "Procedure Check_Result (Expected : Result_Set); "Var Ch : Char; "Begin " If Not (Core^.Draw_Result In Expected) Then &If Print_Errors Then (Begin (For I := Y_Min To Y_Max Div 4 Do *Begin ,X[1] := X_CP; { Penup command } ,Y[1] := Y_CP; ,X[2] := I * 2; { Move_Abs (I * 2, I * 2) } ,Y[2] := I * 2; ,X[3] := I * 2; { Line_Abs (I * 2, Y_Max - I * 2) } ,Y[3] := Y_Max - I * 2; ,X[4] := X_Max - I * 2; { Line_Abs (X_Max - I * 2, I * 2) } ,Y[4] := I * 2; ,X[5] := X_Max - I * 2; { Line_Abs (X_Max - I * 2, } ,Y[5] := Y_Max - I * 2; { Y_Max - I * 2) } *Write ('Unexpected draw result ', Core^.Draw_Result, '; Hit [RETURN]'); *Ch := Read_Key ([Chr (CR)]); (End {of If Check_Result}; " Core^.Draw_Result := 9; {Just to see if it changes} "End {of Check_Result}; " " " "Function Do_Test (S : String) : Boolean; "Var Ch : Char; "Begin $GotoXY (0, 0); $Write ('Test ', S, ' (Y/N/Esc) ? '); $Ch := Read_Key (['y', 'Y', 'n', 'N', Chr (Esc)]); $If Ch = Chr (Esc) Then &Exit (Test_Core); $Do_Test := Ch In ['Y', 'y']; $Writeln (Ch); $If Ch In ['Y', 'y',X[6] := I * 2; { Line_Abs (I * 2, I * 2) } * Y[6] := I * 2; * PLine_Abs (X, Y, 6); ,Check_Result ([Draw_OK]); *End {of For}; ( (Continue; (Line_Index := Succ (Line_Index); (Overlay_Mode := Xor; (Move_Abs (X_Min, Y_Min); (Check_Result ([Draw_OK]); (For I := Y_Min To Y_Max Div 4 Do *Begin ,X[1] := 0; { Line_Rel (0, Y_Max - 4 * I) } ,Y[1] := Y_Max - 4 * I; ,X[2] := X_Max - 4 * I; { Line_Rel (X_Max - 4 * I, 0) } ,Y[2] := 0; ,X[3] := 0; { L] Then &Erase; $Erase_Alpha; "End {of Do_Test}; " " " "Procedure Continue; "Var Ch : Char; "Begin $GotoXY (0, 0); $Write ('Type to continue'); $Ch := Read_Key ([Chr (CR), Chr (Esc)]); $If Ch = Chr (Esc) Then &Exit (Test_Core); $Erase_Alpha; "End {of Continue}; " " " "Procedure Test_Cursor; " $Procedure Box_Cursor (Size : Integer); $Var I : Integer; $Begin &Size_Cursor (Size); &Check_Result ([Draw_OK, Draw_Clipped]); &For I := 0 To Core^.X_Max Do (Begin ine_Rel (0, -Y_Max + 4 * I) } ,Y[3] := -Y_Max + 4 * I; ,X[4] := -X_Max + 4 * I; { Line_Rel (-X_Max + 4 * I, 0) } ,Y[4] := 0; ,X[5] := 0; { Penup command} ,Y[5] := 0; ,X[6] := 2; { Move_Rel (2, 2) } ,Y[6] := 2; * PLine_Rel (X, Y, 6); ,Check_Result ([Draw_OK]); *End {of For}; (Continue;  (Erase; (Check_Result ([Draw_OK]); (Set_Line_Style (On, On, On, On, On, On, On, On); (Check_Result ([Draw_OK]); (Overlay_Mode := Replace; (Line_Index := 0; *Move_Cursor (I, 0); *Check_Result ([Draw_OK, Draw_Clipped]); (End {of For}; &For I := 0 To Core^.Y_Max Do (Begin *Move_Cursor (Core^.X_Max, I); *Check_Result ([Draw_OK, Draw_Clipped]); (End {of For}; &For I := Core^.X_Max Downto 0 Do (Begin *Move_Cursor (I, Core^.Y_Max); *Check_Result ([Draw_OK, Draw_Clipped]); (End {of For}; &For I := Core^.Y_Max Downto 0 Do (Begin *Move_Cursor (0, I); *Check_Result ([Draw_OK, Draw_Clipped]); (End {of For}; &For I := 0 To Core^.X_Max Do (Begin *Move_C(For I := -1 To Succ (X_Max) Do *Begin ,Line_Index := Succ (Line_Index) Mod 8; ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (I, Succ (Y_Max)); ,Check_Result ([Draw_Clipped]); ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (I, -1); ,Check_Result ([Draw_Clipped]); *End {of For}; (For I := -1 To Succ (Y_Max) Do *Begin ,Line_Index := Succ (Line_Index) Mod 8; ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (Succ (X_Max), I); ,Check_Rursor (I, Round (Core^.Y_Max / Core^.X_Max * I)); *Check_Result ([Draw_OK, Draw_Clipped]); (End {of For}; &For I := Core^.X_Max Downto 0 Do (Begin *Move_Cursor (Core^.X_Max - I, Round (Core^.Y_Max / Core^.X_Max * I)); *Check_Result ([Draw_OK, Draw_Clipped]); (End {of For}; &Continue; $End {of Box_Cursor}; $ "Begin {of Test_Cursor} $Set_Cursor (Cur_Enable); $Check_Result ([Draw_OK]); $Set_Cursor (Cur_Visible); $Check_Result ([Draw_OK, Draw_Clipped]); $Continue; $Box_Cursor (15);       esult ([Draw_Clipped]); ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (-1, I); ,Check_Result ([Draw_Clipped]); *End {of For}; Continue;  (Overlay_Mode := Xor; (Line_Index := 0; (For I := 1 To Pred (X_Max) Do *Begin ,Line_Index := Succ (Line_Index) Mod 8; ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (I, Pred (Y_Max)); ,Check_Result ([Draw_OK]); ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (I, 1);  Div 4 Do *Begin ,Move_Abs (I * 2, I * 2); ,Check_Result ([Draw_OK]); ,Box_Rel (X_Max - I * 4, Y_Max - I * 4); ,Check_Result ([Draw_OK]); ,Line_Index := Succ (Line_Index) Mod 8; *End {of For}; & &Fill_Index := 0; &Line_Index := 5; &Overlay_Mode := Replace; &Draw_Boxes (Fast, Plain, Solid_Line); &Draw_Boxes (Fast, Plain, Interior); &Draw_Boxes (Fast, Patterned, Solid_Line); &Draw_Boxes (Fast, Patterned, Interior); &Draw_Boxes (Fill, Plain, Solid_Line); &Draw_Boxes (Fill, Plain, Interior); ,Check_Result ([Draw_OK]); *End {of For}; (For I := 1 To Pred (Y_Max) Do *Begin ,Line_Index := Succ (Line_Index) Mod 8; ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (Pred (X_Max), I); ,Check_Result ([Draw_OK]); ,Move_Abs (X_Max_2, Y_Max_2); ,Check_Result ([Draw_OK]); ,Line_Abs (1, I); ,Check_Result ([Draw_OK]); *End {of For};  &End {of With}; "End {of Test_Line};    "Procedure Test_Box; "Var I : Integer; & &Procedure Draw_Boxes (Display : Display_Type; ?@ABCDEFGHIJKLMNO'); ,Text_Index := Succ (Text_Index) Mod 8; ,Continue; , ,Move_Abs (Start_X + Font_Cols * 24 * Mag, 6Start_Y - (24 * Font_Cols {+ Font_Rows}) * Mag); ,Char_Path := Left; ,Top_Bottom := Bottom; ,Left_Right := Right; ,Set_Charup (0, -1); ,Text ('PQRSTUVWXYZ[\]^_`abcdefg'); ,Text_Index := Succ (Text_Index) Mod 8; ,Continue; 4 ,Move_Abs (Start_X - Font_Rows * Mag, 6Start_Y - 24 * Font_Cols * Mag); ,Char_Path := Up; ,Tom; *Left_Right := Left; *Set_Charup (0, 1); *Check_Result ([Draw_OK]); *Overlay_Mode := Ovly; *Radius := Succ (Y_Max) Div 17; *Fill_Index := 5; *Line_Index := 1; *Text_Index := 1; *Move_Abs (Radius, Radius); *Check_Result ([Draw_OK]); *For Int := Plain To Patterned Do ,For Edge := Solid_Line To Interior Do .For Disp := Fast To Fill Do 0Begin 0 Display_Mode := Disp; 2Polygon_Interior := Int; 2Polygon_Edge := Edge; 0 For I := 0 To 7 Do 0 Begin 4 Circle_Rel (Radius); op_Bottom := Bottom; ,Left_Right := Left; ,Set_Charup (-1, 0); ,S := 'hijklmnopqrstuvwxyz{|}~ ';  S[Length(S)] := Chr (127); ,Text (S); ,Text_Index := Succ (Text_Index) Mod 8; ,Continue; * Erase; , *End {of For}; $End {of Test_Rotations}; & & " $Procedure Test_Direction (Dir : Direction); $ &Procedure Test_Position (Horiz, Vert : Directions); &Var Horiz_Name, *Vert_Name : String; &Begin (Case Horiz Of *Left : Horiz_Name := 'Left - '; 6Check_Result ([Draw_OK]); 6Move_Rel (Radius, 0); 6Check_Result ([Draw_OK]); 6Fill_Index := Succ (Fill_Index) Mod 8; 6Line_Index := Succ (Line_Index) Mod 8; 4End {of For I}; 2If Disp = Fast Then 4Text (' Fast, ') 2Else 4Text (' Fill, '); 2Check_Result ([Draw_OK]); 2Move_Rel (0, -Char_Height); 2Check_Result ([Draw_OK]); 2If Edge = Solid_Line Then 4Text (' Solid, ') 2Else 4Text (' Trace, '); 2Check_Result ([Draw_OK]); 2Move_Rel (0, -Char_Height); 2Check_Result ([Draw_OK]); 2If Int = Plain*Center : Horiz_Name := 'Center - '; *Right : Horiz_Name := 'Right - '; (End {of Case}; (Case Vert Of *Top : Vert_Name := 'Top'; *Center : Vert_Name := 'Center'; *Bottom : Vert_Name := 'Bottom'; (End {of Case}; (Core^.Top_Bottom := Vert; (Core^.Left_Right := Horiz; (Text (Concat (Horiz_Name, Vert_Name)); (Core^.Text_Index := Succ (Core^.Text_Index) Mod 8; (Continue; &End {of Test_Position}; $ $ $Begin {of Test_Direction} $ Core^.Char_Path := Dir; &Test_Position (Left, Bottom); &Test Then 4Text (' Plain') 2Else 4Text (' Patterned'); 2Check_Result ([Draw_OK]); 2Text_Index := Succ (Text_Index) Mod 8; 2If Text_Index = Background Then 4Text_Index := Succ (Text_Index) Mod 8; 2Move_Rel (-Radius * 8, 2 * Radius + 2 * Char_Height); 2Check_Result ([Draw_OK]); 0End {of For Disp}; (End {of Core}; $End {of Circle_Groups}; $ $ "Begin {of Test_Circle} $Set_Line_Style (On, On, On, On, On, On, On, On); $Check_Result ([Draw_OK]); $Circle_Groups (Replace); $Continue; $Erase; _Position (Left, Center); &Test_Position (Left, Top); &Erase; &Test_Position (Center, Bottom); &Test_Position (Center, Center); &Test_Position (Center, Top); &Erase; &Test_Position (Right, Bottom); &Test_Position (Right, Center); &Test_Position (Right, Top); &Erase; $End {of Test_Direction}; $ $ " "Begin {of Test_Text} " With Core^ Do &Begin (OverlayMode := Replace; (Char_Spacing := 0; (Text_Index := 1; (Char_Width := Font_Cols * 2; (Char_Height := Font_Rows * 1; $Check_Result ([Draw_OK]); $Circle_Groups (Xor); $Continue; $Erase; $Check_Result ([Draw_OK]); $Do_Circles (Fast, Plain); " Continue; $Erase; $Check_Result ([Draw_OK]); $Do_Circles (Fill, Plain); " Continue; $Erase; $Check_Result ([Draw_OK]); $Do_Circles (Fill, Patterned); "End {of Test_Circle}; " "  "Procedure Test_Text; "Var Blocking : Boolean; " $Procedure TestFast; $Var Index : Integer; $ OutSt : String [255]; $Begin $ With Core^ Do (Begin *Char_Width := 8; *Char_He(Set_Cursor (Cur_Enable); (Set_Cursor (Cur_Visible); (Move_Abs (X_Max_2, Y_Max_2); (Move_Cursor (X_Max_2, Y_Max_2); (For Blocking := False To True Do *Begin ,TextBlock := Blocking; ,Test_Direction (Right); ,Test_Direction (Left); ,Test_Direction (Up); ,Test_Direction (Down); *End {of For}; (TextBlock := False; (Set_Cursor (Cur_Disable); (Erase_Alpha; (Test_Rotations; & Test_Fast; &End {of For}; "End {of Test_Text}; " " Procedure Test_Flood; "Begin $Set_Line_Style (On, On, On, On, Oight := Font_Rows; *Char_Path := Right; *Top_Bottom := Bottom; *Left_Right := Left; *Set_Charup (0, 1); *Char_Spacing := 0.0; *Text_Index := 1; *For Index := 0 To Y_Max Div Font_Rows Div 2 - 1 Do ( Begin , Move_Abs (0, Index * Font_Rows);  {$R-} OutSt[0] := Chr (X_Max Div Font_Cols);  {$R^} Fillchar (OutSt[1], Length (OutSt), Chr (Ord ('A') + Index)); .Text (OutSt); ,End {of For}; *Continue; *Text_Index := 2; *Top_Bottom := Top; n, On, On, On); $Check_Result ([Draw_OK]); $With Core^ Do &Begin (Overlay_Mode := Replace; (Display_Mode := Fill; (Line_Index := 6; ( (Move_Abs (0, Y_Max Div 5 * 3); {Draw upper zig zag} (Check_Result ([Draw_OK]); (Line_Rel (X_Max Div 6, Y_Max Div 5); (Check_Result ([Draw_OK]); (Line_Rel (X_Max Div 6, -(Y_Max Div 5)); (Check_Result ([Draw_OK]); (Line_Rel (X_Max Div 6, Y_Max Div 5); (Check_Result ([Draw_OK]); (Line_Rel (X_Max Div 6, -(Y_Max Div 5)); (Check_Result ([Draw_OK]); *For Index := Y_Max Div Font_Rows Div 2 + 1 To Y_Max Div Font_Rows Do ( Begin , Move_Abs (0, Index * Font_Rows);  {$R-} OutSt[0] := Chr (X_Max Div Font_Cols);  {$R^} Fillchar (OutSt[1], Length (OutSt), Chr (Ord ('A') + Index)); .Text (OutSt); ,End {of For}; (End {of With}; $End {of TestFast}; $ $ $Procedure Test_Rotations; $Var Mag, (Start_X, (Start_Y : Integer; (S : String; $Begin &With Core^ Do (For Mag := 1 To 2 Do *Begin ,Char_Width := Font_Cols * Mag; ,Ch(Line_Rel (X_Max Div 6, Y_Max Div 5); (Check_Result ([Draw_OK]); (Line_Rel (X_Max Div 6, -(Y_Max Div 5)); (Check_Result ([Draw_OK]); ( (Move_Rel (0, -Y_Max Div 5); {Draw lower zig zag} (Line_Rel (-(X_Max Div 6), -(Y_Max Div 5)); (Check_Result ([Draw_OK]); (Line_Rel (-(X_Max Div 6), Y_Max Div 5); (Check_Result ([Draw_OK]); (Line_Rel (-(X_Max Div 6), -(Y_Max Div 5)); (Check_Result ([Draw_OK]); (Line_Rel (-(X_Max Div 6), Y_Max Div 5); (Check_Result ([Draw_OK]); (Line_Rel (-(X_Max Divar_Height := Font_Rows * Mag; ,Start_X := X_Max_2 - (12 * Font_Cols - Font_Rows) * Mag; ,Start_Y := Y_Max_2 + (12 * Font_Cols + Font_Rows) * Mag - 32; , ,Move_Abs (Start_X, Start_Y); ,Char_Path := Right; ,Top_Bottom := Top; ,Left_Right := Left; ,Set_Charup (0, 1); ,Text (' !"#$%&''()*+,-./01234567'); ,Text_Index := Succ (Text_Index) Mod 8; ,Continue; , ,Move_Abs (Start_X + Font_Cols * 24 * Mag, , Start_Y{ - Font_Cols * Mag}); ,Char_Path := Down; ,Top_Bottom := Top;        6), -(Y_Max Div 5)); (Check_Result ([Draw_OK]); (Line_Rel (-(X_Max Div 6), Y_Max Div 5); (Check_Result ([Draw_OK]); ( (Polygon_Interior := Patterned; {Draw circles} (Overlay_Mode := Replace; (Polygon_Edge := Interior; (Move_Abs (X_Max_2 Div 3, Y_Max_2); (Check_Result ([Draw_OK]); (Line_Index := 2; (Circle_Rel (Y_Max Div 8); (Check_Result ([Draw_OK]); (Move_Rel (X_Max Div 3, 0); (Check_Result ([Draw_OK]); (Line_Index := 4; (Circle_Rel (Y_Max Div 8); (Check_Result ([Draw_OK]); ip_Test (Core^.Y_Max Div 8, PI_2, -PI_x3_4); $Clip_Test (Core^.Y_Max Div 6, PI_2, -PI_2); $ $Move_Abs (Core^.Y_Max Div 6, Y_Max_2); $Check_Result ([Draw_OK]); $Core^.Line_Index := 2; $Pac_X_Open := Core^.X_Max Div 12; $Pac_Y_Open := Core^.Y_Max Div 9; $Pac_X_Closed := Core^.X_Max Div 10; $Pac_Y_Closed := Core^.Y_Max Div 18; $Open_Mouth := True; $Repeat &If Open_Mouth Then (Arc_Abs (Radius, Start_Angle, End_Angle, 1Core^.X_CP + Pac_X_Open, Core^.Y_CP - Pac_Y_Open, (Move_Rel (X_Max Div 3, 0); (Check_Result ([Draw_OK]); (Line_Index := 6; (Circle_Rel (Y_Max Div 8); (Check_Result ([Draw_OK]); ( (Polygon_Interior := Plain; (Fill_Index := 2; {Fill pattern} (Move_Abs (X_Max_2, Y_Max Div 8 * 5 + 7); (Check_Result ([Draw_OK]); (Flood; (Check_Result ([Draw_OK]); (Continue; (Flood; (Check_Result ([Draw_OK]); (Continue; (Fill_Index := 3; (Overlay_Mode := Xor; (Flood; (Check_Result ([Draw_OK]); &End {of With}; "End {of Test_Flo1Core^.X_CP + Pac_X_Open, Core^.Y_CP + Pac_Y_Open) &Else (Arc_Abs (Radius, Start_Angle, End_Angle, 1Core^.X_CP + Pac_X_Closed, Core^.Y_CP - Pac_Y_Closed, 1Core^.X_CP + Pac_X_Closed, Core^.Y_CP + Pac_Y_Closed); &Open_Mouth := Not Open_Mouth; &Check_Result ([Draw_OK]); &Arc_Rel (Radius, Start_Angle, End_Angle, /X_Start, Y_Start, X_End, Y_End); &Check_Result ([Draw_OK]); &Move_Rel (Core^.X_Max Div 22, 0); &Check_Result ([Draw_OK]); " Until Core^.X_CP + Radius >= Core^.X_Max; "End {of Test_Arcs}od}; $ " "  Procedure Test_Arcs; "Const PI_8 = 0.39269907; (PI_4 = 0.78539815; (PI_2 = 1.5707963; (PI = 3.1415926278; (PI_x2 = 6.2831852; (PI_x3_2 = 4.7123889; (PI_x3_4 = 2.3561944; (PI_x7_4 = 5.497787; (PI_x5_4 = 3.9269907; "Var X_Start, &Y_Start, &X_End, &Y_End, &Pac_X_Open, &Pac_Y_Open, &Pac_X_Closed, &Pac_Y_Closed, &Combo_Radius, &Radius, &J, &I : Integer; &Open_Mouth : Boolean; &Start_Angle, &End_Angle : Real; " ;    "Procedure Test_Block; " $Procedure Breakup (X, Y, Side_Length, Level : Integer); $Type Color_Array = Packed Array [0..30000] Of Color_Index; $Var New_Length : Integer; (Pattern : Record 7Case Integer Of 90 : (S : Sorcery); 91 : (P : ^Color_Array); 5End {of Pattern}; $ &Procedure Draw_Section (Sect_X, Sect_Y, X_Offset, Y_Offset : Integer); &Begin (Move_Abs (Sect_X, Sect_Y); (Check_Result ([Draw_OK]); (Read_Block_Pixels (Pattern.S, New_Length, New_Length); $Procedure Clip_Test (Radius : Integer; Start_Angle, End_Angle : Real); $Var Start_X, (Start_Y, (End_X, (End_Y : Integer; $Begin &Move_Abs (Core^.X_Max Div 64, Y_Max_2); &Check_Result ([Draw_OK]); &Arc_Rel (Radius, Start_Angle, End_Angle, Start_X, Start_Y, End_X, End_Y); &Check_Result ([Draw_Clipped]); &Move_Abs (X_Max_2, Core^.Y_Max - Core^.X_Max Div 64); &Check_Result ([Draw_OK]); &Arc_Rel (Radius, Start_Angle + PI_x3_2, End_Angle + PI_x3_2, /Start_X, Start_Y, End_X, End_Y); &Check_Result(Check_Result ([Draw_OK]); (Move_Rel (X_Offset * New_Length, Y_Offset * New_Length); (Check_Result ([Draw_OK]); (Write_Block_Pixels (Pattern.S, New_Length, New_Length); (Check_Result ([Draw_OK]); (If Level > 0 Then *Breakup (Sect_X + X_Offset * New_Length, 3Sect_Y + Y_Offset * New_Length, New_Length, Pred (Level)); &End {of Draw_Section}; & $Begin {of Breakup} &New_Length := Side_Length Div 2; &If Var_New (Pattern.P, New_Length * ((New_Length + 3) Div 4)) <> 0 Then; &Draw_Section (X, Y, -2, - ([Draw_Clipped]); &Move_Abs (Core^.X_Max - Core^.X_Max Div 64, Y_Max_2); &Check_Result ([Draw_OK]); &Arc_Rel (Radius, Start_Angle + PI, End_Angle + PI, /Start_X, Start_Y, End_X, End_Y); &Check_Result ([Draw_Clipped]); &Move_Abs (X_Max_2, Core^.X_Max Div 64); &Check_Result ([Draw_OK]); &Arc_Rel (Radius, Start_Angle + PI_2, End_Angle + PI_2, /Start_X, Start_Y, End_X, End_Y); &Check_Result ([Draw_Clipped]); &Continue; &Core^.Line_Index := Succ (Core^.Line_Index) Mod 8; 2); &Draw_Section (X, Y + Side_Length - New_Length, -2, 2); &Draw_Section (X + Side_Length - New_Length, Y, 2, -2); &Draw_Section (X + Side_Length - New_Length, Y + Side_Length - New_Length, 42, 2); &Var_Dispose (Pattern.P, New_Length * ((New_Length + 3) Div 4)); $End {of Breakup}; $ " "Begin {of Test_Block} $With Core^ Do &Begin (Display_Mode := Fill; (Overlay_Mode := Xor; (Polygon_Interior := Patterned; (Polygon_Edge := Interior; (Move_Abs (X_Max_2 - (Y_Max Div 5), &If Core^.Line_Index = Core^.Background Then (Core^.Line_Index := Succ (Core^.Line_Index) Mod 8; &Erase; &Check_Result ([Draw_OK]); $End {of Clip_Test}; $ "Begin {of Arc_Test} $Combo_Radius := Core^.Y_Max Div 17; $Set_Line_Style (On, On, On, On, On, On, On, On); $Check_Result ([Draw_OK]); $Core^.Polygon_Edge := Solid_Line; $Core^.Overlay_Mode := Replace; $For I := 0 To 7 Do &For J := 0 To 7 Do (Begin *Core^.Line_Index := Succ (Core^.Line_Index) Mod 8; *If Core^.Line_Index = Core^.Background2Y_Max_2 - (Y_Max Div 5)); (Check_Result ([Draw_OK]); (Box_Rel (Succ (Y_Max Div 5), Succ (Y_Max Div 5)); (Check_Result ([Draw_OK]); (Move_Rel (1, 1); (Check_Result ([Draw_OK]); (Breakup (X_CP, Y_CP, Y_Max Div 5, 1); &End {of With}; "End {of Test_Block}; $ $ $ "Procedure Test_Universe; "Var Index, &Index1 : Integer; "Begin $With Core^ Do &Begin (Display_Mode := Fill; (Overlay_Mode := Xor; (Polygon_Interior := Patterned; (Polygon_Edge := Interior; (Set_Universes (Display_Universe, Unive Then ,Core^.Line_Index := Succ (Core^.Line_Index) Mod 8; *Move_Abs (J * (Core^.X_Max Div 8) + Combo_Radius, 4I * (Core^.Y_Max Div 8) + Combo_Radius); *Check_Result ([Draw_OK]); *Arc_Rel (Combo_Radius, I * PI_8, J * PI_8, 3X_Start, Y_Start, X_End, Y_End); *Check_Result ([Draw_OK]); (End {of For J}; $Continue; $Erase; $Check_Result ([Draw_OK]); $Core^.Overlay_Mode := Xor; $For I := 0 To 7 Do &For J := 0 To 7 Do (Begin *Core^.Line_Index := Succ (Core^.Line_Index) Mod 8; rses); (Check_Result ([Draw_Overflow]); (For Index := 0 To Pred (Universes) Do ( Begin ,Set_Universes (Display_Universe, Index); ,Check_Result ([Draw_OK]); ,Move_Abs (X_Max_2 Div Universes * Index, 6Y_Max_2 Div Universes * Index); ,Check_Result ([Draw_OK]); ,Box_Rel (X_Max_2 Div Universes, Y_Max_2 Div Universes); ,Check_Result ([Draw_OK]); & End {of For}; & Continue; ) (Set_Universes (Universes, 0); (Check_Result ([Draw_Overflow]); (For Index1 := 0 To 99 Do *If Core^.Line_Index = Core^.Background Then ,Core^.Line_Index := Succ (Core^.Line_Index) Mod 8; *Move_Abs (J * (Core^.X_Max Div 8) + Combo_Radius, 4I * (Core^.Y_Max Div 8) + Combo_Radius); *Check_Result ([Draw_OK]); *Arc_Rel (Combo_Radius, PI_x2 / (J + 1), I * PI_8, 3X_Start, Y_Start, X_End, Y_End); *Check_Result ([Draw_OK]); (End {of For J}; $Continue; $Erase; $Check_Result ([Draw_OK]); $Clip_Test (Core^.Y_Max Div 24, PI_x3_4, -PI_x3_4); $Clip_Test (Core^.Y_Max Div 12, PI_x3_4, -PI_2); $Cl      *For Index := 0 To Pred (Universes) Do ,Begin .Set_Universes (Index, 0); .Check_Result ([Draw_OK]); ,End {of For Index}; (Set_Universes (0, 0); (Check_Result ([Draw_OK]); &End {of With}; "End {of Test_Block}; $ $ $ "Procedure Test_Windows; "Var J, &I : Integer; " Old_Window, &Window : Win_Rec_P; "Begin $With Core^ Do &Begin (Old_Window := Window_List; ({Set_Window (Nil); (Check_Result ([Draw_OK]);} ( (Char_Width := Font_Cols; (Char_Height := Font_Rows; (Char_Spacing := 0;-Pred (Win_X_Org + Win_X_Size), ', ', -Pred (Win_Y_Org + Win_Y_Size), ')'); "Writeln ('Clipping region at (', Core^.X_Min, ', ', Core^.Y_Min, +') to (', Core^.X_Max, ', ', Core^.Y_Max, ')'); "Write ('Clipping region lower left corner (X, Y) ? '); "Readln (Reg_X, Reg_Y); "Write ('Clipping region size (X'', Y'') ? '); "Readln (Reg_X_Size, Reg_Y_Size); "Set_Region (Reg_X, Reg_Y, Reg_X_Size, Reg_Y_Size); "Check_Result ([Draw_OK]); "Erase; "Check_Result ([Draw_OK]); "Erase_Alpha; "Check_Result ([D (Char_Path := Right; (Set_Charup (0, 1); (Check_Result ([Draw_OK]); (Top_Bottom := Bottom; (Left_Right := Center; (Move_Abs (X_Max Div 2, 0); (Check_Result ([Draw_OK]); (Text_Index := Succ (Background_Index) Mod 8; (Text ('Hi, mom!'); (Check_Result ([Draw_OK]); ( (Overlay_Mode := Replace; (Line_Index := Succ (Background_Index) Mod 8; (Move_Rel (0, 0); (Check_Result ([Draw_OK]); (New (Window); (New (Window^.Next_Window); (Window^.Win_X_Org := 0; (Window^.Win_Y_Org := Char_Height; raw_OK]); "Goto_XY (0, 24); "X_Max_2 := Core^.X_Max Div 2; "Y_Max_2 := Core^.Y_Max Div 2; "If Do_Test ('Cursor') Then $Test_Cursor;  If Do_Test ('Line') Then $Test_Line; If Do_Test ('Box') Then $Test_Box; "If Do_Test ('Text') Then $Test_Text; "If Do_Test ('Circle') Then $Test_Circle; "If Do_Test ('Block') Then $Test_Block; "If Do_Test ('Area Fill') Then $Test_Flood; "If Do_Test ('Arc') Then $Test_Arcs; "If Do_Test ('Universe') Then $Test_Universe; "If Do_Test ('Windows') Then (Window^.Disp_X_Org := 0; (Window^.Disp_Y_Org := Char_Height; (Window^.Win_X_Size := Window_List^.Win_X_Size; (Window^.Win_Y_Size := Window_List^.Win_Y_Size - Char_Height; (With Window^.Next_Window^ Do *Begin ,Next_Window := Nil; ,Win_X_Org := 0; ,Win_Y_Org := 0; ,Disp_X_Org := 0; ,Disp_Y_Org := 0; * Win_X_Size := Window_List^.Win_X_Size; ,Win_Y_Size := Char_Height; *End {of With Window}; (Set_Region (Region_X_Org, Region_Y_Org + Char_Height, 4Succ (X_Max), Succ (Y_Max - Char_Height)); (Ch$Test_Windows; "Continue; "Erase_Alpha;  End {of Test_Core}. eck_Result ([Draw_OK]); ( (For I := 0 To 19 Do *Begin ,Move_Abs (I * X_Max Div 20, 0); ,Check_Result ([Draw_OK]); ,Line_Rel (0, Y_Max); ,Check_Result ([Draw_OK]); *End {of For}; (For I := 0 To 19 Do *Begin ,Move_Abs (0, I * Y_Max Div 20); ,Check_Result ([Draw_OK]); ,Line_Rel (X_Max, 0); ,Check_Result ([Draw_OK]); *End {of For}; (Display_Mode := Fill; (Fill_Index := Succ (Background_Index) Mod 8; (Polygon_Interior := Plain; (Polygon_Edge := Interior; (For I := 0 To 19 Do *For J := 0 To 19 Do ,Begin .Move_Abs (I * X_Max Div 20, J * Y_Max Div 20); .Check_Result ([Draw_OK]); .Circle_Rel (Y_Max Div 50); .Check_Result ([Draw_OK, Draw_Clipped]); .Fill_Index := Succ (Fill_Index) Mod 8; .If Fill_Index = Background_Index Then 0Fill_Index := Succ (Fill_Index) Mod 8; ,End {of For J}; ( (For I := Region_Y_Org To Succ (Glob_Y_Max - Window^.Win_Y_Size) Do ( Begin * Window^.Win_Y_Org := I; ,Set_Window (Window); ,If Window^.Win_Y_Org Mod Win_Y_Res = 0 Then .Check_Result RGRINIT GRINIT IV.0 [1e]([Draw_OK]) ,Else .Check_Result ([Draw_Clipped]); *End {of For}; (For I := Region_X_Org To Succ (Glob_X_Max - Window^.Win_X_Size) Do ( Begin ,Window^.Win_X_Org := I; ,Set_Window (Window); ,If Window^.Win_X_Org Mod Win_X_Res = 0 Then .Check_Result ([Draw_OK]) ,Else .Check_Result ([Draw_Clipped]); *End {of For}; ( (Continue; (Window^.Win_X_Org := Region_X_Org; (For I := 0 To 5 Do ( For J := 0 To 7 Do ,Begin .Window^.Win_Y_Org := J * Y_Max Div 20; .Set_Window (Window); Q -%?.Q7c@uIB90' ,End {of For J}; ( (Continue; (Set_Region (Region_X_Org, Region_Y_Org - Char_Height, 4Succ (X_Max), Succ (Y_Max + Char_Height)); (Check_Result ([Draw_OK]); (Set_Window (Old_Window); (Check_Result ([Draw_OK]); (Dispose (Window^.Next_Window); (Dispose (Window); &End {of With}; "End {of Test_Windows}; $ $  Begin {of Test_Core} "Check_Result ([Draw_Init]); "Goto_XY (0, 24); "Write ('Background color ? '); "Readln (Core^.Background); "Write ('Pattern number ? '); "Readln (Pat_ID); "Set_FillGRINIT GRINIT INIT IT GRCLEAR GRCLEAR CLEAR -EAR GRLINE GRLINE LINE ?NE GRBOX GRBOX BOX QX RECTFILLcCTFILLGRRFILL GRRFILL RECTFILLuCTFILLGRRFILL GRRFILL GRUNIVER GRUNIVERUNIVERSEIVERSE _Pattern (Pat_ID); "Check_Result ([Draw_OK]); "Write ('Font number ? '); "Readln (Font_ID); "Set_Font (Font_ID); "Check_Result ([Draw_OK]); "Write ('Planes enabled ? '); "Readln (Planes); "Plane_Enable (Planes); "Check_Result ([Draw_OK]); "Writeln ('Global space at (', Core^.Glob_X_Min, ', ', Core^.Glob_Y_Min, +') to (', Core^.Glob_X_Max, ', ', Core^.Glob_Y_Max, ')'); "With Core^.Window_List^ Do $Writeln ('Display at (', Win_X_Org, ', ', Win_Y_Org, ') to (',       fGRTEXT GRTEXT IV.0 [1e] ; 31 Mar 83 BD Fixed Area_Solid to work correctly with all 3 planes  ; 08 Mar 83 BD Installed Arc drawing routine Arc  ; 02 Mar 83 BD Installed Solid Area Fill routine AS_Area_Solid  ; 23 Feb 83 BD Fixed 45 degree lines on XOR mode on circles  ; 23 Feb 83 BD Fixed boundary blowup on rectangle fill clipping  ; 23 Feb 83 BD Fixed chip syncronization parameters so left isn't bunched  (.NoPatchList (  (.RelProc GR_Core  (.Def Clear, Line, Init, Box, Text, Rect_Fill (.Def Re -%?.Q7c@uIR[TKB90' ect_Pat, Read, Unpack, Universe (.Def Region, Window, Start, Stop, Text_Fast (.Def Area_Solid, Arc, Y_Val, Scan_Until, Cir_Fill, Cir_Pat (  False .Equ 0  True .Equ ~False   Is_APC_III .Equ False  Is_Textron .Equ False   Reset_Cmd .Equ 00H  Start_Cmd .Equ 0DH  Stop_Cmd .Equ 0CH  M_Str_Cmd .Equ 6FH  Slv_Cmd .Equ 6EH  Vect_E_Cmd .Equ 6CH  Text_E_Cmd .Equ 68H TEXT XT GRTEXT  GRTEXT RECTPAT -CTPAT GRRPAT  GRRPAT READ ?AD GRREAD GRREAD GRUNPACK  GRUNPACKUNPACK QPACK CIRFILL cRFILL GRFILLCI GRFILLCICIRPAT uRPAT GRCIRPAT GRCIRPATAREASOLIEASOLIGRAREASO GRAREASOARC C GRARC  GRARC  Scroll_Cmd .Equ 70H  GR_Wrt_W .Equ 20H  GR_Wrt_L .Equ 30H  GR_Wrt_H .Equ 38H  GR_Read_W .Equ 0A0H  GR_Read_L .Equ 0B0H  GR_Read_H .Equ 0B8H  CSR_R_Cmd .Equ 0E0H  0 0.IF Is_APC_III   Pitch .Equ 40  GR_Cmd .Equ 0A2H  GR_Para .Equ 0A0H  GR_Status .Equ 0A0H  GR_R_Data .Equ 0A2H  GR_Display_Page .Equ 0A4H  GR_Draw_Page .Equ 0A6H  Glob_X .Equ 640  GREGION GION GRREGION GRREGION  lob_Y .Equ 400  Win_X .Equ 640  Win_Y .Equ 400   ROM_Draw .Word 5DH 0.Word 40H ; Segment containing ROM data 0  (.MACRO BitFwd (Shl %1,%2 (.ENDM  (.MACRO BitBwd (Shr %1,%2 (.ENDM  (.MACRO SetUniverse (Call SetDrawPage (.ENDM  (.MACRO ResetUniverse (Call ResetDrawPage (.ENDM  0.ELSE   Pitch .Equ 64  GR_Cmd .Equ 72H  GR_Para .Equ 70H $CURSOR $EQUAL $SYNTAX $LAST $TAG  O.Ht GR_Status .Equ 70H  GR_R_Data .Equ 72H  Glob_X .Equ 1024  Glob_Y .Equ 1024  Win_X .Equ 640  Win_Y .Equ 480 ( (.MACRO BitFwd (Shr %1,%2 (.ENDM  (.MACRO BitBwd (Shl %1,%2 (.ENDM ( (.MACRO SetUniverse @; Universe operation not performed for APC (.ENDM  (.MACRO ResetUniverse @; Universe operation not performed for APC (.ENDM  0.ENDC    Glob_Upper_Left .Equ * Pitch  0.Private Planes_Absent:1 ; Contains 1's for nonexistent planes 0.Private X_Clip_Base:1 ; Current global X coordinate of clip 0.Private Y_Clip_Base:1 ; Current global Y coordinate of clip 0.Private X_Clip:1 ; Current X clipping maximum 0.Private Y_Clip:1 ; Current Y clipping maximum  .Private Cur_Draw_Page:1 ; Current drawing page   Plane_Table .Equ $ 0.IF Is_APC_III 0.Byte 40H,80H,40H,0C0H,0C0H,0C0H,0C0H,0C0H 0.ELSE 0.Byte 00H,02H,00H,02H,01H,02H,01H,00H  ; GrafDraw Graphics Unit ;  ; Assembly Code Support ;  ; by ;  ; Barry Demchak, Software Construction Inc. ;  ; for Ticom ;  ; December 30, 1982 ;    ; 30 Aug 85 BD Upgraded for Textron omissions and added Universe calls  ; 15 Aug 83 BD Added Overlay_Mode parameter to Text procedure for XOR mode  ; 15 Aug0.ENDC   Arc_Dir_Table .Equ $ 0.Byte 4,1,6,3,0,5,2,7   Box_Dir_Table .Equ $ 0.Byte 2,0,4,6 0  Line_Dir_Table .Equ $ 0.Byte 2,3,1,0,5,4,6,7 0 Color_Table .Equ $ 0.IF Is_APC_III 0.Byte 08H,0AH,09H,0BH,0CH,0EH,0DH,0FH 0.ELSE 0.Byte 08H,0CH,09H,0DH,0AH,0EH,0BH,0FH 0.ENDC 0 DA_Sync .Byte 00H 0.Byte 16H 0.Byte 26H 0.Byte 46H 0.Byte 0EH 0.Byte 03H 0.Byte 13H 0.Byte 0E0H 0.Byte 7DH  DA_Pitch .Byte 47H 0.Byte Pitch  83 BD Verified and corrected clipping in all routines  ; 15 Aug 83 BD Moved all permenant variables to .Privates in case of Memswap  ; 15 Aug 83 BD Added Window and Region routines and suppport throughout  ; 15 Aug 83 BD Fixed GR_CV_XY to calculate out-of-plane coordinates correctly  ; 15 Aug 83 BD Fixed all routines to accept Enabled parameter as color mask  ; 15 Aug 83 BD Modified Arc drawing routine to work with new arc clipper       0 DA_Zoom .Byte 46H  GR_Zoom_P .Byte 00H 0  DA_CSR_Form .Byte 4BH 0.Byte 00H 0.Byte 40H 0.Byte 00H   DA_Mask .Byte 4AH  GR_Mask_L .Byte 0FFH  GR_Mask_H .Byte 0FFH 0 DA_CSR_W .Byte 49H  GR_Ead .Word 0000H  GR_Dad .Byte 00H 0  DA_Text_Zeros .Byte 78H ; Alternate pattern, must be zeros  .Block 8,0   DA_Text_W .Byte 78H  GR_Text_P1 .Byte 00H Continue calculating Row * 32 (Shl DX,1 (Add DX,AX ; Make Row * 40 by adding Row * 8 + Row * 32 (Add DH,40H ; Start at first plane (.ELSE (Shl DX,1 ; Continue calculating Row * 64 (Shl DX,1 (Shl DX,1 (.ENDC (  $90: Mov AX,CX ; Yes, handle pathological case slower (Sar AX,1 ; Perform signed Col Div 16 (Sar AX,1 (Sar AX,1 (Sar AX,1  GR_Text_P2 .Byte 00H  GR_Text_P3 .Byte 00H  GR_Text_P4 .Byte 00H  GR_Text_P5 .Byte 00H  GR_Text_P6 .Byte 00H  GR_Text_P7 .Byte 00H  GR_Text_P8 .Byte 00H   DA_Scroll .Byte 70H  GR_Sad_1 .Word Glob_Upper_Left  GR_SL_1 .Word 1E00H  GR_Sad_2 .Word 0000H  GR_SL_2 .Word 0000H   DA_Vect_W .Byte 4CH  GR_V_P1 .Byte 00H  GR_V_P2 .Word 0000H  GR_V_P4 .Word 0000H  GR_V_P6  Add DX,AX ; Add in word offset of column to address (Sal CL,1 ; Get Mod 16 * 16 part for bit offset (Sal CL,1 (Sal CL,1 (Sal CL,1 (Ret ( ( (.IF Is_APC_III (  SetDrawPage: (Les SI,ROM_Draw ; Get current ROM BIOS drawing page (Mov AL,ES:(SI) (Cmp SS:Cur_Draw_Page,AL (Je $90 (Call GR_Wait ; It's different from what we want, set ours (Mov AL,SS:Cur_Draw_Page (Out GR_Draw_Page,AL  $90: Ret ( (   .Word 0000H  GR_V_P8 .Word 0000H  GR_V_P10 .Word 0000H (  DA_Write .Equ $  GR_Wrt .Byte 00H  GR_Wrt_P1 .Byte 00H  GR_Wrt_P2 .Byte 00H (   GR_CSR: (Call GR_XY_CV ; Calculate graphics cursor position (CX, DX) GR_CSR_W: (Mov GR_Ead,DX ; Set up cursor command block (Mov GR_Dad,CL  GR_CSR_R: (Mov CX,3 ; Execute command block (Lea BX,DA_Csrw (Jmp GRM_Out (  GR_Vect_W:   ResetDrawPage: (Les SI,ROM_Draw ; Get current ROM BIOS drawing page (Mov AL,ES:(SI) (Cmp SS:Cur_Draw_Page,AL (Je $90 (Mov AH,AL ; It's different from what we just used (Call GR_Wait (Mov AL,AH (Out GR_Draw_Page,AL  $90: Ret ( (.ENDC ( ( (.Include 7220.Arc.Text (.Include 7220.Flood.Text (.Include 7220.Misc.Text (.Include 7220.Rect.Text (.Include 7220.Circl.Text   (.End  (Lea BX,DA_Vect_W ; Set up drawing parameter vector with CX params (Jmp GRM_Out ( GR_Vect_E: (Call GR_GDC_C1 ; Execute parameter vector (Mov AL,Vect_E_Cmd (Out GR_Cmd,AL (Ret (  GR_Text_Zeros: (Lea BX,DA_Text_Zeros ; Declare text parameter vector (Jmp GRM_Out ( GR_Text_W: (Lea BX,DA_Text_W ; Declare text parameter vector (Jmp GRM_Out ( GR_Text_E: (Call GR_GDC_C1 ; Execute text parameter vector (Mov AL,Text_E_Cmd (Out GR_$CURSOR $EQUAL $TAG $SYNTAX $LAST .O.R3Cmd,AL (Ret (  GR_Read: (Call GR_GDC_C1 ; Execute read data (Mov AL,GR_Read_W (Out GR_Cmd,AL (Ret ( GR_Mask: (Mov CX,2 ; Set up drawing mask (Lea BX,DA_Mask (Jmp GRM_Out (  GR_Mode: (And BL,03H ; Set modification mode BL (Or BL,GR_Wrt_W (Mov GR_Wrt,BL (Xor CX,CX (Lea BX,DA_Write (Jmp GRM_Out (  GR_GDC_C1: (In AL,GR_Status ; Wait until controller idle (Test AL,01H ; Is there a read in progress ? (Jnz $01 (Test AL,04H ; No, is the controller busy ? (Jz GR_GDC_C1  $01: Ret (  GR_Scroll: (Mov CX,8 ; Set up display regions (Lea BX,DA_Scroll  $00: In AL,GR_Status ; Wait until vertical sync is down (Test AL,20H (Jnz $00  $01: In AL,GR_Status ; Ok, now wait until it is up (Test AL,20H (Jz $01 (  GRM_Out: (Call GR_GDC_C1 ; Issue a command bloc ;  ; Beginning of 7220.Arc Include File  ;   AR_X_Start .Equ 28 ; Offset of X coordinate  AR_Y_Start .Equ 26 ; Offset of Y coordinate  AR_Radius .Equ 24 ; Offset of radius  AR_Oct_Start .Equ 22 ; Offset of starting octant  AR_Len_Start .Equ 20 ; Offset of number of dots in start  AR_Oct_End .Equ 18 ; Offset of ending octant  AR_Len_End .Equ 16 ; Offset k at BX with CX params (Mov AL,(BX) (Out GR_Cmd,AL (Jcxz $02  $01: Inc BX (Mov AL,(BX) (Out GR_Para,AL (Loop $01  $02: Ret   GR_Wait: (In AL,GR_Status ; Wait until all parameters are eaten (Test AL,02 (Jnz GR_Wait ( (Mov AL,DA_Zoom ; Output a dummy command and wait until (Out GR_Cmd,AL ; ... it is accepted, which indicates the  $01: In AL,GR_Status ; ... termination of the previous command (Test AL,04 of number of dots in end  AR_Trunc .Equ 14 ; Offset of counterclockwise max dots  AR_Round .Equ 12 ; Offset of clockwise maximum dots  AR_Pattern .Equ 10 ; Offset of draw pattern  AR_Color .Equ 8 ; Offset of color  AR_Enabled .Equ 6 ; Offset of planes enabled  AR_Overlay .Equ 4 ; Offset of overlay mode  (Jz $01 (Test AL,08 (Jnz $01 (Ret ( (  GR_XY_CV: ; Convert point (CX,DX) into offset (DX,CL) (Add CX,SS:X_Clip_Base ; Make clip-relative coordinates into global (Add DX,SS:Y_Clip_Base  GR_Raw_CV: (Sub DX, ; Make the (0, 0) point at the lower left (Neg DX (Shl DX,1 ; Get Row * 8 (Shl DX,1 (Shl DX,1 ( (.IF Is_APC_III (Mov AX,DX ; Save Row * 8 for later addition (Shl DX,1 ;        Arc: ; Draw an arc according to the parameters on the stack  (Mov BP,SP ; Set up stack addressing (Mov GR_V_P8,0FFFFH ; Setup D1 := -1 (Mov BX,(BP+AR_Radius) ; Load radius (Dec BX (Jns $00 ; Is there anything to draw ? (Jmp $99   $00: SetUniverse (Mov GR_V_P4,BX ; Setup D := Radius - 1 (Shl BX,1 (Mov GR_V_P6,BX ; Setup D2 := 2 x (Radius - 1) (Mov AL,(BP+AR_Pattern) ; Get pattern  Mov AH,AL  $09: Inc BX ; Yes, make sure we don't draw major axis (Jmp $10  $11: Or DI,DI ; Yes, is this the end of the draw ? (Jz $13 (Mov CX,(BP+AR_Trunc) (Cmp (BP+AR_Len_Start),CX ; Yes, but will the start draw collide ? (Jne $10 (Mov CX,(BP+AR_Oct_Start) ; Maybe, are octants next to each other ? (Inc CX (And CL,07H (Cmp CL,AL (Jne $10  $13: Dec SI ; No, make sure there is no later collision  $10: Or (Mov GR_Text_P1,AX (Mov CX,2 (Call GR_Text_W ; Set up pattern (Mov SI,(BP+AR_Trunc) (Mov AX,(BP+AR_Round) ( (Xor DI,DI ; Indicate that the last part needs to be drawn (Mov DX,(BP+AR_Oct_Start) $ Test DL,01H ; Is this a counterclockwise draw ? (Jz $40 (Mov BX,(BP+AR_Len_Start) (Cmp BX,AX ; Is Dots_Missing > Round ? $ Jle $41 (Mov BX,AX ; Yes, keep this in line  BX,BX ; Make sure missing is non-negative (Jns $12 (Xor BX,BX  $12: Cmp BX,SI ; Is there more count than missing ? (Jle $20 (Jmp $90   $20: Mov CX,(BP+AR_X_Start) ; Draw arc around (X,Y) (Mov DX,(BP+AR_Y_Start) (Test AL,03H ; Does this draw originate on the X-axis ? (Jpo $23 (Test AL,06H ; Yes, is octant in positive Y ? (Jpo $21 (Add CX,(BP+AR_Radius) ; Yes, start to right of origin (Jmp $30  $41: Cmp DX,(BP+AR_Oct_End) (Jne $42 ; Is the last octant the same as the first ? $ Mov CX,(BP+AR_Len_End) (Cmp CX,(BP+AR_Len_Start) (Jl $42 ; Yes, and is the arc wholly contained ? $ Inc DI ; Yes, we will draw ending part here, too $ Mov AX,CX ; Stop draw short for ending part  $42: Mov CX,BX ; Set up starting X point (Jmp $52  $40: Xor BX,BX ; Draw counter clockwise  $21: Sub CX,(BP+AR_Radius) ; No, start to left of origin (Jmp $30  $23: Test AL,04H ; No, is octant in positive X ? (Jnz $22 (Add DX,(BP+AR_Radius) ; Yes, start above origin (Jmp $30  $22: Sub DX,(BP+AR_Radius) ; No, start below origin $  $30: Mov GR_V_P10,BX ; Setup dots misssing (Mov GR_V_P2,SI ; Setup dot count (Lea BX,Arc_Dir_Table (Xlat (Or AL,20H ; Setup direction (Mov GR_V_P1,AL ( (Call GR_XY_ Mov AX,(BP+AR_Len_Start)  Cmp AX,SI ; Is Dot_Count > Trunc ? (Jle $45 (Mov AX,SI ; Yes, keep Dot_Count within limits  $45: Cmp DX,(BP+AR_Oct_End) (Jne $46 ; Is this also the ending octant ?  Mov CX,(BP+AR_Len_End) (Cmp AX,CX (Jl $46 ; Yes, and is the arc wholly contained ? (Inc DI ; Yes, we will draw ending arc here, too CV ; Set up cursor position command (Mov GR_Ead,DX (Mov GR_Dad,CL (Mov AH,(BP+AR_Color) ; Get Ramtek colors (Mov AL,(BP+AR_Enabled) (Lea BX,Color_Table ; Derive NEC colors (Xlat (Xchg AH,AL (Xlat (  $05: Shr AH,1 ; Is this plane even enabled ? (Jc $07  Shr AL,1 ; No, shift color out (Jmp $08  $07: Shr AL,1 ; Get low order bit into Carry (Push AX (Mov BX,CX ; Set up Dots_Missing to make ending angle  $46: Mov CX,AX ; Set up starting X point  Dec CX (Jmp $52   $50: Dec DL ; Move on to next octant (And DL,07H (Cmp DX,(BP+AR_Oct_End) (Jne $51 ; Is this the last octant ? (Inc DI ; Yes, set termination flag  $51: Xor BX,BX ; Assume entire octant will be drawn (Test DL,01H ; Is this a counterclockwise draw ?(Mov BL,(BP+AR_Overlay) ; Get overlay mode (Jc $04 ; Should a color be drawn ? (Or BL,BL ; No, but is this replace mode ? (Jne $06 (Mov BL,2 ; Yes, set mode to clear  $04: Call GR_Mode ; Set up overlay mode (Call GR_CSR_R ; Set cursor to (X_Start, Y_Start) in plane (Mov CX,0BH ; Declare vector parameters (Call GR_Vect_W (Call GR_Vect_E ; Execute vector   $06: Pop AX  $08: (.IF  (Jz $55 (Mov AX,(BP+AR_Round) ; Set up Dot_Count to cover entire angle (Or DI,DI ; Is this the last octant ? (Jz $52 (Mov CX,(BP+AR_Len_End) ; Yes, stop at ending angle (Cmp CX,AX  Jge $52 ; Does Len_End overrun octant ? (Mov AX,CX ; No, use Len_End  Jmp $52  $55: Mov AX,(BP+AR_Trunc) ; Set up dot count for entire octant  Or DI,DI ; Is this the last octant ?  Is_APC_III (Addbim GR_Ead+1,40H ; Move to next plane (.ELSE (Incmb GR_Dad ; Move to next plane (.ENDC ( (Cmp AL,01H ; Are there more planes left ? (Jnz $05   $90: Ret     YV_Result .Equ 8 ; Offset of Function result  YV_Radius .Equ 6 ; Offset of Arc radius  YV_N .Equ 4 ; Offset of Point on arc 2 2; Calculate the n'th point on the arc 2; return the Y component of the point  Jz $52 (Mov BX,(BP+AR_Len_End) ; Yes, set up Dots_Missing for final angle  $52: Push DX (Push DI (Push AX (Push BX (Mov SI,AX ; Set up for call (Mov AX,DX (Call Draw_Arc ; Go draw the arc (Pop BX (Pop AX (Pop DI (Pop DX & Or DI,DI ; Are we finished ? (Jz $50  (ResetUniverse  $99: Retl 26 (  Draw_Arc: ; Draw an arc in octant AX, DC = SI, DM = BX (Test AL,01H  Y_Val: Mov BP,SP ; Establish stack environment ( (.If ~Is_Textron ( (Mov AX,(BP+YV_N) ; Get point we are interested in (Dec AX (Xor SI,SI ; Start X out at 0 (Mov CX,(BP+YV_Radius) (Mov DI,CX ; Start D out at 3 - 2 * Radius (Shl DI,1 (Neg DI (Add DI,0003H   $00: Cmp SI,AX ; Have we finished the loop (X >= Count) ? (Jge $10 (Or DI,DI ; Is D >= 0 ? (Js $05 (Dec CX  ; Is this a counterclockwise draw ? (Jnz $11 (Or BX,BX ; Yes, are we attempting draw on major axis ? (Jnz $10 (Cmp AX,(BP+AR_Oct_End) ; Yes, is this the end of the draw ? (Jne $09 (Cmp (BP+AR_Len_Start),0000H ; Yes, but will the start draw collide ? (Jne $10 (Mov CX,(BP+AR_Oct_Start) ; Maybe, are octants next to each other ? (Inc CX (And CL,07H (Cmp CL,AL (Jne $10        ; Yes, move in towards center (Mov BX,CX (Shl BX,1 ; Calculate new D := D - 4 * Y (Shl BX,1 (Sub DI,BX  $05: Mov BX,SI ; Add offset D := D + 4 * X + 6 (Shl BX,1 (Shl BX,1 (Add DI,BX (Add DI,0006H (Inc SI ; Go to next X (Jmp $00   $10: Mov (BP+YV_Result),CX ; Return Y value as function result ( (.ENDC ( (Retl 04    SU_Result .Equ 10 ; Offset of Function result C_Segment .Equ 2 ; Offset of return segment  GR_Color .Word 0000H GR_Enabled .Word 0000H   Rect_Fill: ; Clear/Set inside rectangle specified by parameters on stack ( (Mov BP,SP (Mov AX,(BP+C_Y_Start) (Mov CX,(BP+C_Y_Length) (Mov BX,(BP+C_X_Start) (Mov DX,(BP+C_X_Length) ( (.IF ~Is_Textron (Call Clip_R_Offsets ; Adjust and clip coordinates, lengths (.ENDC ( (Jne $02 ; Is there anything to draw ?  SU_Radius .Equ 8 ; Offset of Arc radius  SU_Max_Y_Val .Equ 6 ; Offset of Y ceiling  SU_N .Equ 4 ; Offset of X ceiling  2; Calculate the n'th point on the arc, or where arc 2; crosses Y = Max_Y_Val, return the X component of the point  Scan_Until: ( (.If ~Is_Textron ( (Mov BP,SP ; Establish stack environment (Mov AX,(BP+SU_N) ; Get point we are interested in (Mov DX,(BP+SU_Max_Y_Val) ; Get(Jmp Clear_Ret   $02: Mov (BP+C_Y_Start),AX (Mov (BP+C_X_Start),BX (Mov (BP+C_Y_Length),CX (Mov (BP+C_X_Length),DX (  Clear: ; Force a clear without checking coordinates (Movbim GR_V_P1,12H ; Set to graphics drawing mode (Mov BP,SP ; Set up environment just in case (Mov CX,(BP+C_Y_Length) (Dec CX (Mov GR_V_P2,CX ; Set up draw height - 1 (Mov AX,(BP+C_Color) ; Get color (Lea BX,Color_Table (Xlat ;  limiting Y value (Xor SI,SI ; Start X out at 0 (Mov CX,(BP+SU_Radius) (Mov DI,CX ; Start D out at 3 - 2 * Radius (Shl DI,1 (Neg DI (Add DI,0003H   $00: Cmp SI,AX ; Have we finished the loop (X > Count) ? (Jg $10 (Cmp CX,DX ; Have we crossed our Y boundary ? (Jle $10 (Or DI,DI ; Is D >= 0 ? (Js $05 (Dec CX ; Yes, move in towards center (Mov BX,CX Translate Ramtek color into NEC color (Mov GR_Color,AX (Mov CX,0004H ; Set up shift count  Mov AX,(BP+C_Enabled) (Xlat ; Translate Ramtek mask into NEC mask  Mov BL,AL (Shl AX,CL ; Make 3 (actually 4) copies of the plane mask  Or AL,BL (Mov AH,AL  Mov GR_Enabled,AX  (Mov AX,CS ; Is this an internal call? (Cmp AX,(BP+C_Segment) (Je $00 (SetUniverse ( (Shl BX,1 ; Calculate new D := D - 4 * Y (Shl BX,1 (Sub DI,BX  $05: Mov BX,SI ; Add offset D := D + 4 * X + 6 (Shl BX,1 (Shl BX,1 (Add DI,BX (Add DI,0006H (Inc SI ; Go to next X (Jmp $00   $10: Mov (BP+SU_Result),SI ; Return X value as function result ( (.ENDC ( (Retl 06  ;  ; End of 7220.Arc Include File  ;      $00: Movbim GR_Mask_L,0FFH ; Set bit mask to get all bits (Movbim GR_Mask_H,0FFH (Lea BX,GR_Text_P1 ; Set up solid text image (Note -- CX := 4!)  $06: Mov AX,0FFFFH (Mov (BX),AX (Inc BX (Inc BX (Loop $06 (Mov CX,8 (Call GR_Text_W ; Set up text parameters  (Mov AX,(BP+C_X_Start) ; Get X Coordinate (Mov CX,AX (Add AX,SS:X_Clip_Base (And AX,000FH ; Does this start on a word boundary ? (Jz $20 (Mov BX,0010H  ; Calculate 16 - X Mod 16 (Sub BX,AX (Mov AX,(BP+C_X_Length) ; Get X length (Cmp AX,BX ; Use the lesser (Jbe $13 (Mov AX,BX  $13: Mov GR_V_P4,AX ; Set X count (Mov GR_V_P6,AX (Add (BP+C_X_Start),AX ; Next operation starts ahead (Sub (BP+C_X_Length),AX ; Next operation is shorter (Mov DX,(BP+C_Y_Start) ; Get Y Coordinate (Call GR_XY_CV (Mov SI,GR_Color   $11: Shr GR_Enabled,1 ; Should we even draw in this plane ? $EQUAL $CURSOR $LAST $TAG $SYNTAX O.R( Jc $16 (Shr SI,1 ; No, trash this bit (Jmp $15  $16: Push CX ; Save high order address (Call GR_CSR_W ; Set up cursor address (Mov BL,(BP+C_Overlay) ; Set, use specified mode (Shr SI,1 ; Should we draw in this plane ? (Jc $12 (Or BL,BL ; No, but is this replacement mode ? (Jne $14 (Mov BL,2 ; Yes, set mode to clear  $12: Call GR_Mode (Mov CX,0007H (Call GR_Vect_W (Call GR_Text_E ; Execute clear draw  $14: Pop CX  $15: (.IF Is_APC_III (Add DH,40H ; Move to next plane (.ELSE  Inc CL ; Move to next plane (.ENDC ( (Cmp SI,0001H ; IS there another plane ? (Jne $11 (Shr GR_Enabled,1 ; Shift trailer bit out   $20: Mov AX,(BP+C_X_Length) ; Get X Length (And AX,0FFF0H ; Is there enough to do a block clear on ? (Jz $30 (Mov BX,AX (Mov CL,04H ;  ; Beginning of 7220.Rect Include File  ;   C_X_Start .Equ 16 ; Offset of X coordinate  C_Y_Start .Equ 14 ; Offset of Y coordinate  C_X_Length .Equ 12 ; Offset of X length  C_Y_Length .Equ 10 ; Offset of Y length  C_Color .Equ 8 ; Offset of color mask  C_Enabled .Equ 6 ; Offset of planes enabled  C_Overlay .Equ 4 ; Offset of overlay mode       (Shr AX,CL ; Get word count (divide by 16) (Mov GR_V_P4,AX ; Set X count (Mov GR_V_P6,AX  Mov CX,(BP+C_X_Start) ; Get X Coordinate (Mov DX,(BP+C_Y_Start) ; Get Y Coordinate (Add (BP+C_X_Start),BX ; Next operation starts ahead (Sub (BP+C_X_Length),BX ; Next operation is shorter (Call GR_XY_CV (Mov SI,GR_Color   $21: Shr GR_Enabled,1 ; Should we even draw in this plane ? (Jc $26 (Shr SI,1 ; No, trash this (Call Clip_R_Offsets ; Adjust and clip coordinates, offsets (Jz $03 ; Is there anything to draw ? (Mov (BP+RP_Start_X),BX (Mov (BP+RP_Rect_X),DX (Mov (BP+RP_Start_Y),AX (Mov (BP+RP_Rect_Y),CX (SetUniverse (Call Rect_Draw_Pat  ResetUniverse  $03: (.ENDC (  Retl 22 ( (.IF ~Is_Textron (  Rect_Draw_Pat: ; Draw a pattern according to parameters on stack (Movbim GR_V_P1,12H ; Set up direction and modcolor bit (Jmp $25  $26: Push CX ; Save high order address (Call GR_CSR_W ; Set up cursor address (Call GR_Mask ; Set up to do ALL bits, word oriented (Mov BL,(BP+C_Overlay) ; Use specified mode (Shr SI,1 ; Should we draw in this plane ? (Jc $22 (Or BL,BL ; No, but is this replace ? (Jne $23 (Mov BL,2 ; Yes, set mode to clear  $22: Call GR_Mode (Mov CX,0007H (Call GR_Vect_W e (Mov AX,(BP+RP_Pat_X) ; Calculate number of bytes in row (Or AX,AX ; Is pattern X length zero ? (Je $03 (Add AX,000FH ; Include right padding (Mov CL,03H (Shr AX,CL (Mov RP_Row_Size,AX  (Cmp (BP+RP_Pat_Y),0000H ; Is the pattern Y length zero ? (Jne $04  $03: Jmp RP_Ret   $04: Xor BX,BX (Mov RP_R_Row,BX ; Start on row 0 of rectangle (Call GR_Text_E ; Execute clear draw  $23: Pop CX  $25: (.IF Is_APC_III (Add DH,40H ; Move to next plane (.ELSE  Inc CL ; Move to next plane (.ENDC ( (Cmp SI,0001H ; IS there another plane ? (Jne $21 (Shr GR_Enabled,1 ; Shift the trailer bit out  $30: (Mov AX,(BP+C_X_Length) ; Get X Length (Or AX,AX ; Is there any residual ? (Jz Clear_Ret (Mov GR_V_P4,AX ; Set X count (M(Mov BX,(BP+RP_Pat_Y_Start) ; Get starting row of pattern (Mov RP_P_Row,BX (Mul BX ; Calculate offset from start of pat (Add AX,(BP+RP_Pattern) ; Set up working pattern ptr (Mov RP_Pat_T,AX (  Pat_Block: (Mov AX,(BP+RP_Pat_X_Start) ; Where to start for left side (Mov RP_P_Col,AX (Mov AX,(BP+RP_Rect_X) ; Count backwards from last (Mov RP_R_Col,AX ; rectangle column (Mov AX,(BP+RP_Start_X) ; Gov GR_V_P6,AX  Mov CX,(BP+C_X_Start) ; Get X Coordinate (Mov DX,(BP+C_Y_Start) ; Get Y Coordinate (Call GR_XY_CV (Mov SI,GR_Color   $31: Shr GR_Enabled,1 ; Should we even draw in this plane ? (Jc $35 (Shr SI,1 ; No, trash this color bit (Jmp $34  $35: Push CX ; Save high order address (Call GR_CSR_W ; Set up cursor address (Mov BL,(BP+C_Overlay) ; Use specified mode et working rectangle column (Mov RP_Cur_X,AX (  Pat_Col: (Mov DX,RP_R_Row ; Get working rectangle row (Mov AX,RP_P_Row ; Get working pattern row (Mov RP_P_Row_T,AX (Mov SI,RP_Pat_T ; Get pattern source row pointer (Mov BX,RP_P_Col ; Get pattern column number (Mov CL,BL (Shr BX,1 ; Calculate byte offset to SI (Shr BX,1 (Shr BX,1 (And CL,07H ; Calculate shift count (Shr SI,1 ; Should we draw in this plane ? (Jc $32 (Or BL,BL ; No, but is this replace mode ? (Jne $33 (Mov BL,2 ; Yes, set mode to clear  $32: Call GR_Mode (Mov CX,0007H (Call GR_Vect_W (Call GR_Text_E ; Execute clear draw  $33: Pop CX  $34: (.IF Is_APC_III (Add DH,40H ; Move to next plane (.ELSE  Inc CL ; Move to next plane (.ENDC ( (Cmp SI,0001H ; I(Lea DI,GR_Text_P8 ; Get pointer to base of image buffer  Pat_Row: (Mov AX,SS:(BX)(SI) ; Get pattern byte and padding (Shr AX,CL ; Shift desired bits into bit 0 (Mov (DI),AL ; Store in image buffer (Dec DI (Inc RP_P_Row_T ; Go to next pattern row (Inc DX ; Go to next rectangle row (Add SI,RP_Row_Size ; Go to next pattern row (Mov AX,RP_P_Row_T ; Should we wS there another plane ? (Jne $31   Clear_Res:  Mov AX,CS ; Is this an internal call? (Cmp AX,(BP+C_Segment) (Je Clear_Ret (ResetUniverse (  Clear_Ret: (Retl 14   RP_Start_X .Equ 24 ; Offset of starting X coordinate  RP_Start_Y .Equ 22 ; Offset of starting Y coordinate  RP_Rect_X .Equ 20 ; Offset of rectangle X size  RP_Rect_Y .Equ 18 ; Offset of rectangle Y size rap pattern around ? (Cmp AX,(BP+RP_Pat_Y)  Jne $01 (Mov SI,(BP+RP_Pattern) ; Yes, start on row 0 again (Mov RP_P_Row_T,0000H (  $01: Cmp DX,(BP+RP_Rect_Y) ; Are we at the top of the rectangle ? (Je $02 (Test DX,0007H ; Have we formed a block of 8 ? (Jne Pat_Row (  $02: Mov AX,RP_R_Col ; Draw R_Col Min 8 columns (Cmp AX,0008H (Jb $03 (Mov AX,0008H  RP_Pattern .Equ 16 ; Offset of pattern pointer  RP_Pat_X .Equ 14 ; Offset of pattern X size  RP_Pat_Y .Equ 12 ; Offset of pattern Y size  RP_Pat_X_Start .Equ 10 ; Offset of starting pattern column  RP_Pat_Y_Start .Equ 8 ; Offset of starting pattern row  RP_Color .Equ 6 ; Offset of color plane address  RP_Overlay .Equ 4 ; Offset of overlay mode  RP_Row_ $03: Mov GR_V_P4,AX ; Setup D := number of columns (Mov GR_V_P6,AX ; Setup D2 := number of columns (Push DX (Dec DX ; Draw DX Mod 8 (0 -> 8) rows (And DX,0007H (Mov GR_V_P2,DX ; Setup DC := number of rows - 1  (Mov CX,RP_Cur_X ; Get X Coordinate (Mov DX,(BP+RP_Start_Y) ; Get Y Coordinate (Call GR_XY_CV (Mov AX,(BP+RP_Color) ; Get color plane (Lea BX,Plane_Table (XlaSize .Word  RP_R_Row .Word  RP_P_Row .Word  RP_Pat_T .Word  RP_R_Col .Word  RP_P_Col .Word  RP_Cur_X .Word  RP_P_Row_T .Word   Rect_Pat: ; Fill rectangle with a pattern ( (.IF ~Is_Textron ( (Mov BP,SP ; Set up stack addressing ( (Mov BX,(BP+RP_Start_X) (Mov DX,(BP+RP_Rect_X) (Mov AX,(BP+RP_Start_Y) (Mov CX,(BP+RP_Rect_Y)      t ; Translate Ramtek color into NEC color ( (.IF Is_APC_III (And DH,3FH (Or DH,AL ; Add in color plane bits (.ELSE (Or CL,AL ; Add in color plane bits (.ENDC ( (Call GR_CSR_W ; Set up cursor address ( (Mov CX,8 (Call GR_Text_W ; Set up text parameters (Mov BL,(BP+RP_Overlay) ; Set mode parameter (Call GR_Mode (Mov CX,0007H (Call GR_Vect_W  GR_Vect_E ; Execute vector (  $06: Pop AX  $08: (.IF Is_APC_III  Addbim GR_Ead+1,40H ; Move to next plane (.ELSE  Incmb GR_Dad ; Move to next plane (.ENDC ( (Cmp AL,01H ; Are there more planes left ? (Jnz $05 (ResetUniverse  $01: (Retl 16    UP_Pattern .Equ 20 ; Offset of pointer to nibble pattern  UP_Pat_X .Equ 18 ; Offset of number of columns (Call GR_Text_E ; Execute clear draw  (Add RP_P_Col,0008H ; Count up 8 pattern columns (Mov AX,(BP+RP_Pat_X) ; Get number of pattern columns  $07: Cmp AX,RP_P_Col ; Have we run out of pattern cols ? (Ja $05 (Sub RP_P_Col,AX ; Yes, adjust back to beginning  Jmp $07  $05: Pop DX (Add RP_Cur_X,0008H ; Move cursor over 8 (Sub RP_R_Col,0008H ; Count down 8 rectangle columns  UP_Pat_Y .Equ 16 ; Offset of number of rows UP_Red_Pat .Equ 14 ; Offset of red pattern  UP_Uses_Red .Equ 12 ; Offset of red usage boolean  UP_Green_Pat .Equ 10 ; Offset of green pattern  UP_Uses_Green .Equ 8 ; Offset of green usage boolean  UP_Blue_Pat .Equ 6 ; Offset of blue pattern  UP_Uses_Blue .Equ 4 ; Offset of blue usage boolean  UP_Last_Col .Word (Jbe $06 (Jmp Pat_Col   $06: Mov RP_R_Row,DX ; Adjust working rectangle row (Mov AX,RP_P_Row_T ; Adjust working pattern row (Mov RP_P_Row,AX (Add (BP+RP_Start_Y),0008H ; Adjust drawing rectangle row (Mov RP_Pat_T,SI ; Adjust working pattern ptr  (Mov AX,RP_R_Row ; Have we run out of rectangle rows ? (Cmp AX,(BP+RP_Rect_Y) (Je RP_Ret (Jmp Pat_Block (  RP_Ret: (Ret ( (.ENDC (   UP_Next_Color .Word  UP_Next_Pattern .Word  UP_Reset_Col .Word   Unpack: ; Unpack a nibble pattern into constituent colors  (.IF ~Is_Textron ( (Mov BP,SP ; Set up stack access (Xor AH,AH ; Initialize color usage flags ( (Mov BX,(BP+UP_Pat_X) ; Get number of columns  Mov CX,BX (Inc BX ; Calculate (Pat_X + 3) Div 4 * 2 (Shr BX,1 (Inc BX (And BL,0FEH Box: ; Draw a box according to the parameters on the stack   Mov BP,SP ; Set up stack addressing ( (Mov DX,(BP+L_X_Length) (Mov CX,(BP+L_Y_Length) (Xor AL,AL ; Clear direction (Or DX,DX ; Is X' < 0 ? (Jns $01 (Neg DX ; Yes, take absolute value (Or AL,02H ; Refine direction  $01: Or CX,CX ; Is Y' < 0 ? (Jns $02 (Neg CX ; Yes, take absolute value (Inc AL (Mov UP_Next_Pattern,BX ; Save number of bytes per pattern row ( (Mov BX,CX ; Calculate max number of bits per row (Add BX,000FH ; as (Pat_X + 15) Div 8 * 8 (And BL,0F8H (Sub BX,CX ; Calculate number of bytes left over (Dec BX ; as (Maxbits - Pat_X - 1) Div 8 (Shr BX,1 (Shr BX,1 (Shr BX,1 (Mov UP_Next_Color,BX ( (Add CX,0008H ; Set up for redundant trailer  ; Refine direction further  $02: Or AL,AL ; Is either X' or Y' < 0 (but not both) ? (Jpe $03 (Xchg DX,CX ; Exchange places for further calculations   $03: Lea BX,Box_Dir_Table ; Translate to appropriate direction (Xlat (Or AL,40H ; Draw a box (Mov GR_V_P1,AL ; Setup direction (Mov GR_V_P2,0003H ; Setup DC := 3 (Mov GR_V_P8,0FFFFH ; Setup D1 := -1 (Mov GR_V_P4,DX ; Setup D := X' (Mov UP_Last_Col,CX (  $30: Dec (BP+UP_Pat_Y) ; Are there any rows left ? (Jns $31  Jmp $90  $31: Xor CX,CX ; Initialize destination column count  Mov BX,(BP+UP_Pat_X) ; Where to recycle pattern (Mov UP_Reset_Col,BX   $05: Xor BL,BL ; Initialize source column count  Mov SI,(BP+UP_Pattern) (  $00: Mov AL,SS:(SI) ; Get new byte containing 2 nibbles (Mov GR_V_P10,DX ; Setup DM := X' (Mov GR_V_P6,CX ; Setup D2 := Y' (  B_L_Draw: ; Draw either box or line, CX, DX are related to X', Y' (Or CX,CX (Je $01 ; Is there anything to draw ? (Or DX,DX (Je $01 ; Is there anything to draw ? (SetUniverse (Mov AL,(BP+L_Pattern) ; Get pattern (Mov AH,AL (Mov GR_Text_P1,AX (Mov CX,2 (Call GR_Text_W ; Set up pattern ( (Mov CX,(BP+L_X_Start) ; Get starting coord $01: Or AH,AL ; Record color usage (Shr AL,1 ; Move red bit into Carry (Rcr DH,1 ; Shift bit into red array (Shr AL,1 ; Move green bit into Carry (Rcr DL,1 ; Shift bit into green array (Shr AL,1 ; Move blue bit into Carry (Rcr BH,1 ; Shift bit into blue array (Shr AL,1 (Inc CX $03: Test CL,07H ; Move on toinates (Mov DX,(BP+L_Y_Start) (Call GR_XY_CV ; Set up cursor position command (Mov GR_Ead,DX (Mov GR_Dad,CL (Mov AH,(BP+L_Color) ; Get Ramtek colors (Mov AL,(BP+L_Enabled) (Lea BX,Color_Table ; Derive NEC colors (Xlat (Xchg AH,AL (Xlat (Mov SI,(BP+L_Pattern) ; Get pattern   $05: Shr AH,1 ; Is drawing on this plane even enabled ? (Jc $07  Shr AL,1 ; No, shift this color out (Jmp $08  next color byte ? (Jnz $04 (Mov DI,(BP+UP_Red_Pat) ; Yes, save red pattern byte (Mov SS:(DI),DH (Inc (BP+UP_Red_Pat) (Mov DI,(BP+UP_Green_Pat) ; Save green pattern byte (Mov SS:(DI),DL (Inc (BP+UP_Green_Pat) (Mov DI,(BP+UP_Blue_Pat) ; Save blue pattern byte (Mov SS:(DI),BH (Inc (BP+UP_Blue_Pat)  $04: Cmp CX,UP_Last_Col ; Are we at end of pattern row ? (Je $20  $07: Shr AL,1 ; Get low order bit into Carry (Push AX (Mov BL,(BP+L_Overlay) ; Get overlay mode (Jc $04 ; Should a color be drawn ? (Or BL,BL ; No, but is this replace mode ? (Jnz $06 (Mov BL,2 ; Yes, set mode to clear  $04: Call GR_Mode ; Set up overlay mode (Call GR_CSR_R ; Set cursor to (X_Start, Y_Start) in plane (Mov CX,11 ; Declare vector parameters (Call GR_Vect_W (Call       Cmp CX,UP_Reset_Col ; Should we repeat pattern ? (Jne $02 (Mov SI,(BP+UP_Pat_X) ; Yes, update next reset point (Add UP_Reset_Col,SI (Jmp $05  $02: Inc BL (Test BL,01H ; Move on to next pattern byte ? (Jnz $01 (Inc SI ; Yes, increment pointer (Jmp $00   $20: Neg CX ; Finish shifting pattern 8 - Col Mod 8 (And CL,07H (Jz $21 (Mov DI,(BP+UP_Red_Pat) (Mov CX,(BP+RW_Start_X); Get starting X coordinate (Call GR_XY_CV (Mov GR_Ead,DX ; Set up screen-relative coordinates for later (Mov GR_Dad,CL (Mov AL,01H ; Start at red plane (  $09: Mov RW_Nib_Bit,AL (Lea BX,Plane_Table ; Get plane address (Xlat ( (.IF Is_APC_III ( (Mov DX,GR_Ead ; Get screen word address (And DH,3FH ; Clear out plane address (Shl DX,1 ; Turn word address into byte address (Mov SI, ; Save red pattern byte (Shr DH,CL (Mov SS:(DI),DH (Mov DI,(BP+UP_Green_Pat) ; Save green pattern byte (Shr DL,CL (Mov SS:(DI),DL (Mov DI,(BP+UP_Blue_Pat) ; Save blue pattern byte (Shr BH,CL (Mov SS:(DI),BH  $21: Mov CX,UP_Next_Color (Add (BP+UP_Red_Pat),CX ; Move to next red row (Add (BP+UP_Green_Pat),CX ; Move to next green row (Add (BP+UP_Blue_Pat),CX ; Move to next blue row DX (Shr AL,1 ; Construct memory segment address (Shr AL,1 (Shr AL,1 (Or AL,0A0H (Mov AH,AL (Xor AL,AL (Mov ES,AX ; Setup segment for addressing (Lodsw AX,ES:(SI) (Xchg AL,AH ( (.ELSE ( (Andbim GR_Dad,0FCH ; Add in plane address (Or GR_Dad,AL ( (Call GR_CSR_R ; Issue cursor address command ( (Call GR_Mask ; Set up mask for word increments (Mov CX,0003H  Mov CX,UP_Next_Pattern ; Move to next pattern row (Add (BP+UP_Pattern),CX (Jmp $30 ( (  $90: Mov BX,(BP+UP_Uses_Red) ; Did we have any red patterns ? (Call $91 (Mov BX,(BP+UP_Uses_Green) ; Did we have any green patterns ? (Call $91 (Mov BX,(BP+UP_Uses_Blue) ; Did we have any blue patterns ? (Call $91 ( (.ENDC ( (Retl 18   $91: Xor CX,CX ; Set up for false (Shr AH,1 ; Move color bi(Call GR_Vect_W ; Issue vector (mode and word count) ( (Call GR_Read ; Start read $04: In AL,GR_Status (Test AL,01H ; Is read data ready ? (Jz $04 (In AL,GR_R_Data ; Yes, get low data byte (Mov AH,AL  $06: In AL,GR_Status (Test AL,01H (Jz $06 (In AL,GR_R_Data ; Get high data byte (Xchg AL,AH ( (.ENDC ( (Mov CL,RW_Init_Shift; Get X coordinate Mod 16 (BitFwd AX,CL ; Shift bit into position (Movt into carry (Rcl CL,1 ; Move color bit into bit 0 (Mov SS:(BX),CX ; Set boolean value (Ret (   RW_Start_X .Equ 12 ; Offset of starting X coordinate  RW_Start_Y .Equ 10 ; Offset of starting Y coordinate  RW_Array .Equ 8 ; Offset of starting memory address  RW_Cols .Equ 6 ; Offset of column count  RW_Rows .Equ 4 ; Offset of row count   DH,10H ; Calculate number of bits remaining (Sub DH,CL (Mov DI,(BP+RW_Array) ; Get array base (Xor BX,BX ; Set up image bit counter (Mov DL,RW_Nib_Bit ; Set up nibble color bit value (Mov CL,04H ; Set up color bit rotate count   $00: BitFwd AX,1 ; Get bit into carry (Jnc $01 ; Is the bit set ? (Or SS:(DI),DL ; Yes, set bit in nibble  $01: Rol DL,CL ; Rotate color bit  RW_Init_Shift .Byte ; Number of bits to shift for first column  RW_Nib_Bit .Byte ; Color bit in current nibble   Read: ; Read a string of words into memory from a specified address ( (Mov BP,SP ; Set up stack addressing (Cld (Mov AX,(BP+RW_Start_X); Get starting X coordinate (Mov DX,AX (Add AX,SS:X_Clip_Base ; Convert to global coordinates (And AX,000FH ; Calculate X Mod 16 (Mov RW_Init_Shift,AL ( (SetUniverse ( (Mov (Inc BX ; Are there any more image bits ? (Cmp BX,(BP+RW_Cols) (Jnz $05  (Mov AL,RW_Nib_Bit ; Go to next color plane (Shl AL,1 (Cmp AL,08H ; Are we out of planes ? (Jnz $09 (  $12: Pop CX ; Go to next row (Add (BP+RW_Array),CX (Inc (BP+RW_Start_Y) (Jmp $10   $05: Test BL,01H ; Is it time to move to a new byte ? (Jnz $02 (Inc DI ; Yes, move to new byte  $02: Dec D CX,(BP+RW_Cols) ; Get image and array length (Mov BX,CX (Inc CX ; Calculate number of bytes in nibble row (Shr CX,1 (Inc CX (And CL,0FEH (Jnz $15 ; Are there any colums to grab ?  $98: Jmp $99 (  $15: Add DX,BX ; Check to see that we are in clipping region (Dec DX (Sub DX,SS:X_Clip (Jbe $20 (Sub BX,DX ; We are not in region, adjust to right edge (Mov (BP+RW_Cols),BX (  $20: H ; Is this word exhausted ? (Jnz $00  $03: (.IF Is_APC_III ( (Lodsw AX,ES:(SI) ; Yes, get next word (Xchg AL,AH ( (.ELSE (  In AL,GR_Status (Test AL,01H ; Is read data ready ? (Jz $03 (In AL,GR_R_Data ; Yes, get low data byte (Mov AH,AL  $07: In AL,GR_Status (Test AL,01H (Jz $07 (In AL,GR_R_Data ; Get high data byte (Xchg AH,AL ( (.ENDC ( (Mov DH,10H (Jmp $00  (.IF Is_APC_III ( (Call GR_Wait ; Wait for current draw to terminate ( (.ELSE ( (Movbim GR_Mask_L,0FFH ; Set mask for word increments (Movbim GR_Mask_H,0FFH (Movbim GR_V_P1,02H ; Set up direction, mode for later (Add BX,AX ; Calculate image word count (Add BX,000FH (Shr BX,1 (Shr BX,1 (Shr BX,1 (Shr BX,1 (Mov GR_V_P2,BX ; Set up vector word count parameter for later ( (.ENDC (  $10: Dec (BP+RW_Rows) ; Are there a $99: ResetUniverse (Retl 10   (.IF ~Is_Textron (  Clip_R_Offsets: ; Adjust, then clip rectangle at (BX,AX) for (DX,CX) ( ; Return Z = 1 if zero length (Or DX,DX (Je $02 ; Is X length = 0 ? (Jns $00 ; Is X length positive ? (Neg DX ; No, make length positive (Sub BX,DX ; Adjust X coordinate  Jns $00 ; Did we just go negative ? (Add DX,BX (Xor BX,BX ny rows left ? (Js $98 (Push CX ; Save this for next row (Shr CX,1 ; Convert to a word count (Mov DI,(BP+RW_Array) ; Get nibble array base (Mov AX,SS ; Set up addressing in stack/heap (Mov ES,AX (Xor AX,AX (Rep Stosw (DI),AX ; Clear out nibble array ( (Mov DX,(BP+RW_Start_Y) ; Calculate image cursor address (Cmp DX,SS:Y_Clip ; Are we off clipping region ? (Jg $12       ; Yes, jam to zero  Jmp $03  $00: Inc BX ; Start filling to right of left border (Dec DX ; Fill up to and not including right border (Jns $03 (Xor DX,DX ; Force length to zero $03: Mov DI,BX (Add DI,DX (Sub DI,SS:X_Clip ; Are we off the top of the screen ? (Jbe $04 (Sub DX,DI ; Yes, bring it back in (Inc DX (  $04: Or CX,CX (Je $02 ; Is Y length = 0 ? [ptrptrYPSQRAX +HxZYأ[]_9;fF׆rP^r uN X;<uZY[X366666rvFnr$+-"/13PPSSPSPp tp u r336K6nFFFF42FF F ^| rt rF 6F6FH6FH6N V~JOv x- X[]Ȏ^v uM6K^Yo N(Jns $01 ; Is Y length positive ? (Neg CX ; No, make Y length positive (Sub AX,CX ; Adjust Y coordinate  Jns $01 ; Did we just go negative ? (Add CX,AX (Xor AX,AX ; Yes, jam to zero  Jmp $05  $01: Inc AX ; Start filling above bottom border (Dec CX ; Decrement for row count and to avoid top (Jns $05 (Xor CX,CX ; Force length to zero  $05: MV9;f F ׆rB^Pr u2^ u  u^};>o >o t/2IX;<uF&:?^YFfHx ؊FfHyNXzt^Ft t^g Fj FXuFm i Fl Mj k g h vl 6i 2 u:Vu 6C΀tuƊVt:vuЊ-Ok uh Nk ^2t h :Nt낈6i l *2[]*2Yo m VXuV[9;fF ׆rB^ Pr u2^ u  uov DI,AX (Add DI,CX (Sub DI,SS:Y_Clip ; Are we off the edge of the screen ? (Jbe $06 (Sub CX,DI ; Yes, bring it back in (Inc CX (  $06: Or DX,DX ; Set Z flag (Je $02  Or CX,CX  $02: Ret   .ENDC  ;  ; End of 7220.Rect Include File  ;    ^;>o >o tsvX;<uX{m .m i :Ntvk j >XrXuFFh g :NtZF^VN 2 y  y ;s X£Y ȋ_[)[+؉]FN ^V yupF^N V XN IYFף F׊ Ê ;Ft67FCC[F6%tX+؋F ;vã[]F)F V6 . rQ^r u(Yu. F %tVر[]NV^)^ F6 . r!Q^r u GRCORE GRCORE IV.0 [1e]Yu. F tJ[]NV6 . rQH^r u|CZYuЌ;Ft^VFNt^VFNXF tL~ u3ۉN^PFRF VFTFXNPZ6RVM6OZB6LZ;F u vZ;VtuӡT=r[]RJYXVF $C^\#:VF;Vw)VZX.TvINZPF6RN;FtËVN 2 y  y zѻ @XY_[a] tb t^    &F}G@FK@JIxxpL9;8bW\<lrû<NEH(hr rù5/ c3ɻcputùNp up trCppu/rptu66Ë_^Ky[]F F1vF 3Vt^;~;Vu N;N|GO3ۋF;~;Vu N;|GًI/ʀ;VuG3tF tN;} F t^RWPS [F FNV9;fF׆׋v rP^r u@ CFX;<u2^CCJك+KHFNy3ɋ^L2ۋv6 Au~65F~ 6F ~6=F;Ft;Lu v6LuFـt~65~ 6~6=HNN NJNa^ ^ ^36F 6%<NAAuJ6+v+ډ^67X؃YNxQ~Ў3V 6;pN O9;=׀&;;ptrX_Z tu u2;Fu~u'NA:uC tN9Nu NA:uN y3;~NV{{N+N uV+Va6Y X9;fF׆rP^r u X;<uËFH3N߃;} x I+FNFV3N߃;;~ x I+F݉v ptrĊ<*~3ۊ=s6C;^u=<uYNF iuGuptrptr tPy +y3CJy3ҋ6+>v+B t)y +y3@Iy3ɋ6+>v+A t FG3~ > tq++;>t>` y  + OF;ru ;>t4V+yF3JRV +yG3JRVWvvv RKS_N+Ay36++y؉Yۉ[]X V 6;QVYV +xK[V +By36++}؉Yۉ[]X N+xRZN6;Z)9;f67FG36aF6 $ Fu~tYN 6ȉN V 6ӉV 6@61~u8FtN V V Ӌ VW6;|uPYPPVH;~‡T;} ދ=^XQȋ@;} *-;~ދƇ_^;;u_YSQRWVPA;}F׆rP^r ue hkX;<uF ^ vVNF^v VNFN%v 2u+H3N3;%t%i x++++IF;vu3 uVJ@ u^ K;xu ;%t&H#N%H3v Hv23!3c3++xB;Vu3@ xE++++WPV+>!vW@)_! ^X_+!;Vr+VC;^u3I! uvN;xBHVy+36>++GyF;v|+vً#+ًOANy+3;^ r+^ 6.++EyNV^ v~FEZRV}΀2oo/:tF;}u[ZRWS*^_XX^_ZY[VWSQR9;D?:ZY[_^VWSQR9;6JzupZY[_^Äu];tY@3֊ʀt 3;u;vBq;}׃>Yt puu;Äu;t@֊ʂـt 3;u;~Jq;뎋2oo/Ë9;13//Ü$+ȝuP#΀YIt(3;ÉYXS     UPSQVWRJ@Fy+3;^ |+^ 6>++Gy׋~ϽV^ FNvWx@Y6; ZRNV-Z_^Y[X]USRQFy~+3;v|+v6++B}~}V#R+#J6+x3+#R+#ANy+3;^ |+^ NVF~v^ P txF FX FXx t 9FtF}YZ[]Ragoz~/8>#\`d9",5:?CLPY   % ; L P h t    Z ` g   04 Jul 85 BD Added DrawModes to Text call, optimized SetFont (UOP)  10 Feb 84 BD Fixed text down draw to clip correctly instead of early  15 Aug 83 BD Added {$N} directives where appropriate  15 Aug 83 BD Added Overlay_Mode parameter to Text procedure for XOR mode  15 Aug 83 BD Verified and corrected clipping in all routines  15 Aug 83 BD Added Window and Region routines and suppport throughout  15 Aug 83 BD Fixed all routines to accept Enabled parameter as color mask  15 Aug 83 BD Recoded   $ , 3 ; @ O S Z c s w    ( 3 8 < k n ~ *. /:=GKWv~%Wz"/i 0Zx~2qBQ]s  %!+4z ( t { U clS-D_( ",5:?CLPY   % ; L P h t    Z ` g  arc clipping routines (WHAT A BITCH!)  01 Jul 83 BD Added Draw_Result status variable  01 Jul 83 BD Added Set_Region call  01 Jul 83 BD Added Core fields for Global coordinate values  01 Jul 83 BD Added in Disp fields in Core record for windowing  10 Mar 83 BD Added clipping for lines and the cursor  10 Mar 83 BD Added version identifier, Graf_Version  08 Mar 83 BD Added Arc code and made circle procs call it  02 Mar 83 BD Added Flood procedure to do solid area filling XCLIP  -l +YCLIP  _ 4ARC 4GRCORE GRCORE START @ READ >CIRPAT 'SCANUNTIRECTPAT \REGION S XCLIPBAScU t  YCLIPBAS{ z!%PLANESAB(  ABLINE j RECTFILL BOX TEXTFAST CURDRAWPRDRAWPYVAL AREASOLIINIT yWINDOW v CPSTACKS  23 Feb 83 BD Added file prefix variable in CORE  23 Feb 83 BD Fixed incorrect memory space error handling in Write_Block...  23 Feb 83 BD Made initialized CORE variables consistent with RAMTEK  *)   {$B Is_Textron-}  Interface  "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignorDS CLEAR  STOP H CIRFILL TEXT q UNIVERSEP UNPACK N ed, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} $CURSOR $EQUAL $LOG $LAST $SYNTAX $TAG 2 1  z$z8 O.RHc(Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast,  { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction }  { GrafDraw Graphics Unit }  { by }  { Barry Demchak, Software Construction Inc. }  { for Ticom }  { December 30, 1982 }   {-R2}  {$R-,I- for speed only}  {$D Debug_Arcs-}  {$D Is_APC_III-}  {$D Is_Textron-}   {$B Is_Textron-}  Unit Graf_Draw;  {$E Is_Textron-}  {$B Is_Textron+}  Unit Tex_Graf_Draw;  {$E Is_Textron+}  {*** Does 8Top, { Top position } 8Center, { Center (horz/vert) position } 8Bottom); { Bottom position } 'Font_Type = -1..99; 'Pat_Type = -1..99; 'Color_Index = 0..15; 'Point = Integer; 'Point_Array = Array [1..128] Of Point; 'Sorcery = ^Integer; 'Win_Rec_P = ^Win_Rec; 'Win_Rec = Record 9Next_Window : Win_Rec_P; 9Win_X_Org, { Global drawspace coordinates } 9Win_Y_Org, 9Disp_X_Org, { Display screen coordinOverlay_Mode apply to pixel blocks ? }  {*** Find out what the text plane options mean for Set_Value }  (*** Function keys for conditional compile directives:    i|n  {$B Is_Textron-}|n  |e  |ual|e  |n  |.   i{$E Is_Textron-}|n  |n  |e  |u|ual|e  |n  |.   *)   (*  30 Aug 85 BD Added Universe calls  21 Aug 85 BD Added modifications for APC III  04 Jul 85 BD Added special case handling in Text for 8 pixel fonts      ates } 9Disp_Y_Org, 9Win_X_Size, { Window size in pixels } 9Win_Y_Size : Point; 7End {of Win_Rec}; ' 'Core_Record = Record 9X_Min, { Left edge of screen } 9X_Max, { Right edge of screen } 9Y_Min, { Top edge of screen } 9Y_Max, { Bottom edge of screen } 9 9X_Org, { X-origin of fill pattern } 9Y_Org, { Y-origin of fill pattern } 9 9X_CP, { X-current position } t_Value (Opcode, 7Value : Integer); " "Procedure Erase; " "Procedure Erase_Alpha; "  Procedure Flood; " "Procedure Arc_Rel (Radius : Integer; 5Start_Angle, 5End_Angle : Real; 1Var X_Start, 5Y_Start, 5X_End, 5Y_End : Integer); " "Procedure Arc_Abs (Var Radius : Integer; 5Var Start_Angle, 9End_Angle : Real; 9X_Start, 9Y_Start, 9X_End, 9Y_End : Integer);   Procedure Set_Region (X_Start, 8Y_Start, 8X_Length, 8Y_Length : Integer); 8 9Y_CP : Point;{ Y-current position } 9 9Line_Index, { Line color} 9Fill_Index, { Filled object color } 9Text_Index, { Text color} 9Background : Color_Index; { Background color } ; 9Line_Style : Integer; { Line pattern } 9Display_Mode : Display_Type; { Fast/Fill } 9Overlay_Mode : Overlay_Type; { Replace/Xor pixels } 9Polygon_Interior : Int_Type; { Plain/Patterned } 9Polygon_Edge : Edge_Type; { Solid_Line/Interior } 9 9Font_Number : Font_Type;  Procedure Set_Window (Window_Chain : Win_Rec_P); "  Procedure Set_Universes (Display, Draw : Integer); "  Implementation  {$E Is_Textron-}    {$B Is_Textron+}  Interface  "Const Graf_Version = 'Textron 0.2';  "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Sw{ Current font number } 9Font_Cols, { Columns per char } 9Font_Rows : Point; { Rows per char } 9 9Char_Spacing : Real; { Character pitch } 9Top_Bottom, { Above/below text } 9Left_Right, { Left/right of text } 9Char_Path : Directions; { Write direction } 9DX_Charup, { Char rotation X } 9DY_Charup : Integer; { Char rotation Y } 9Char_Height, { Rows to display } itch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction } 8Top, { Top position } 8Center, { Center (horz/vert) position } 8Bottom); { Bottom position } 9Char_Width : Integer; { Colums to display } 9 9Pat_Number : Pat_Type; { User pattern number } 9Pat_Cols, { Columns in pattern } 9Pat_Rows : Point; { Rows in pattern } 7 9File_Prefix : String[7]; { Prefix for font, text } 9 9Region_X_Org, 9Region_Y_Org : Point; {Draw region origin} 9 9Window_List : Win_Rec_P; {Chain of window records} 9Win_X_Res, 9Win_Y_Res : Point; {Deltas for window coords} 9 9Glob_X_Min, 9Glob_X_Max, 'Font_Type = -1..99; 'Color_Index = 0..15; 'Point = Integer; 'Point_Array = Array [1..128] Of Point; 'Sorcery = ^Integer; 'Core_Record = Record 9X_Min, { Left edge of screen } 9X_Max, { Right edge of screen } 9Y_Min, { Top edge of screen } 9Y_Max, { Bottom edge of screen } 9 9X_CP, { X-current position } 9Y_CP : Point;{ Y-current position } 9 9Line_Index, { Line color} 9Text_Index,9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); "  { Text color} 9Background : Color_Index; { Background color } ; 9Line_Style : Integer; { Line pattern } 9Overlay_Mode : Overlay_Type; { Replace/Xor pixels } 9 9Font_Number : Font_Type; { Current font number } 9Font_Cols, { Columns per char } 9Font_Rows : Point; { Rows per char } 9 9Top_Bottom, { Above/below text } 9Left_Right, { Left/right of text } 9Char_Path : Directions; { Write direction } "Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup 9Char_Height, { Rows to display } 9Char_Width : Integer; { Colums to display } 9 9File_Prefix : String[7]; { Prefix for font, text } 9 7 TextBlocked : Boolean; {Text draw mode}  9Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, = 0) And (Draw < Core^.Universes) And '(Display >= 0) And (Display < Core^.Universes)$GR_Clear (0, 0, Succ (Core^.X_Max), Succ (Core^.Y_Max), .Core^.Background, Planes_On, Replace); $If Core^.Background = Ord (C_Black) Then $ GR_Start; $If Kill_Cursor Then &Draw_Cursor (Cursor_X, Cursor_Y); "  {$B Is_Textron-} $Core^.Draw_Result := Draw_OK;  {$E Is_Textron-} " "End {of Erase}; " " " "Procedure Erase_Alpha; "Var Buffer : Packed Array [0..0] Of Char; "Begin $  {$B Is_Textron-} ${$B Is_APC_III+} $Core^.Draw_Result := Draw_Not_Imp; ${$E Is_APC_III+}  {$E Is_Textron-}  Then &Core^.Draw_Result := Draw_OK $Else &Core^.Draw_Result := Draw_Overflow; $If Core^.Draw_Result = Draw_OK Then  {$E Is_Textron-}  $ Begin (Core^.Draw_Universe := Draw; (Core^.Display_Universe := Display; (GR_Universe (Display, Draw); '  {$B Is_APC_III+} (DisplaySeq[0] := 26 {^Z}; (DisplaySeq[1] := Ord ('o') - Display * (Ord ('a') - Ord ('A'));  Unitwrite (1, DisplaySeq, 2,, 12);  {$E Is_APC_III-} " &End {of If}; "End {of Set_Universes}; " " "  {$B Is_Textron-} $ $ ${$B Is_APC_III-} $Buffer[0] := Chr (12); $Unitwrite (1, Buffer, 1); $Core^.Draw_Result := Draw_OK; ${$E Is_APC_III-} "End {of Erase_Alpha}; "   {$N+} "  {$B Is_Textron-} "Procedure Set_Window {Window_Chain : Win_Rec_P}; "Var Cur_Rec : Win_Rec_P; " X_Size, &X_Start, &Rec_Count : Integer; " Y_Array : Array [0..Max_Window] Of Record MY_Start, MY_Size : Integer; K Clipped : Boolean; KEnd {of Y_Array}; &Occupied : Set Of 0..Max_Coord; "Begin " With Core^ Do &Begin "Procedure Define_Color {Index, :Red, :Green, :Blue, :Blink, :Hard_Copy : Integer}; "Begin $Core^.Draw_Result := Draw_Not_Imp; "End {of Define_Color};  {$E Is_Textron-} " " " " "  {$B Is_Textron-} "Procedure Inq_Color {Var Index, ;Red, ;Green, ;Blue, ;Blink, ;Hard_Copy : Integer}; "Var Vect : Bit_Vector; "Begin $Vect.Int := Index; $If Vect.Arr[0] <> 0 Then &Red := 3 $Else &Red := 0; $If Vect.Arr[1] <> 0 Then &Green := 3 $Else &Green := 0; $If Vect.Arr[2] <> 0 Then      (Rec_Count := 0; (Cur_Rec := Window_Chain; (Draw_Result := Draw_OK; (Occupied := []; (While (Cur_Rec <> Nil) And (Draw_Result = Draw_OK) Do *With Cur_Rec^, Y_Array[Rec_Count] Do ,Begin .If (Win_X_Org < 0) Or (Win_Y_Org < 0) Or 1(Disp_X_Org < 0) Or (Disp_Y_Org < 0) Or 1(Win_X_Size < 0) Or (Win_Y_Size < 0) Then 0Draw_Result := Draw_Overflow .Else 0If (Win_X_Size <> Main_Window^.Win_X_Size) Or 3(Disp_X_Org <> 0) Or 3(Pred (Win_X_Org + Win_X_Size) > Glob_X_Max) Then 2Draw_Result := Draw_Win_Imp { Ending of Graf.Misc Include File } " "   0Else 2Begin 4Clipped := False; 4If Win_Y_Org Mod Win_Y_Res <> 0 Then 6Begin 8Y_Start := Win_Y_Org - Win_Y_Org Mod Win_Y_Res; 8Clipped := True; 8(*1 Writeln ('Clipping for Y resolution'); (*2*) 6End {of If} 4Else 6Y_Start := Win_Y_Org; 4If Disp_Y_Org + Win_Y_Size > Main_Window^.Win_Y_Size Then 6Begin 8Y_Size := Main_Window^.Win_Y_Size - Disp_Y_Org; 8Clipped := True; 8(*1 Writeln ('Clipping for Y display overflow'); (*2*) 6End {of If Y_Start} 4Else 6Y_Size := Win_Y_Size; 4If Pred (Y_Start + Y_Size) > Glob_Y_Max Then 6Begin 8Y_Size := Succ (Glob_Y_Max - Y_Start); 8Clipped := True; 8(*1 Writeln ('Clipping for Y space overflow'); (*2*) 6End {of If Pred}; 4(*1 Writeln ('Attempting window from ', Disp_Y_Org, ' to ', =Pred (Disp_Y_Org + Y_Size)); (*2*) 4Occupied := Occupied + F[Disp_Y_Org..Pred (Disp_Y_Org + Y_Size)]; , End {of Else}; .Rec_Count := Succ (Rec_Count); .Cur_Rec := Cur_Rec^.Next_Window; ,End {of With}; (If Draw_Result = Draw_OK Then *If (Occupi$CURSOR $EQUAL $TAG $LAST O.Rhed * [0..Pred (Main_Window^.Win_Y_Size)] <> ,[0..Pred (Main_Window^.Win_Y_Size)]) And (Window_Chain <> Nil) Then ,Draw_Result := Draw_Win_Imp *Else ,If Rec_Count <= Max_Windows Then .If Window_Chain <> Nil Then 0Begin 2Cur_Rec := Window_Chain; 2Rec_Count := 0; 2While Cur_Rec <> Nil Do 4With Cur_Rec^, Y_Array[Rec_Count] Do 6Begin 8If Win_X_Org Mod Win_X_Res <> 0 Then :Begin  Main_Window^.Win_X_Size Then :Begin  Glob_X_Max Then :Begin = 0 Then &Begin (Var_Dispose (Pat_Rec.Pat_Blue_Ptr, Pat_Im_Size); (Var_Dispose (Pat_Rec.Pat_Green_Ptr, Pat_Im_Size); (Var_Dispose (Pat_Rec.Pat_Red_Ptr, Pat_Im_Size); (Core^.Pat_Number := -1; & Pat_Rec.Pat_Is_Valid := False; &End {of If}; $Pat_Name := 'Patxx.Ptrn'; $Pat_Name[4] := Chr (Pattern_Num Div 10 + Ord ('0')); $Pat_Name[5] := Chr (Pattern_Num Mod 10 + Ord ('0'));  {$I-} 2Window_List := Window_Chain; 2GR_Stop; 0End {of Else Window_Chain} ,Else .Draw_Result := Draw_Win_Ovfl; &End {of With Core^}; "End {of Set_Window};  {$E Is_Textron-} " " " " "  {$B Is_Textron-} "Procedure Set_Region {X_Start, Y_Start, 8X_Length, Y_Length : Integer}; "Begin $With Core^ Do &Begin (Draw_Result := Draw_Overflow; (If (X_Length > 0) And (Pred (X_Start + X_Length) <= Glob_X_Max) Then *If (Y_Length > 0) And (Pred (Y_Start + Y_Length) <= Glob_Y_Max) Then ,Begin .If CSR_Is_En$Reset (Pat_File, Concat (Core^.File_Prefix, ':', Pat_Name)); $Core^.Draw_Result := Draw_Not_Found; $If IO_Result = 0 Then &If Blockread (Pat_File, Pat_Buff, 1) = 1 Then (With Pat_Buff, Pat_Rec Do *Begin ,Pat_Im_Size := (Pat_X + 23) Div 16 * Pat_Y; ,Have_Red := Var_New (Pat_Red_Ptr, Pat_Im_Size) = Pat_Im_Size; ,Have_Blue := Var_New (Pat_Green_Ptr, Pat_Im_Size) = Pat_Im_Size; ,Have_Green := Var_New (Pat_Blue_Ptr, Pat_Im_Size) = Pat_Im_Size; ,N_Words := (Pat_X + 3) Div 4 * Pat_Y; ,Have_Pattern := abled And CSR_Is_Visible Then 0Draw_Cursor (Cursor_X, Cursor_Y); .X_CP := 0; .Y_CP := 0; .X_Max := Pred (X_Length); .Y_Max := Pred (Y_Length); .Region_X_Org := X_Start; .Region_Y_Org := Y_Start; .GR_Region (X_Start, Y_Start, X_Length, Y_Length); .Cursor_X := 0; .Cursor_Y := 0; .If CSR_Is_Enabled And CSR_Is_Visible Then 0Draw_Cursor (0, 0) .Else 0Draw_Result := Draw_OK; ,End {of If (Y_Length}; &End {of With}; "End {of Set_Region};  {$E Is_Textron-} " "  {$N^} "       Var_New (Pat_Ptr.Nib, N_Words) = N_Words; , ,If Have_Pattern Then .Begin 0Bad_IO := False; 0Valid_Words := 254; 0Index := 0; 0Repeat 2If N_Words <= Valid_Words Then 4Read_Words := N_Words 2Else 4Read_Words := Valid_Words; 2Moveleft (Trash, Pat_Ptr.Word^[Index],  0 Then 4Bad_IO := Blockread (Pat_File, Trash, 1) <> 1; 2Valid_Words := 256; 0Until Bad_IO Or (N_Words = 0); raw_Result := Result;  {$E Is_Textron-} & &End {of With}; "End {of Box_Abs};    "  {$B Is_Textron-} "Procedure Box_Rel {Width, Height : Point}; "Var Kill_Cursor : Boolean; " X_Corner, &Y_Corner : Integer; "Begin $With Core^ Do &Begin (X_Corner := X_CP + Width; (Y_Corner := Y_CP + Height; (If (X_Corner < 0) Or (X_Corner > X_Max) Or +(Y_Corner < 0) Or (Y_Corner > Y_Max) Then ( Box_Abs (X_Corner, Y_Corner) (Else *Begin ,Kill_Cursor := ((Overlay_Mode = Replace) Or 0If Not Bad_IO Then 2With Core^ Do 4Begin 6Pat_Number := Pattern_Num; 6Pat_Cols := Pat_X; 6Pat_Rows := Pat_Y; 6Pat_Is_Valid := True; 6Core^.Draw_Result := Draw_OK; 6With Pat_Rec Do 8GR_Unpack (Pat_Ptr.Nib^, Pat_X, Pat_Y, CPat_Red_Ptr^, Pat_Uses_Red, CPat_Green_Ptr^, Pat_Uses_Green, CPat_Blue_Ptr^, Pat_Uses_Blue); 4End {of With Core^}; 0Var_Dispose (Pat_Ptr.Nib, (Pat_X + 3) Div 4 * Pat_Y); .End {of If Have_Pattern} ,Else .Begin 0Core^.Draw_Result := Draw_No_Memory; 0If Have_Red Then 2Va<(Display_Mode = Fill)) And CSR_Is_Enabled And ;CSR_Is_Visible; ,If Kill_Cursor Then .Draw_Cursor (Cursor_X, Cursor_Y); ,If Polygon_Edge = Solid_Line Then .GR_Box (X_CP, Y_CP, Width, Height, Line_Style, 6Line_Index, Planes_On, Overlay_Mode); ,If Display_Mode = Fill Then .If Polygon_Interior = Plain Then 0GR_R_Fill (X_CP, Y_CP, Width, Height, ;Fill_Index, Planes_On, Overlay_Mode) .Else 0Rect_Pattern (Width, Height, Pat_Rec, Pat_Cols, Pat_Rows); ,If Kill_Cursor Then .Draw_Cursor (Cursor_X, Curr_Dispose (Pat_Red_Ptr, Pat_Im_Size); 0If Have_Green Then 2Var_Dispose (Pat_Green_Ptr, Pat_Im_Size); 0If Have_Blue Then 2Var_Dispose (Pat_Blue_Ptr, Pat_Im_Size); .End {of Else Have_Pattern}; *End {of With Pat_Buf};  {$I^} "End {of Set_Fill_Pattern};  {$E Is_Textron-}   " "  {$B Is_Textron-} "Procedure Rect_Pattern (Length_X, :Length_Y : Integer; 6Var R_Pat_Rec : Pattern_Rec; :R_Pat_Cols, :R_Pat_Rows : Integer); "Var X_Offset, &Y_Offset : Integer; "Begin sor_Y); * Draw_Result := Draw_OK; *End {of If (X_Corner}; &End {of With}; "End {of Box_Rel};  {$E Is_Textron-} " " " &  {$B Is_Textron-} "Procedure Write_Block_Pixels {Data : Sorcery; Rows, Columns : Integer}; "Var Pattern : Record 4Case Integer Of 60 : (Ptr : Pat_Im_P); 61 : (Prm : Sorcery); 2End {of Pattern}; &Kill_Cursor : Boolean; &Red_Words, &Green_Words, &Blue_Words, &N_Words : Integer; &L_Pat_Rec : Pattern_Rec; "Begin $With L_Pat_Rec, Core^ Do $With Core^, R_Pat_Rec Do &If Pat_Is_Valid Then (Begin *If X_CP + Length_X >= 0 Then ,X_Offset := 0 *Else ,X_Offset := Pred (-X_CP - Length_X) Mod R_Pat_Cols; *If Y_CP + Length_Y >= 0 Then ,Y_Offset := 0 *Else ,Y_Offset := Pred (-Y_CP - Length_Y) Mod R_Pat_Rows; *If (Pat_Uses_Red Or (Overlay_Mode = Replace)) And Odd (Planes_On) Then ,GR_R_Pat (X_CP, Y_CP, Length_X, Length_Y, 6Pat_Red_Ptr^, R_Pat_Cols, R_Pat_Rows, 6X_Offset, Y_Offset, 1, Overlay_Mode); *If (Pat_Uses_Green Or (Overlay_Mode = &If (Rows > 0) And (Columns > 0) Then (Begin *Pattern.Prm := Data; *N_Words := (Columns + 23) Div 16 * Rows; *Red_Words := Var_New (Pat_Red_Ptr, N_Words); *Green_Words := Var_New (Pat_Green_Ptr, N_Words); *Blue_Words := Var_New (Pat_Blue_Ptr, N_Words); *If Blue_Words <> 0 Then ,Begin .GR_Unpack (Pattern.Ptr^, Columns, Rows, 9Pat_Red_Ptr^, Pat_Uses_Red, 9Pat_Green_Ptr^, Pat_Uses_Green, 9Pat_Blue_Ptr^, Pat_Uses_Blue); .Pat_Is_Valid := True; .Kill_Cursor := (Overlay_Mode = Replace) And =CSR_IsReplace)) .And (Ord (Odd (Planes_On) And Odd (2)) = 2) Then ,GR_R_Pat (X_CP, Y_CP, Length_X, Length_Y, 6Pat_Green_Ptr^, R_Pat_Cols, R_Pat_Rows, 6X_Offset, Y_Offset, 2, Overlay_Mode); *If (Pat_Uses_Blue Or (Overlay_Mode = Replace)) /And (Ord (Odd (Planes_On) And Odd (4)) = 4) Then ,GR_R_Pat (X_CP, Y_CP, Length_X, Length_Y, 6Pat_Blue_Ptr^, R_Pat_Cols, R_Pat_Rows, 6X_Offset, Y_Offset, 4, Overlay_Mode); (End {of If Pat_Is_Valid}; "End {of Rect_Pattern};  {$E Is_Textron-} " " " " _Enabled And CSR_Is_Visible; .If Kill_Cursor Then 0Draw_Cursor (Cursor_X, Cursor_Y); .X_CP := Pred (X_CP); .Y_CP := Pred (Y_CP); .Rect_Pattern (Succ (Columns), Succ (Rows),  X_Max) Or (Y_CP + Rows > Y_Max) Then 0Draw_Result := Draw_Clipped .Else 0Draw_Result := Draw_OK; ,End {of If} *Else "Procedure Box_Abs {X_Corner, Y_Corner : Point}; "Var Kill_Cursor : Boolean; " Cur_X, &Cur_Y, &Result : Integer; "Begin $With Core^ Do &Begin (  {$B Is_Textron-} (If (X_Corner < 0) Or (X_Corner > X_Max) Or +(Y_Corner < 0) Or (Y_Corner > Y_Max) Then ( Result := Draw_Clipped (Else *Result := Draw_OK;  {$E Is_Textron-} ( (Kill_Cursor := ((Overlay_Mode = Replace)   {$B Is_Textron-} 8Or (Display_Mode = Fill)  {$E Is_Textron-} 8 8) And CSR_Is_Enabled And CSR_Is_Visible; (If Ki,Draw_Result := Draw_No_Memory; *If Green_Words <> 0 Then ,Var_Dispose (Pat_Green_Ptr, Green_Words); *If Red_Words <> 0 Then ,Var_Dispose (Pat_Red_Ptr, Red_Words); (End {of If} &Else (Draw_Result := Draw_OK; "End {of Write_Block_Pixels};  {$E Is_Textron-} " " " " "Procedure Read_Block_Pixels {Data : Sorcery; Rows, Columns : Integer}; Var Kill_Cursor : Boolean; "Begin $With Core^ Do &If (Rows > 0) And (Columns > 0) Then (Begin *Kill_Cursor := (Overlay_Mode = Replace) And CSR_Is_Enabled ll_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); (  {$B Is_Textron-} (If Polygon_Edge = Solid_Line Then *If Result = Draw_Clipped Then ,Begin .Cur_X := X_CP; .Cur_Y := Y_CP; .Line_Abs (X_Corner, Y_CP); .If (X_Corner >= 0) And (X_Corner <= X_Max) Then 0Line_Abs (X_Corner, Y_Corner); .X_CP := Cur_X; .Y_CP := Cur_Y; .Line_Abs (X_CP, Y_Corner); .If (Y_Corner >= 0) And (Y_Corner <= Y_Max) Then 0Line_Abs (X_Corner, Y_Corner); .X_CP := Cur_X; .Y_CP := Cur_Y; ,End {of If X_Corner} *Else And 9CSR_Is_Visible; *If Kill_Cursor Then ,Draw_Cursor (Cursor_X, Cursor_Y); *GR_Read (X_CP, Y_CP, Data^, Columns, Rows); *If Kill_Cursor Then ,Draw_Cursor (Cursor_X, Cursor_Y); *  {$B Is_Textron-} *If (X_CP + Columns > X_Max) Or (Y_CP + Rows > Y_Max) Then ,Draw_Result := Draw_Clipped *Else ,Draw_Result := Draw_OK;  {$E Is_Textron-} ( (End {of If} &  {$B Is_Textron-} &Else (Draw_Result := Draw_OK;  {$E Is_Textron-} " "End {of Read_Block_Pixels};   {$B Is_Textron+}  {$E Is_Textron-} , ,GR_Box (X_CP, Y_CP, X_Corner - X_CP, Y_Corner - Y_CP, Line_Style, 4Line_Index, Planes_On, Overlay_Mode); (  {$B Is_Textron-} (If Display_Mode = Fill Then *If Polygon_Interior = Plain Then ,GR_R_Fill (X_CP, Y_CP, X_Corner - X_CP, Y_Corner - Y_CP, 7Fill_Index, Planes_On, Overlay_Mode) *Else ,Rect_Pattern (X_Corner - X_CP, Y_Corner - Y_CP, :Pat_Rec, Pat_Cols, Pat_Rows);  {$E Is_Textron-} ( (If Kill_Cursor Then *Draw_Cursor (Cursor_X, Cursor_Y); &  {$B Is_Textron-} (D     "Procedure Er_Box {X1, Y1, 4X2, Y2 : Integer};  Begin " With Core^ Do &GR_Clear (X1, Y1, X2 - X1, Y2 - Y1, 0, Planes_On, Replace); "End {of Er_Box};  {$E Is_Textron+}   { Ending of Graf.Rect Include File } 8 "  "`" . . . . . . . . . ` ` . . . . . . . . ` ` . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "a" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a a a a . . . a . . . . a . . . . . . . a . . . a a a a a . . a . . . . a . . a . . . . a . . a . . . a a . . . a a a . a . . . . . . . . . . . . . . . . . . "b" . . . . . . . . . b . . . . . . . b . . . . . . . b . . . . . . . b . b b . . . . b b . . b . . . b . . . . b . . b . . . . b . . b . . . . b . . b . . . . b . . b b . . b . . . b . b b . . . . . . . . . . . . . . . . . . . "c" . . . . . . . . jPATCOMPI   &GRAFICS@@@ @  @@@  0. . . . . . . . . . . . . . . . . . . . . . . . . . c c c . . . . c . . . c . . c . . . . . c . c . . . . . . . c . . . . . . . c . . . . . c . . c . . . c . . . . c c c . . . . . . . . . . . . . . . . . . . "d" . . . . . . . . . . . . . d . . . . . . . d . . . . . . . d . . . . d d . d . . . d . . d d . . d . . . . d . . d . . . . d . . d . . . . d . . d iPATCOMPI+r p,Pr pr p,0-s-h`,Pt`Ut`sp -,sp,Ԝ,.-3_s2s[prprpr pr p[r pr p1rp*r p0rprprp,r pPr pr p: [Pp지.3t֘s&3ֆֆPtւ;Ut֘spfpրDĆրRĆրGĆրYĆրB . . . . d . . . d . . d d . . . . d d . d . . . . . . . . . . . . . . . . . . "e" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e e e . . . . e . . . e . . e . . . . . e . e e e e e e e . e . . . . . . . e . . . . . . . . e . . . e . . . . e e e . . . . . . . . . . . . . . . . . . . "f" . . . . . . . . . . . f f . . . ĆրPĆրTĆրWĆրdĆրrĆրgĆրyĆրbĆրpĆրtĆրwĆ[p[p[p10֥4ֲծrp>r prpPr pr p1,"upr pOr prp@1ץ3ײ1[0423ֆ3x34J3[20up`r prp3sp3ssPattern sourc. . f . . f . . . . f . . . . . . f f f f . . . . . f . . . . . . . f . . . . . . . f . . . . . . . f . . . . . . . f . . . . . . . f . . . . . . . f . . . . . . . . . . . . . . . . . . . . . "g" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . g g g . g . . g . . . g g . g . . . . . g . g . . . . . g . g . . . . . g . . g . . . g g . . e name ? .TextPat name file ! contains a pattern of dimension  x Pattern destination name ? $.Ptrn!Warning -- premature end of input " is not long enough to be a rowwI/O error writing pattern filee EEXTRAIO STRINGOPFILEOPS PASCALIO  . g g g . g . . . . . . . g . g . . . . g . . . g g g g . . . "h" . . . . . . . . . h . . . . . . . h . . . . . . . h . . . . . . . h . h h . . . . h h . . h . . . h . . . . h . . h . . . . h . . h . . . . h . . h . . . . h . . h . . . . h . . h . . . . h . . . . . . . . . . . . . . . . . "i" . . . . . . . . . . . i . . . . . . . i . . . . O^{{. . . . . . . . . . . . . . . . . . . i . . . . . . . i . . . . . . . i . . . . . . . i . . . . . . . i . . . . . . . i . . . . . . . i . . . . . . . . . . . . . . . . . . . . "j" . . . . . . . . . . . . j . . . . . . . j . . . . . . . . . . . . . . . . . . . . . . . j . . . . . . . j . . . . . . . j . . . . . . . j . . . . . . . j . . . . . . . j . . . .       . . . j . . . . j . . j . . . . . j j . . . . "k" . . . . . . . . . k . . . . . . . k . . . . . . . k . . . . . . . k . . . . k . . k . . . k . . . k . . k . . . . k . k . . . . . k k k . . . . . k . . k . . . . k . . . k . . . k . . . . k . . . . . . . . . . . . . . . . . "l" . . . . . . . . . l l l . . . . . . . l . . . . . . . l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . w . . . . . w . w . . . . . w . w . . . . . w . w . . w . . w . w . . w . . w . w . w . w . w . . w . . . w . . . w . . . w . . . . . . . . . . . . . . . . . . "x" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x . . . . . x . . x . . . x . . . . x . x . . . . . . x . . . . . . . l . . . . . . . l . . . . . . . l . . . . . . . l . . . . . . . l . . . . . . . l . . . . . . . l . . . . . . . l . . . .  . . . . . . . . . . . . . . . . "m" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m m m . m m . . m . . m . . m . m . . m . . m . m . . m . . m . m . . m . . m . m . . m . . m . m . . m . . m . m . . m . . m . . . . x . . . . . . x . x . . . . x . . . x . . x . . . . . x . . . . . . . . . . . . . . . . . "y" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y . . . . y . . y . . . . y . . y . . . . y . . y . . . . y . . y . . . . y . . . y . . y . . . . y . . y . . . . . y y . . . . . . y . . . . . y y . . . . . "z" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "n" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . n . n n n . . . n n . . . n . . n . . . . n . . n . . . . n . . n . . . . n . . n . . . . n . . n . . . . n . . n . . . . n . . . . . . . . . . . . . . . . . "o" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o o o . . . . . . . . . . . . . . . . . . . . z z z z z z z . . . . . . z . . . . . . z . . . . . . z . . . . . . z . . . . . . z . . . . . . z . . . . . . . z z z z z z z . . . . . . . . . . . . . . . . . "{" . . . . . . . . . . . . { { . . . . . { . . . . . . . { . . . . . . . { . . . . . . . { . . . . . . { . . . . . . . . { . . . . . . . { . . . . . o . . . o . . o . . . . . o . o . . . . . o . o . . . . . o . o . . . . . o . . o . . . o . . . . o o o . . . . . . . . . . . . . . . . . . . "p" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p . p p . . . . p p . . p . . . p . . . . p . . p . . . . p . . p . . . . p . . p . . . . p . . p p . . p . . . p . p p . . . . p . . . . . . . . . . { . . . . . . . { . . . . . . . . { { . . . . . . . . . . . . . . . . . . "|" . . . . . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . | . . . . . . . . . . . . . . . . . . . . "}" . . . . . . . . . } } . . . . . . . . } . . .  p . . . . . . "q" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . q q . q . . . q . . q q . . q . . . . q . . q . . . . q . . q . . . . q . . q . . . . q . . . q . . q q . . . . q q . q . . . . . . . q . . . . . . . q . . "r" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r . r r . . . . r r . . r . . . . . . } . . . . . . . } . . . . . . . } . . . . . . . . } . . . . . . } . . . . . . . } . . . . . . . } . . . . . . . } . . . . . } } . . . . . . . . . . . . . . . . . . . . . "~" . . . . . . . . . ~ ~ . . . . . ~ . . ~ . . ~ . . . . . ~ ~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r . . . . . . . r . . . . . . . r . . . . . . . r . . . . . . . r . . . . . . . r . . . . . . . . . . . . . . . . . . . . . . "s" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s s s s s . . s . . . . . s . s . . . . . . . . s s s s s . . . . . . . . s . . . . . . . s . s . . . . . s . . s s s s s . . . . . . . . . . . . . . . . . . "t. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * " . . . . . . . . . . t . . . . . . . t . . . . . . . t . . . . . t t t t t . . . . . t . . . . . . . t . . . . . . . t . . . . . . . t . . . . . . . t . . . . . . . t . . t . . . . . t t . . . . . . . . . . . . . . . . . . . "u" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . u . . . . u . . u . . . . u . . u . . . . u . . u . . . . u . . u . . . . u . . u . . . . u . . u . . . u u . . . u u u . u . . . . . . . . . . . . . . . . . . "v" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v . . . . . v . v . . . . . v . . v . . . v . . . v . . . v . . . . v . v . . . . . v . v . . . . . . v . . . . . . . v . . . . . . . . . . . . . . . . . . . . "w" . . . . . . .      HGRSTART GRSTART IV.0 [1e]8Top, { Top position } 8Center, { Center (horz/vert) position } 8Bottom); { Bottom position } 'Font_Type = -1..99; 'Pat_Type = -1..99; 'Color_Index = 0..15; 'Point = Integer; 'Point_Array = Array [1..128] Of Point; 'Sorcery = ^Integer; 'Win_Rec_P = ^Win_Rec; 'Win_Rec = Record 9Next_Window : Win_Rec_P; 9Win_X_Org, { Global drawspace coordinates } 9Win_Y_Org, 9Disp_X_Org, { Display screen coordinG -%?.Q7c@u90' ates } 9Disp_Y_Org, 9Win_X_Size, { Window size in pixels } 9Win_Y_Size : Point; 7End {of Win_Rec}; ' 'Core_Record = Record 9X_Min, { Left edge of screen } 9X_Max, { Right edge of screen } 9Y_Min, { Top edge of screen } 9Y_Max, { Bottom edge of screen } 9 9X_Org, { X-origin of fill pattern } 9Y_Org, { Y-origin of fill pattern } 9 9X_CP, { X-current position } START ART GRSTART GRSTART GRSTOP GRSTOP STOP -OP GRWINDOW GRWINDOWWINDOW ?NDOW GRYVAL GRYVAL YVAL QAL GRSCANUN GRSCANUNSCANUNTIcANUNTIGRTEXTFA  GRTEXTFATEXTFASTuXTFAST 9Y_CP : Point;{ Y-current position } 9 9Line_Index, { Line color} 9Fill_Index, { Filled object color } 9Text_Index, { Text color} 9Background : Color_Index; { Background color } ; 9Line_Style : Integer; { Line pattern } 9Display_Mode : Display_Type; { Fast/Fill } 9Overlay_Mode : Overlay_Type; { Replace/Xor pixels } 9Polygon_Interior : Int_Type; { Plain/Patterned } 9Polygon_Edge : Edge_Type; { Solid_Line/Interior } 9 9Font_Number : Font_Type; GRAFDRAW 5(  IV.0 [1e]{ Current font number } 9Font_Cols, { Columns per char } 9Font_Rows : Point; { Rows per char } 9 9Char_Spacing : Real; { Character pitch } 9Top_Bottom, { Above/below text } 9Left_Right, { Left/right of text } 9Char_Path : Directions; { Write direction } 9DX_Charup, { Char rotation X } 9DY_Charup : Integer; { Char rotation Y } 9Char_Height, { Rows to display }   "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignored, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (9Char_Width : Integer; { Colums to display } 9 9Pat_Number : Pat_Type; { User pattern number } 9Pat_Cols, { Columns in pattern } 9Pat_Rows : Point; { Rows in pattern } 7 9File_Prefix : String[7]; { Prefix for font, text } 9 9Region_X_Org, 9Region_Y_Org : Point; {Draw region origin} 9 9Window_List : Win_Rec_P; {Chain of window records} 9Win_X_Res, 9Win_Y_Res : Point; {Deltas for window coords} 9 9Glob_X_Min, 9Glob_X_Max, Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} 9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); " (Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast, "Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup  { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction }      : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, $yk$xj&$x&&$~&%$#$"$y%%%$|&%$#$"Ċ$y$x&$y%$x$ $ 6$($ /$$y$x&$y%$x$ 6$0&$y%$x$!$ < 42:$/!Ė 0k#y%j#x$i""#~!!#|"!d## 87h 42:##y#x%$# # 6#(# ###y#x%$# 6#0 %$#!# < 42:#/ĖM 0/.թh./j "tmg"tlf"tk#o ./( ' & 2 -87i!42:--y--x./f./<--y-t_Value (Opcode, 7Value : Integer); " "Procedure Erase; " "Procedure Erase_Alpha; "  Procedure Flood; " "Procedure Arc_Rel (Radius : Integer; 5Start_Angle, 5End_Angle : Real; 1Var X_Start, 5Y_Start, 5X_End, 5Y_End : Integer); " "Procedure Arc_Abs (Var Radius : Integer; 5Var Start_Angle, 9End_Angle : Real; 9X_Start, 9Y_Start, 9X_End, 9Y_End : Integer);   Procedure Set_Region (X_Start, 8Y_Start, 8X_Length, 8Y_Length : Integer); 8 -x!42:f#t-y.-~-x/-|-/Ċ-/Ċ-/ $g$t% %t-/Ė 0i#"B!87h 42:!y!x$"#+ 42:!y"!~!x#!|!/Ċ!/Ċ!/Ė /[s00 5t0e{Pe 0e 0Ȅ/[[0"u[u[eXu[s0/ pլ/Wv՛ZYXWj "t5vlih"!"k!k[< #p #h"#j"/[vli$"$,0[[ć[Wć[XćY Z [/Ċ0/ Ċ0/Ą/s !0 0Ċ0 Procedure Set_Window (Window_Chain : Win_Rec_P); "  Procedure Set_Universes (Display, Draw : Integer); "  Implementation  Ċ 00!!0/Ė?@P0zj0yx 87iQJ@/=6/(!-~ ͤF, n&--,<&;! 6*-&n͋  xh(m)l)m(l%̇¾o'kD,$ ,$ ր-#-%#% -%ր,,$|j,$ ,$GRAFDRAW0/#1 i0/Ċ#1i#10~ 0~h0/Ċ#1h!" !0'"1 i0/Ċ"1i"10| 0|h0/Ċ"1h#! !0'0h86 / "" ~%!! |742:"!742: /Ċ /ĖC0/ 8 742:  '8$ 7 42:  870/Ėw0/81  742: 742:0/ Ė0h"" ~ !! | / " !Ċ / Ċ / Ė0j"y$i"x#h!!"~ "|"/"!" Ċ"/ Ċ"/ Ėb  ր-#% -#%ր,,$|j,#% ,#% ր-$ -$ր--$~jV,% ,%#% ,# ր-$ -$ր--$~jր"/42:- , n&գ&;&:ՍO-' -'~+᳡=-' -+~*,' ,*|,' ,'|,ր)-,<&;!)( 6 )j+* &nV/42:/"Ċ/ĖA`(`'`&`%`$`#`"`!0 0/`%$ 0 ((( ( (( (((((((((("R(0(3'(2(1ĆĆrĆĆĆ((( ( (((((((!( (.(- (,(+!"#"ąąąąą"ą#(((*%()&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~ >v2 tq++;>v2t>v2` y  + OF;ru ;>v2t4V+yF3JRV +yG3JRVWvvv RKS3 N+Ay36N++y؉- ۉ/ 1 , V 6;PQVYV +xK[V +By36P++}؉- ۉ/ 1 , N+xRZN6;NZ)  fF׆rP^r ue hkX <uF     365 F6 V$$ Fu~tYN 6TȉN V 6RӉV 6N@$6P$1$~u8FtN V V Ӌ VW6;R|uPYPPVH;~‡T;} ދ=^XQȋ@;} *-;~ދƇ_^;$;u_YSQRWVPA;}EZRV}΀2oo/:$tF;}u[ZRWS*^_X     ^ vVNZF^v VNFN3v 2u+H3N3;3t3i x++++IF;vu3 uVJ@ u^ K;xu ;3t&H3N3H3v 3Hv2333c3++xB;Vu3@ xE++++WPV+>3vW@)_3 ^X_+3;Vr+VC;^u3I3 uvN;xBHVy+36>P++GyF;v|+vً3+ًOANy+3;^ r+^ 6.N++EyZNV^ v~FUPSQVWRJ@Fy+3;^ |+^ 6>N++Gy׋~ϽZaĄaĄar h7rrć ᇁ~h G  ˏ76r |r76r r hᇁ|h G  ˏ76r~ r76r r hć ~h F  ˏ76r |r76r r h|h F  ˏ76r~ r76r r h h # " ! V^ FNvWx@Y6;P ZRNV-Z_^Y[X]USRQFy~+3;v|+v6P++B}~}V3R+3J6+Nx3+3R+3ANy+3;^ |+^ ZNVF~v^ P tx3F FX FXx t 9FtF}YZ[] I  | V pO  2 d  \ V)}vQA !+5?IS]gq{66y6g6`6v5-55 5444444R4L4+43333333{3B3>38323322222|2111111111c1Q1L1G1#100000a0ˏđr76r ~ |r r ~r r |r rr r ˏ76r y ~ x |rr y ~ xrr y x |rr y xr h !đr ~ | r r  ~ r r  r r  | r r ^ i! r!76r76r 76r 76r 76r 76r 76r 76r P0I0400///////////e/b/Z/W/T/J/E/>/8/0////..................x.i.W.--------}-l-<-8-(-%-,,,,,,,,,,,~,r,m,g,1,-,,, , ,+++++++++++~+o+h+b+^+T+Q+H+D+9+!+++*************i*.*"* **)))))))))})x)\)((((B(( (('''''''''m'f'b'['W'P'L'I'E'&&&&&k&J&F&&&&%%$$$$$$$$$"U"L"H"A";"8"4")!!!! ! | c ] O I C ?  4556Y($(( $O&Q(.)-1 $4%U(5)E)~1h2M3o3\56N6$e(=)<1A2&3355m6$^((*** 76r !}!|jh "8  r!~ !| r! ! ˏ hÑr!}!|jh "8  r!~ !| r ! ! ˏ h! ! !        !!   r! !!! !|jh "8  r!| !| r ! ! ˏ hÖw "!r r i! $!#!! ! 76r!!| jh "&!y !xr! ! ˏ hՑ! !| jh "! r HEAPOPS EXTRAIO STRINGOPEXTRAHEAFILEOPS REALOPS  ! ! ˏ hڑ! !!| jh "! r! ! ˏ hڑr! ! ˏ! ! ˏ!|!|!| !|!|!|!| !~!|!|!|!| !~!|!|!| r!|!|!| !|!|!|!| !~!|!|!|!| !~!|!|!| r!|!|!| !|!|!|!| !~!|!|!|!| !~!|!|!| r!~r!|!~r!~!|!~r!~!~b m%%%~%%| %%%TESTCORE  -  &GRAF" @@   @@  0r %*%|l% % % $$rni!&!oj"' h (% %!%" k#):$r$r% % ˏ% % ˏ#k rr%r" rr%r! rr% % ˏ% %% % ˏ$$%r h"j!i rrr r r ććććr 􇀂 TESTCORE ji`s psp hc(( F**}"Ċ?**}"Ċ5**~"Ċ+**~"Ċ!**Ċ!j" 0jiրPc(Gi(r#/!s p/spsp/ (c 3 =/a30s p/sps p h/ Ė*a+Pts pas ps p⼃h p ڤ- upsp rr,ts p h pr"r~ih ! r|h , ra~aaA par h͑ ćć|퇀|h , ra~aaA par h͖ .-.j".R--"ć--"7 --"i6 --" h! r-ć-ć-r r- - ˏđ!-" r-ć-ć-r r- - ˏđ!-" -"r-ć-ć-r r- - ˏđ!-" -"r-ć-ć-r cPcccr- - ˏ h|ih !~ r h~ih ! |r h|ih ! r h~ih ! |̚~ ¿r hޚ~ih !"~ |̚~ ¿r hّrrrr76rrr rć}|h _  r | r~  r~ | r  r h  ć}r}|h U| r~đr"j.**P*.P *3Pց8`@P`BP `FPցJĚSS*PwS`wSr  ˏđ rrrBi!!! !!!!rr76r76rjh "!0  h!0rr rh    |r ~ |r ~ |r ~ |r ~ |r ~ |r ~ |r |r ~ |r ~  r| r~ rr h  ćć}|h yaxĄ a Ą a| Ą~ a Ą~ a| Ą a Ąar h'  ćć}r}|h a| Ą~ aĄa| Ą~ aĄ     |r ~ |r ~ |r ~ |r ~ |r   76r  |r ~r  |r ~r  |r  7 |rrr  r~@6r, dcba`r 7|~@r, d cba`r ~~@6r, dcba`r 7~@r, dcba`r   ˏĚ   ˏr WAHEA STRINGOPREALOPS EXTRAIO GOTOXY PASCALIOGRAFDRAW |krĚh Յi!t  ˏĚ   ˏ!~# |#r# !$„ r !i htrh Նi!u  ˏĚ   ˏ!~# |#r#(! ,„ r !i hsr|04| 8<|@D|HL|6r Ě~ o| n~ m|l ,!by'x&y'x&r!b $66""""""""">IIH> II> QQ""EENQ!Q   I**I @>ACCEEIQQa>  8@AA""A@  @A" ""$$((0 "A@@"~"AAA#A"!A"AA""AA""A@\bAAA"   0@AA"6IIIIIF@A"AAAAAAA"!AA!!AA!"AA"y%x$y%x$r!, " r ~ry"~Ԁ#"rr ! rr #!" #ha  %$%$# %# $%# $# a  Wh    7 |6 |r | |r r y x |j" """"1"3r$"3ki!#9"1!r$7"3!6"3!r7"36"3r !i‘"3r$ckh # "3li!$!r$!i"BBBBBBB"?\bAAAqA"AAAAAAAAAA! pA!  !A~AAAAAIIIUcAAAaQQIIEECA"AAAAAAA"!AAA!\"c]AAAAA"A! !AA!"A@ A""AAAAAAAAA"AAAAAAAA""UUIIAAAAAAAA""AAA"AAA @@88@ A".1!!> !&BBBB&"AA",2!!!!2, "A"$!@\bAAAb\BBBBBB hr$l$(k$$$$$$r $$$~r$ $ˏĂOr$$ $ˏrb " ""$""$"$(z"$(y$"xm%%%%%%$(z%$$'$&$$~$|$r"mh % $~r$|r hmh % $|r$~r h$ $ $ˏ$$mh %^ni!&P $~!$|r$|2r$ $ ˏ$ $$ $ ˏ!i h$&$+"ymh %(" "r& B" "BIIIIIII7BBBBBBF:"AAAA"&BBBB& ,2!!!!2,&>A@@>A>$.1!!!!!!""AA""UIIAAAA""A$$BBBBB 000I#"}$)ˏ h$'$-"zmh %(" "r#"~$*ˏ hӑ"$'mh % ni!&"!$|"r#!i hۑ$'$&$$~$|$r"#r#" b tTs psps p^s psps p1crgs psps p0cr os p sps p8rxs p.sps p,sps p-sps p+sp)upsp( s p9~sp$CURSOR $EQUAL $LOG $LAST $SYNTAX $TAG 2 1  $$$8 O.RHds p9}sps p9~9zsps p9}9ysp)upsps psps p}sps p~sps p|sp)upsps pspsps ps pspsps p5432r"rrt~|  rh1h1E & E & ""V&V&<V&4 4 4 ""4 ""9$ Draw result on window movement was Unexpected draw result ; Hit [RETURN]]Test (Y/N/Esc) ? @@Type to continue Fast,  Fill,  Solid,  Trace,  Plainn Patternedd !"#$%&'()*+,-./01234567789:;<=>?@ABCDEFGHIJKLMNOOPQRSTUVWXYZ[\]^_` { GrafDraw Graphics Unit }  { by }  { Barry Demchak, Software Construction Inc. }  { for Ticom }  { December 30, 1982 }   {$R2}  {$R-,I- for speed only}  {$D Debug_Arcs-}  {$D Is_APC_III-}  {$D Is_Textron-}   {$B Is_Textron-}  Unit Graf_Draw;  {$E Is_Textron-}  {$B Is_Textron+}  Unit Tex_Graf_Draw;  {$E Is_Textron+}  {*** Does abcdefgghijklmnopqrstuvwxyz{|}~ Left - Center - Right - TopCenterrBottommHi, mom!!Background color ? Pattern number ? Font number ? Planes enabled ? Global space at (, ) to ((, Display at ((, ) to ((, Clipping region at ((, ) to ((, +Clipping region lower left corner (X, Y) ? Clipping region size (X', Y') ? CursorrLineeBoxTexttCircleeBlock Area FillArcUniverseeWindows . Y R Tn `y aHEAPOPS EXTR     Overlay_Mode apply to pixel blocks ? }  {*** Find out what the text plane options mean for Set_Value }  (*** Function keys for conditional compile directives:    i|n  {$B Is_Textron-}|n  |e  |ual|e  |n  |.   i{$E Is_Textron-}|n  |n  |e  |u|ual|e  |n  |.   *)   (*  30 Aug 85 BD Added Universe calls  21 Aug 85 BD Added modifications for APC III  04 Jul 85 BD Added special case handling in Text for 8 pixel fonts ates } 9Disp_Y_Org, 9Win_X_Size, { Window size in pixels } 9Win_Y_Size : Point; 7End {of Win_Rec}; ' 'Core_Record = Record 9X_Min, { Left edge of screen } 9X_Max, { Right edge of screen } 9Y_Min, { Top edge of screen } 9Y_Max, { Bottom edge of screen } 9 9X_Org, { X-origin of fill pattern } 9Y_Org, { Y-origin of fill pattern } 9 9X_CP, { X-current position }  04 Jul 85 BD Added DrawModes to Text call, optimized SetFont (UOP)  10 Feb 84 BD Fixed text down draw to clip correctly instead of early  15 Aug 83 BD Added {$N} directives where appropriate  15 Aug 83 BD Added Overlay_Mode parameter to Text procedure for XOR mode  15 Aug 83 BD Verified and corrected clipping in all routines  15 Aug 83 BD Added Window and Region routines and suppport throughout  15 Aug 83 BD Fixed all routines to accept Enabled parameter as color mask  15 Aug 83 BD Recoded 9Y_CP : Point;{ Y-current position } 9 9Line_Index, { Line color} 9Fill_Index, { Filled object color } 9Text_Index, { Text color} 9Background : Color_Index; { Background color } ; 9Line_Style : Integer; { Line pattern } 9Display_Mode : Display_Type; { Fast/Fill } 9Overlay_Mode : Overlay_Type; { Replace/Xor pixels } 9Polygon_Interior : Int_Type; { Plain/Patterned } 9Polygon_Edge : Edge_Type; { Solid_Line/Interior } 9 9Font_Number : Font_Type; arc clipping routines (WHAT A BITCH!)  01 Jul 83 BD Added Draw_Result status variable  01 Jul 83 BD Added Set_Region call  01 Jul 83 BD Added Core fields for Global coordinate values  01 Jul 83 BD Added in Disp fields in Core record for windowing  10 Mar 83 BD Added clipping for lines and the cursor  10 Mar 83 BD Added version identifier, Graf_Version  08 Mar 83 BD Added Arc code and made circle procs call it  02 Mar 83 BD Added Flood procedure to do solid area filling { Current font number } 9Font_Cols, { Columns per char } 9Font_Rows : Point; { Rows per char } 9 9Char_Spacing : Real; { Character pitch } 9Top_Bottom, { Above/below text } 9Left_Right, { Left/right of text } 9Char_Path : Directions; { Write direction } 9DX_Charup, { Char rotation X } 9DY_Charup : Integer; { Char rotation Y } 9Char_Height, { Rows to display }  23 Feb 83 BD Added file prefix variable in CORE  23 Feb 83 BD Fixed incorrect memory space error handling in Write_Block...  23 Feb 83 BD Made initialized CORE variables consistent with RAMTEK  *)   {$B Is_Textron-}  Interface  "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignor9Char_Width : Integer; { Colums to display } 9 9Pat_Number : Pat_Type; { User pattern number } 9Pat_Cols, { Columns in pattern } 9Pat_Rows : Point; { Rows in pattern } 7 9File_Prefix : String[7]; { Prefix for font, text } 9 9Region_X_Org, 9Region_Y_Org : Point; {Draw region origin} 9 9Window_List : Win_Rec_P; {Chain of window records} 9Win_X_Res, 9Win_Y_Res : Point; {Deltas for window coords} 9 9Glob_X_Min, 9Glob_X_Max, ed, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} 9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); " (Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast, "Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup  { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction } : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, (.(1'(0(/ĆĆrĆĆĆ((( ( (((((((((,(+ (*()!"#"ąąąąą"ą#(&((%('&(&#(-Ė !!01""010-Ċ0- 0-00!0/""!/0- Ė&xh`%Ċ%`$Ċ$`#Ċ#"!0-Ėi0-Ė9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); "  0-Ė0- Ė,)`*P0- Ė+0- "Z!2;1/-+)'%# ր?#!!0h0!đ0 Ċ!րT087h 42:0.0~0|06&0- 42:0-Ė` `p0-ĖP0NiQhN-Ą@@ N- Od!PO~O}O|O{OzOy N- ċOzzO|O~OzN+ N-ċPćO}N'PO}O}N'ćPĊPO}ćO{OyyPyO{ćPĊPOyćPyPxN)PN)PyćPĄ@"Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup @O{O{Px@@!i xhN-@@yyQ N-ċ!սQիQhi Վ Od!PO~N(O~O~N(jN-ĊO~jO|OzzzO|kN-ĊOzk"#N+N+"kN-ćN-PzN-!"Py#Px7!iOxhlN&-N&QĊ N&Qđ.N-ĖQ0h - "$" +R!#! )C8742:  " ! %$ $#$#"!687: -Ė0i!87h 42:!!y!x! 6!5 42:!-Ėt 4`s03t3t3t0ĆĄ `P : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, $yk$xj&$x&&$~&%$#$"$y%%%$|&%$#$"Ċ$y$x&$y%$x$ $ 6$($ /$$y$x&$y%$x$ 6$0&$y%$x$$< 42:$-!Ė 0k#y%j#x$i""#~!!#|"!d## 87h 42:##y#x%$# # 6#(# ###y#x%$# 6#0 %$##< 42:#-ĖK 0/.թh./j "tmg"tlf"tk#o ./( ' & 2 -87i!42:--y--x./f./<--y--xt_Value (Opcode, 7Value : Integer); " "Procedure Erase; " "Procedure Erase_Alpha; "  Procedure Flood; " "Procedure Arc_Rel (Radius : Integer; 5Start_Angle, 5End_Angle : Real; 1Var X_Start, 5Y_Start, 5X_End, 5Y_End : Integer); " "Procedure Arc_Abs (Var Radius : Integer; 5Var Start_Angle, 9End_Angle : Real; 9X_Start, 9Y_Start, 9X_End, 9Y_End : Integer);   Procedure Set_Region (X_Start, 8Y_Start, 8X_Length, 8Y_Length : Integer); 8 !42:f#t-y.-~-x/-|--Ċ--Ċ-- $g$t% %t--Ė 0i#"B!87h 42:!y!x$"#+ 42:!y"!~!x#!|!-Ċ!-Ċ!-Ė /[s00 5t0egPe 0e 0Ȅ/[[0 u[mu[eXu[s0- pլ/Wv՛ZYXWj "t5vlih"!"k!k[< #p #h"#j"/[vli$"$,0[[ć[Wć[XćY Z [-Ċ0- Ċ0-Ą/s !0 0Ċ0 Procedure Set_Window (Window_Chain : Win_Rec_P); "  Procedure Set_Universes (Display, Draw : Integer); "  Implementation       Ċ 00!!0-Ė?@P0zj.yx 87iQJ@/=6/(!-~ ͤF, n&--,<&;! 6*-&n͋  xh(m)l)m(l%̇¾o'kD,$ ,$ րn-#-%#% -%րs,,$|j,$ ,$  \=bKkw H  { K oN   c  [ U(| vQq@*** HEAPOPS EXTRAIO STRINGOPEXTRAHEAFILEOPS REALOPS  ր{-#% -#%ր,,$|j,#% ,#% ր-$ -$ր--$~jV,% ,%#% ,# ր-$ -$ր--$~jր"/42:- , n&գ&;&:ՍO-' -'~+᳡=-' -+~*,' ,*|,' ,'|,ր)-,<&;!)( 6 )j+* &nV/42:-"Ċ-ĖA`(`'`&`%`$`#`"`!0 0-Ė DRAWOK DRAWCLIPCURDISABCENTER BOTTOM CBLACK CBLUE CCYAN CGREEN CMAGENTACORE CRED CSRSIZE CSRISENA CSRISVISCURENABLCURVISIBCURINVISCURFULL CURSMALLCURSORX CURSORY CYELLOW CWHITE DCOMPLEMDOWN DOFF DON DRAWINITDRAWINGC DRAWNOTI DRAWNOTF 0kj#87h 42:#y%#~#y%᳟##y%#yi#~#yi$%!¿l!mj#x$#|#x$᳟##x$#xi#|#xi%$!¿m!lj#y#x%$# # 6#' 42:#-"##y%##x$Ė!0y 0x o087 (42:n0 + j"*խn-"xi,"xh!)yl )xk)y$)~)y$᳟#)y$)ym)~)ym#$%¿k%ln)x#)|)x#᳟#)x#)xm)|)xm$#%¿l%kn')y)x$#) ) 6)'$#o)!) "jM(42:0-&Ė m087n&42:j0o) h (թ+ xl* xkj'y$'~'y$᳟#'y$'yDRAWNOME DRAWNOFODRAWMAX DRAWOVER DRAWWINODRAWWINIFAST DREPLACEFILL FONTIMSIFONTMINC FONTMAXC FONTPTR  OFF INTERIORGRINIT %GRCLEAR &GRBOX (GRARC , GRAREASO5GRCIRPAT4GRFILLCI3GRLINE 'GRTEXT ) GRREAD +GRSTART -GRRFILL 0GRREGION6GRRPAT 1 GRSCANUN 9GRSTOP .GRTEXTFA* i'~'yi#$!¿k!lj'x#'|'x#᳟#'x#'xi'|'xi$#!¿l!kj%'y'x$#' ' 6''$#m''y$''x# hQ&42:0-"Ė 0hi!~e!} 6 y x"!z   4!| 6 y x"!y   4!{ 6 y x"!x   4 0~0y 0|0x /.i.i /ihk l( (6),)o,o ( 'o'8*l)-9o ( 'o'-'*l0y,0yo,o ( 'o'8)l0y-9o ( 'o'-')l0x,0xo,o (GRUNIVER/GRUNPACK2 GRWINDOW7GRYVAL 8LEFT LARGECURMAXWINDOMAXCOORDMAINWINDON REPLACE PLAIN PATTERNEPATIMSIZPATREC PLANESONSOLIDLINRIGHT SIN45 SMALLCURXOR UP TOP TEXTROTA  'o'80ylt0x-9o ( 'o'-'0ylO*,*o,o ( 'o'80xl'*-9o ( 'o'-'0xlր$(/! ! ժ$k$B(nl&n&**m/&+%+m%,9ml-**ml))m/&+%+m%,9mlj-))ml_0y0ym/&+%+m%,9ml>-0y0yml10x0xm/&+%+m%,9ml-0x0xmlր$&/! /塠/$.mj&(0(/!&'.k'.k/&! &%.j%.j"#0y0x('&%,-0 0 60,#/& ! /kh& #V GRAFDRAW 3(  IV.0 [1e]f f b fd f-8.i/h5/i.h//i.h(.i/h!.i/h/i.h/i.h .i/hր(d󿢇b󿢑!(d (b0th879塤 (42:!̆i j9)!!  y!~y!x!|x!h 9 * yx!!"  6,norrrr& !̄m !̄m' !̄l !̄l &%""m'&%$ l  "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignored, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (%!!m' $""l$!!l9!ĊD8 &%Ċ%ć!x8ćx+Ċ$ć!x8 yx!&%'$!"  6, !&%'$"!x>9nxxxxxx ,yxxx&?kkyxxx'#?,yxxx&#?) (42:- Ė!e#%"$` `#`"$#%r#% ``& "$``)f`0h'$ y,# x/r& y x$#@% y x"!@'x&%dcba 90k#87h 42:$l# $2aaaa # ##y#x$## 63Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} $= 42:#y$#~#y$#x$#|#x$#-Ċ#-Ė0k%#y5$#x8ri#87h 42:# !;bbbb # ##y#x!## 63!= 42:#y!#~#y!#x!#|#x!#-Ċ#-Ėw2w; $.0+0)"0W&K<<W&SW&S""E &<yy Patxx.Ptrnn: Fontxx.Font:     (Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast, "Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup  { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction } : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, (.(1'(0(/ĆĆrĆĆĆ((( ( (((((((((,(+ (*()!"#"ąąąąą"ą#(&((%('&(&#(-Ė !!01""010-Ċ0- 0-00!0/""!/0- Ė&xh`%Ċ%`$Ċ$`#Ċ#"!0-Ėi0-Ė9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); "       0-Ė0- Ė,)`*P0- Ė+0- "Z!2;1/-+)'%# ր?#!!0h0!đ0 Ċ!րT087h 42:0.0~0|06&0- 42:0-Ė` `p0-ĖP0NiQhN-Ą@@ N- Od!PO~O}O|O{OzOy N- ċOzzO|O~OzN+ N-ċPćO}N'PO}O}N'ćPĊPO}ćO{OyyPyO{ćPĊPOyćPyPxN)PN)PyćPĄ@i'~'yi#$!¿k!lj'x#'|'x#᳟#'x#'xi'|'xi$#!¿l!kj%'y'x$#' ' 6''$#m''y$''x# hQ&42:0-"Ė 0hi!~e!} 6 y x"!z   4!| 6 y x"!y   4!{ 6 y x"!x   4 0~0y 0|0x /.i.i /ihk l( (6),)o,o ( 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;뎋2oo/Ë"3$"3$"3$"Ü$+ȝuP#΀YIt(3ÉS[ptrptrPSQRA +HxZأfF׆rP^r uN X<uZY[X36++B}~}V3R+3J6+Jx3+3R+3ANy+3;^ |+^ VNVF~v^ P tx3F FX FXx t 9FtF}YZ[] H  {lqvgb]X{ K oN   c  [ U(| vQqA !+5?IS]gq{j606)666&54444o4_4S4L4C44333m3d3`3;37313+3222222V2P2A212,211w1P1K1F1C1>1:11100000]0T0N000//////o/_/[/W/Q/K/G/A/// ///............}.z.u.i.[.W.S.P.P6N6T6J6LrvFnr+"3PPSSPSPp tp u r336RK6RnFFFF42FF F ^| rt rF 6PF6NFH6JFH6LN V~Jv x- Ȏ^v u6K^)NVf F ׆rB ^Pr u2^ u  u^};>)>)t/2IX<uF&?^YFfHx M.I.C.=.7./.(...----z-G-C-0----,,,,,,,,,|,v,k,>,6,2,.,",,,+++++++++++v+r+a+K+;+2+.+++++++******|*v*o*l*i*f*c*^*W*S*J*C*<**)))))))v)r)c)_)L)3)-)() )K(B(9(0(''''''''''c'`'['''' '''&&&&&~&l&6&&%%%%%%U%$$$j$[$N$I$D$?$4""!!!!!! x R > 9 ,  3V55K6 (e$(( ~$%((,0 $$(((.1223 555$((012R3J556$((*** HEAPOPS EXTRAIO STRINGOPEXTRAHEAFILEOPS REALOPS  ؊FfHyNzt^Ft t^)F)FuF))F)))))v)6)2 u:Vu 6C΀tuƊVt:vuЊ-O)u)N)^2t ):Nt낈6))*2*2))VuV[fF ׆rB ^ Pr u2^ u  u^;>)>)tsvX<u{).)):Ntv))>ruFF)):NtZF^VN 2 GRAFDRAW 3(  IV.0 [1e]y  y ;s £ ȋ)+؉FN ^V yupF^N V N IFףC,F׊ ÊE,;FtCC[F6P%tX+؋F ;vãF)F V6C,.E,rQ^r u(Yu.E,F %tVرNV^)^ F6C,.E,r!Q^r uYu.E,F tJNV6C,.E,rQH^r u|CZYuЌ;Ft^VFNt^VFN  "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignored, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (F t-~ u3ۉ-^-F-F -F-F----6--6O-B6--;F u v-;Vtuӡ-=rRJ-VF $C^\#:-F;-w)-Z-.-vI---F6--;FtËVN 2 y  y zѻ @ tb t^F NVfF׆׋v rP^r u@ CFX<u2^CC/ك+K/Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} /Ny3ɋ^/2ۋv6 Au~65F~ 6F ~6=F;/t;/u v6/uFـt~65~ 6~6=/NN N/Na^ ^ ^36F 6P%0NAAuJ6+Jv+ډ^؃NxQ~Ў3V 6;LpN O0׀&ptrptrĊ0*~3ۊ0s6C;^u0<uYNF iuGuptrptr tPy +y3CJy3ҋ6+>Jv+B t)y      (Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast, "Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup  { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction } : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, (.(1'(0(/ĆĆrĆĆĆ((( ( (((((((((,(+ (*()!"#"ąąąąą"ą#(&((%('&(&#(-Ė !!01""010-Ċ0- 0-00!0/""!/0- Ė&xh`%Ċ%`$Ċ$`#Ċ#"!0-Ėi0-Ė9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); "       0-Ė0- Ė,)`*P0- Ė+0- "Z!2;1/-+)'%# ր?#!!0h0!đ0 Ċ!րT087h 42:0.0~0|06&0- 42:0-Ė` `p0-ĖP0NiQhN-Ą@@ N- Od!PO~O}O|O{OzOy N- ċOzzO|O~OzN+ N-ċPćO}N'PO}O}N'ćPĊPO}ćO{OyyPyO{ćPĊPOyćPyPxN)PN)PyćPĄ@i'~'yi#$!¿k!lj'x#'|'x#᳟#'x#'xi'|'xi$#!¿l!kj%'y'x$#' ' 6''$#m''y$''x# hQ&42:0-"Ė 0hi!~e!} 6 y x"!z   4!| 6 y x"!y   4!{ 6 y x"!x   4 0~0y 0|0x /.i.i /ihk l( (6),)o,o ( 'o'8*l)-9o ( 'o'-'*l0y,0yo,o ( 'o'8)l0y-9o ( 'o'-')l0x,0xo,o (@O{O{Px@@!i xhN-@@yyQ N-ċ!սQիQhi Վ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+3ANy+3;^ |+^ VNVF~v^ P tx3F FX FXx t 9FtF}YZ[] H  {lqvgb]X{ K oN   c  [ U(| vQqA !+5?IS]gq{j606)666&54444o4_4S4L4C44333m3d3`3;37313+3222222V2P2A212,211w1P1K1F1C1>1:11100000]0T0N000//////o/_/[/W/Q/K/G/A/// ///............}.z.u.i.[.W.S.P.P6N6T6J6LrvFnr+"3PPSSPSPp tp u r336RK6RnFFFF42FF F ^| rt rF 6PF6NFH6JFH6LN V~Jv x- Ȏ^v u6K^)NVf F ׆rB ^Pr u2^ u  u^};>)>)t/2IX<uF&?^YFfHx M.I.C.=.7./.(...----z-G-C-0----,,,,,,,,,|,v,k,>,6,2,.,",,,+++++++++++v+r+a+K+;+2+.+++++++******|*v*o*l*i*f*c*^*W*S*J*C*<**)))))))v)r)c)_)L)3)-)() )K(B(9(0(''''''''''c'`'['''' '''&&&&&~&l&6&&%%%%%%U%$$$j$[$N$I$D$?$4""!!!!!! x R > 9 ,  3V55K6 (e$(( ~$%((,0 $$(((.1223 555$((012R3J556$((*** HEAPOPS EXTRAIO STRINGOPEXTRAHEAFILEOPS REALOPS  ؊FfHyNzt^Ft t^)F)FuF))F)))))v)6)2 u:Vu 6C΀tuƊVt:vuЊ-O)u)N)^2t ):Nt낈6))*2*2))VuV[fF ׆rB ^ Pr u2^ u  u^;>)>)tsvX<u{).)):Ntv))>ruFF)):NtZF^VN 2 %GRAFDRAW (5(  IV.0 [1e]y  y ;s £ ȋ)+؉FN ^V yupF^N V N IFףC,F׊ ÊE,;FtCC[F6P%tX+؋F ;vãF)F V6C,.E,rQ^r u(Yu.E,F %tVرNV^)^ F6C,.E,r!Q^r uYu.E,F tJNV6C,.E,rQH^r u|CZYuЌ;Ft^VFNt^VFN$%GRAFDRAW W&K<<W&SW&S""E &<yy Patxx.Ptrnn: Fontxx.Font:r[Y(KgM+++alQYK%%%M&&'_''(((8)Q))) * ڋG^ڋF+G=}FڋF t-~ u3ۉ-^-F-F -F-F----6--6O-B6--;F u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^v u16K^ 2<NV11f F 1׆rB>2^Pr u2^ u 82 u^};><>2^ Pr u2^ u 82 u^;><>2r2uF&x&+$Ċ$$ć#/$x8 "y"x/&%'$!"" " 6", /&%'$"!#x>9n$x&x$x&x#x%x ,"y"x&x%x&?kk"y"x$x#x'#?,"y"x&x%x&#?) (42:"/ Ė/"/%'$&`*`.`$&%'r%' ``2 $&``6 `r/0h'$ y:# x>r& y x$#@% y x"!@'x&%dcba /0k#87h 42:$l# $Baaaa # ##y#x$## 63$= 42:#y$#~#y$#x$#|#x$#/Ċ#/Ė0F<<:NtZF^VN 2 y  y ;s1 2£ 2 ȋ2 2) 2+؉ 2FN ^V yupF^N V 2N I 2F1ףo>F׊ Êq>;Ft111CC[F6T%tX+؋F ;vã 2 2F)F V6o>.q>rQ^r u(Yu.q>F %tVر 2 2NV^)^ F6o>.q>r!Q^r uYu.q>F tJ 2 2NV6o>.q>rQH^r u|CZYuЌ;Ft0k%#yF$#xJri#87h 42:# !Nbbbb # ##y#x!## 63!= 42:#y!#~#y!#x!#|#x!#/Ċ#/Ė0w4w; $.0-0+"0):>>LAs>;!< @BATDEg62;::&;g44P;  &F}G@FK@JIxxp     ^VFNt^VFN2F t?~ u3ۉ?^@F@F @F@F@?@ @6@@16O @B6? @;F u v @;Vtuӡ@=r 2 2RJ 2@VF1 $C^\#:@F;@w)@Z@.@vI? @@F6@?;FtËVN 2 y  y zѻ1 @2 22 22 2 tb t^F 1NV11fF1׆׋v rP^r u@ CFX1<uDraw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} 2^CCAك+KAANy3ɋ^A2ۋv6 Au~65F~ 6F ~6=F;At;Au v6AuFـt~65~ 6~6=ANN NANa^ ^ ^36F 6T%BNAAuJ6+Nv+ډ^112؃ 2NxQ~Ў3V 6;PpN O11B1׀&11ptrptrĊB*~3ۊBs6C;^uB<uYNF iuGuptrptr t(Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast, Py +y3CJy3ҋ6+>Nv+B t)y +y3@Iy3ɋ6+>Pv+A t 113~ >RD tq++;>RDt>RD` y  + OF;ru ;>RDt4V+yF3JRV +yG3JRVWvvv RKS2N+Ay36N++y؉ 2ۉ 2 22 V 6;PQVYV +xK[V +By36P++}؉ 2ۉ 2 22 N+xRZN6;NZ)11fF1׆rP^r ue hkX1<uF ^ vVNZF^v VNF { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction } NEv 2u+H3N3;EtEi x++++IF;vu3 uVJ@ u^ K;xu ;Et&HENEH3v EHv23E3c3++xB;Vu3@ xE++++WPV+>EvW@)_E ^X_+E;Vr+VC;^u3IE uvN;xBHVy+36>P++GyF;v|+vًE+ًOANy+3;^ r+^ 6.N++EyZNV^ v~FUPSQVWRJ@Fy+3;^ |+^ 6>N++Gy׋~ϽZV^ FNvWx@Y6;P ZRNV8Top, { Top position } 8Center, { Center (horz/vert) position } 8Bottom); { Bottom position } 'Font_Type = -1..99; 'Pat_Type = -1..99; 'Color_Index = 0..15; 'Point = Integer; 'Point_Array = Array [1..128] Of Point; 'Sorcery = ^Integer; 'Win_Rec_P = ^Win_Rec; 'Win_Rec = Record 9Next_Window : Win_Rec_P; 9Win_X_Org, { Global drawspace coordinates } 9Win_Y_Org, 9Disp_X_Org, { Display screen coordin-Z_^Y[X]USRQFy~+3;v|+v6P++B}~}VER+EJ6+Nx3+ER+EANy+3;^ |+^ ZNVF~v^ P txEF FX FXx t 9FtF}YZ[]kC j3}xsn$pME?70  q ' gSA0000111%1/191C1M1W1a1k1u111111H\HUHCHA6Aates } 9Disp_Y_Org, 9Win_X_Size, { Window size in pixels } 9Win_Y_Size : Point; 7End {of Win_Rec}; ' 'Core_Record = Record 9X_Min, { Left edge of screen } 9X_Max, { Right edge of screen } 9Y_Min, { Top edge of screen } 9Y_Max, { Bottom edge of screen } 9 9X_Org, { X-origin of fill pattern } 9Y_Org, { Y-origin of fill pattern } 9 9X_CP, { X-current position } 3A0A&A!AAA A@@@@@@@@@@@@@@|@y@u@o@i@c@[@T@E@3@?????s?o?\?Y?H?????>>>>>>>>j>b>^>Z>N>I>C> > >============w=g=^=Z=K=D=>=:=0=-=$= ==<<<<<<<<<<<<97939,9(9%9!98888b8G8&8"87777766666z6u6p6k6`414(4$4444432222~2j2e2X2?292+2%222EGGwH5:6::26+8-: ;>B2671:;!;ZCDD)EKE8GG*H6A:;CDE~EvGGIH6::(*** HEAPOPS EXTRAIO STRINGOPEX9Y_CP : Point;{ Y-current position } 9 9Line_Index, { Line color} 9Fill_Index, { Filled object color } 9Text_Index, { Text color} 9Background : Color_Index; { Background color } ; 9Line_Style : Integer; { Line pattern } 9Display_Mode : Display_Type; { Fast/Fill } 9Overlay_Mode : Overlay_Type; { Replace/Xor pixels } 9Polygon_Interior : Int_Type; { Plain/Patterned } 9Polygon_Edge : Edge_Type; { Solid_Line/Interior } 9 9Font_Number : Font_Type; TRAHEAFILEOPS REALOPS  { Current font number } 9Font_Cols, { Columns per char } 9Font_Rows : Point; { Rows per char } 9 9Char_Spacing : Real; { Character pitch } 9Top_Bottom, { Above/below text } 9Left_Right, { Left/right of text } 9Char_Path : Directions; { Write direction } 9DX_Charup, { Char rotation X } 9DY_Charup : Integer; { Char rotation Y } 9Char_Height, { Rows to display }   "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignored, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (     9Char_Width : Integer; { Colums to display } 9 9Pat_Number : Pat_Type; { User pattern number } 9Pat_Cols, { Columns in pattern } 9Pat_Rows : Point; { Rows in pattern } 7 9File_Prefix : String[7]; { Prefix for font, text } 9 9Region_X_Org, 9Region_Y_Org : Point; {Draw region origin} 9 9Window_List : Win_Rec_P; {Chain of window records} 9Win_X_Res, 9Win_Y_Res : Point; {Deltas for window coords} 9 9Glob_X_Min, 9Glob_X_Max, v$%GRAFDRAW W&K<<W&SW&S""E &<yy Patxx.Ptrnn: Fontxx.Font:H1/kv!=XXX#7Bc'/q!%t%%#&z&&5''i((()')w)))ڋGZڋF+G=}FڋGZ ڋF+GFڋGFڋ_;G 9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); " ~ڋ_G FڋGZ ڋGFFF+Fڋ__+vvPQQVQQ'ڋF+G=}FڋGZ ڋF+GFڋGFڋ_;G~ڋ_GFڋGZ ڋGFFF+Fڋ__+vvQPQVQQ'ڋGFڋGr^GZ 3^|@^3~; F#sw3^|@^3~;F#sXڋGsڋw t:ڋFG ڋFGڋGsڋw t:^GZ^GZڋGZF=@3vu@_;tڋGsڋw t:"Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup 3^u@ډGhڋGs_F=73vu@_;tڋw t:3^u@ډG F=u Q QڋGЋڋ_ sڋGZ%ڋGZڋ3t;vt@#GsTF=|>ڋGsڋw t:ڋFGڋGs!ڋw t:ڋGZ ڋGF3^|@^3~; F#sD3^|@^3~;F#s^GZ^FGF^^GZ ^GZ 9ڋGF^GF F^FF3^|@^3~; F#sD3^|@^3~;: Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1, (.(1'(0(/ĆĆrĆĆĆ((( ( (((((((((,(+ (*()!"#"ąąąąą"ą#(&((%('&(&#(-Ė !!01""010-Ċ0- 0-00!0/""!/0- Ė1&xh`%Ċ Procedure Circle_Abs (X_Of_Edge, Y_Of_Edge : Point); " "Procedure Circle_Rel (Radius : Point); " "Procedure Define_Color (Index, :Red, :Green, :Blue, :Blink, :Hard_Copy : Integer); " "Procedure Inq_Color (Var Index, ;Red, ;Green, ;Blue, ;Blink, ;Hard_Copy : Integer); " "Function Inq_Value (Option : Integer) : Integer; " "Procedure Plane_Enable (Planes : Integer); " "Procedure Plane_Visible (Planes : Integer); " "Procedure Set_Palette (Pal_Name : String); " "Procedure Se%`$Ċ$`#Ċ#"!0-Ė?i0-ĖP 0-Ė[0- Ėl)`*P0- Ė+0- "Z!2;1/-+)'%# ր?#!!0h0!đ0 Ċ!րT 087h 42:0.0~0|06&0- 42:0-Ė1 ` `p0-Ė PڋGFFGZNQQ@@3^t@3_ZuF#rFF»^ ؉3_ }@3_ }F Ƌ3_}F Ƌ3_}F Ƌ3_}F Ƌ3t_Value (Opcode, 7Value : Integer); " "Procedure Erase; " "Procedure Erase_Alpha; "  Procedure Flood; " "Procedure Arc_Rel (Radius : Integer; 5Start_Angle, 5End_Angle : Real; 1Var X_Start, 5Y_Start, 5X_End, 5Y_End : Integer); " "Procedure Arc_Abs (Var Radius : Integer; 5Var Start_Angle, 9End_Angle : Real; 9X_Start, 9Y_Start, 9X_End, 9Y_End : Integer);   Procedure Set_Region (X_Start, 8Y_Start, 8X_Length, 8Y_Length : Integer); 8 _}F s GZ st*3_;\t@3_tF Ƌ_ \3K;\V~G s GZ!GG ™|N…yDN=t;GPE ™N…yGN‹\ +^GD GGDڋ_*;G~ ڋ_*G+DG GGH;GR~GR+D@GNQNQ@DH@QwP@@F@F^FGZ=tNQ@ڋ_*GH@QQPܨڋ_*GHQPX%3ۋtC#s  Procedure Set_Window (Window_Chain : Win_Rec_P); "  Procedure Set_Universes (Display, Draw : Integer); "  Implementation GZF=~=ujFFF=u3FF»^ ؉G ™|P…yDP=t3D ™}P…yEP‹_ +؉^GZ G FGDڋ_*;G~ڋ_*G+DFGZ GFFFH;GV~GV+F@FGZ3_Zu@#Gs GZvvwv47F@FFGL=u-GLGL. GZQڋGF^GZ 3^~@^^ v3K;\VG#r3^~@^^v3%GRAFDRAW '3(  IV.0 [1e]     K;\RG#rڋG#Dsڋw t:^G^^FHG ^FHG^F GJ^FGHv vvv6G GڋG#DsQQ:^GZ0i!87h 42:!!y!x! 6!5 42:!-Ė4`s03t3t3t0ĆĄ `P  0Ȅ  0Ȅ4^^0 u^fu^ Xu^s0- p%4\v^\]^3t3 ^3t3o^3t3 \]jd"t"n&զmih"!"k!k^$ #p #h"#j"F^F ^3;G~F^F 3;}G sj^F ؋;} ^؉F^vG+Fv ̨F yy3PèFyy3P¿F FF F^v~G^P4E~v v Pwtu'Fsڋw t:^FGZ^vDF G^F ^!0y 0x! Fڋ_3_u@#G#GFFsڋw t:FڋGFFFFF;F~FFH^FFH^F^F+GF ^F+F^GF ^3;G ~F^F 3_;}G sm^F ؋_;} ^G4^vmi%"%P0__ć_\ć_]ć^0-Ć`$\]`z``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EExEIE@E;>;t/2IX1<uF&1?^YFfHx ؊FfHyN1zt^     >>>>>>~>y>n>\>X>R>G>>>> >===========y=r=j=R=N==='=== =<<<<<<<<<<<Bk2g669:: CCDDFGGz69:BCD.E&GsGGq69(*** HEAPOPS EXTRAIO STRINGOPEXTRAHEAFILEOPS REALOPS  { Current font number } 9Font_Cols, { Columns per char } 9Font_Rows : Point; { Rows per char } 9 9Char_Spacing : Real; { Character pitch } 9Top_Bottom, { Above/below text } 9Left_Right, { Left/right of text } 9Char_Path : Directions; { Write direction } 9DX_Charup, { Char rotation X } 9DY_Charup : Integer; { Char rotation Y } 9Char_Height, { Rows to display }   "Const Graf_Version = '0.8';  (Draw_OK = 0; {Nominal draw result} (Draw_Clipped = 1; {Draw performed, figure clipped} (Draw_Init = 2; {Draw variables at initial state} (Draw_Overflow = 10; {Draw ignored, coordinate out of range} (Draw_Not_Imp = 11; {Draw ignored, feature not implemented} (Draw_Not_Found = 12; {Draw ignored, file not found} (Draw_No_Memory = 13; {Draw ignored, not enough memory} (9Char_Width : Integer; { Colums to display } 9 9Pat_Number : Pat_Type; { User pattern number } 9Pat_Cols, { Columns in pattern } 9Pat_Rows : Point; { Rows in pattern } 7 9File_Prefix : String[7]; { Prefix for font, text } 9 9Region_X_Org, 9Region_Y_Org : Point; {Draw region origin} 9 9Window_List : Win_Rec_P; {Chain of window records} 9Win_X_Res, 9Win_Y_Res : Point; {Deltas for window coords} 9 9Glob_X_Min, 9Glob_X_Max, Draw_Win_Ovfl = 14; {Draw ignored, window list out of range} " Draw_Win_Imp = 15; {Draw ignored, implementation restrict} (Draw_No_Font = 16; {Draw ignored, no font defined} 9Glob_Y_Min, 9Glob_Y_Max : Point; {Global coordinates} 7 9Draw_Result : Draw_OK..Draw_Max; V{Result of last draw} 7 TextBlocked : Boolean; {Text draw mode} 7 Universes, {Number of universes} 9Draw_Universe, 9Display_Universe : Integer; {Current universes} 7End {of Core_Record}; " "Var Core : ^Core_Record;  Procedure Move_Abs (X_Position, 6Y_Position : Point); " "Procedure Move_Cursor (X_Position, 9Y_Position : Point); " (Draw_Max = Draw_No_Font; {Current maximum draw result number} ( "Type Cur_Attribute = (Cur_Disable, { Cursor disable } 8Cur_Enable, { Cursor enable } 8Cur_Visible, { Cursor visible } 8Cur_Invisible, { Cursor invisible } 8Cur_Small, { Cursor small } 8Cur_Full); { Cursor full } 'Switch_Types = (Off, On); 'Overlay_Type = (Replace, { Replace contents } 8Xor); { Merge contents } 'Display_Type = (Fast, "Procedure Move_Rel (Delta_X, 6Delta_Y : Point); " "Procedure Set_Cursor (Attrib : Cur_Attribute); " "Procedure Size_Cursor (Size : Integer); " Procedure Set_Fill_Pattern (Pattern_Num : Pat_Type); " "Procedure Box_Abs (X_Corner, Y_Corner : Point); " "Procedure Box_Rel (Width, Height : Point); " Procedure Write_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " "Procedure Read_Block_Pixels (Data : Sorcery; Rows, Columns : Integer); " Procedure Set_Charup (DX_Charup, 8DY_Charup  { No filling } 8Fill); { Fill all polygons } 'Int_Type = (Plain, { Solid rectangle } 8Patterned); { User pattern } 'Edge_Type = (Solid_Line, { Solid border } 8Interior); { Invisible border } 9 'Directions = (Left, { Left direction or position } 8Right, { Right direction or position } 8Up, { Up direction } 8Down, { Down direction } : Integer); " "Procedure Set_Font (Font_Num : Font_Type); " "Procedure Text (The_String : String); " Procedure Set_Line_Style (Dot_1,  . . . . . . > . . . . . . > . . . . . . > . . . . . . > . . . . . . . . . . . . . . . . . . . . . . . "?" . . . . . . . . . . ? ? ? . . . . ? . . . ? . . ? . . . . . ? . ? . . . . . ? . . . . . . . ? . . . . . ? ? . . . . . ? . . . . . . . ? . . . . . . . . . . . . . . . ? . . . . . . . ? . . . . . . . . . . . . . . . . . . . . "@" . . . . . . .  . 3 3 3 . . . . . . . . . . . . . . . . . . . "4" . . . . . . . . . . . . . 4 . . . . . . 4 4 . . . . . 4 . 4 . . . . . 4 . 4 . . . . 4 . . 4 . . . . 4 . . 4 . . . 4 . . . 4 . . . 4 . . . 4 . . 4 4 4 4 4 4 4 . . . . . . 4 . . . . . . . 4 . . . . . . . . . . . . . . . . . . "5" . . . . . . . . . 5 5 5 5 5 5 . . 5 . . . . . . . 5 . . . . . . . . . @ @ @ . . . . @ . . . @ . . @ . . . . . @ . . . . . . . @ . . @ @ . . . @ . @ . . @ . . @ . @ . . @ . . @ . @ . . @ . . @ . @ . . @ . . @ . @ . . @ . . @ . . @ @ . @ @ . . . . . . . . . . . . . . . . . . "A" . . . . . . . . . . . A . . . . . . A . A . . . . A . . . A . . A . . . . . A . A . . . . . A . A . . . . . A . A . . . . . A . . 5 . . . . . . . 5 5 5 5 . . . . 5 . . . 5 . . . . . . . . 5 . . . . . . . 5 . 5 . . . . . 5 . . 5 . . . 5 . . . . 5 5 5 . . . . . . . . . . . . . . . . . . . "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 . . . . A A A A A A A . A . . . . . A . A . . . . . A . A . . . . . A . . . . . . . . . . . . . . . . . "B" . . . . . . . . B B B B B . . . B . . . . B . . B . . . . . B . B . . . . . B . B . . . . B . . B B B B B . . . B . . . . B . . B . . . . . B . B . . . . . B . B . . . . B . . B B B B B . . . . . . . . . . . . . . . . . . . "C" . . . . . . . . . . C C C . .  . . . . . . . . . . . . . . . "7" . . . . . . . . 7 7 7 7 7 7 7 . 7 . . . . . 7 . 7 . . . . 7 . . . . . . 7 . . . . . . . 7 . . . . . . 7 . . . . . . . 7 . . . . . . . 7 . . . . . . . 7 . . . . . . . 7 . . . . . . . 7 . . . . . . . . . . . . . . . . . . . . "8" . . . . . . . . . . 8 8 8 . . . . 8 . . . 8 . . 8 . . . . . 8 . 8 . . . . . 8 . . . C . . . C . . C . . . . . C . C . . . . . . . C . . . . . . . C . . . . . . . C . . . . . . . C . . . . . . . C . . . . . C . . C . . . C . . . . C C C . . . . . . . . . . . . . . . . . . . "D" . . . . . . . . D D D D D . . . . D . . . D . . . D . . . . D . . D . . . . D . . D . . . . D . . D . . . . D . . D . . . . D . . D . . . . D . . 8 . . . 8 . . . . 8 8 8 . . . . 8 . . . 8 . . 8 . . . . . 8 . 8 . . . . . 8 . . 8 . . . 8 . . . . 8 8 8 . . . . . . . . . . . . . . . . . . . "9" . . . . . . . . . . 9 9 9 . . . . 9 . . . 9 . . 9 . . . . . 9 . 9 . . . . . 9 . 9 . . . . . 9 . . 9 . . . 9 9 . . . 9 9 9 . 9 . . . . . . . 9 . 9 . . . . . 9 . . 9 . . . 9 . . . . 9 9 9 . . . . . . . . . . . . . D . . . . D . . D . . . D . . D D D D D . . . . . . . . . . . . . . . . . . . "E" . . . . . . . . E E E E E E E . E . . . . . . . E . . . . . . . E . . . . . . . E . . . . . . . E E E E E E . . E . . . . . . . E . . . . . . . E . . . . . . . E . . . . . . . E E E E E E E . . . . . . . . . . . . . . . . . "F" . . . . . . . . F F F F F F F . F . . . . . .  . . . . . . . ":" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . : : . . . . . . : : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . : : . . . . . . : : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ";" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; ; . . . . . . ; ; . . . . . . F . . . . . . . F . . . . . . . F . . . . . . . F F F F F . . . F . . . . . . . F . . . . . . . F . . . . . . . F . . . . . . . F . . . . . . . . . . . . . . . . . . . . . . . "G" . . . . . . . . . . G G G . . . . G . . . G . . G . . . . . G . G . . . . . . . G . . . . . . . G . . . G G G . G . . . . . G . G . . . . . G . G . . . . . G . . . . . . . . . . . . . . . . . . . . . . . . . . ; ; . . . . . . ; ; . . . . . . . ; . . . . . . ; . . . . . . . . . . . . . . "<" . . . . . . . . . . . . . < . . . . . . < . . . . . . < . . . . . . < . . . . . . < . . . . . . < . . . . . . . . < . . . . . . . . < . . . . . . . . < . . . . . . . . < . . . . . . . . < . . . . . . . . . . . . . . . . . . "=. G . . . G G . . . G G G . G . . . . . . . . . . . . . . . . . "H" . . . . . . . . H . . . . . H . H . . . . . H . H . . . . . H . H . . . . . H . H . . . . . H . H H H H H H H . H . . . . . H . H . . . . . H . H . . . . . H . H . . . . . H . H . . . . . H . . . . . . . . . . . . . . . . . "I" . . . . . . . . . . I I I . . . . . . I . . . . . . . I . . . " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . = = = = = = = . . . . . . . . . . . . . . . . . = = = = = = = . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ">" . . . . . . . . > . . . . . . . . > . . . . . . . . > . . . . . . . . > . . . . . . . . > . . . . . . . . > . .       . . . . I . . . . . . . I . . . . . . . I . . . . . . . I . . . . . . . I . . . . . . . I . . . . . . . I . . . . . . I I I . . . . . . . . . . . . . . . . . . . "J" . . . . . . . . . . . . J J J . . . . . . J . . . . . . . J . . . . . . . J . . . . . . . J . . . . . . . J . . . . . . . J . . . . . . . J . . J . . . . J . . J . . . J . . .  . . . . . U . U . . . . . U . . U . . . U . . . . U U U . . . . . . . . . . . . . . . . . . . "V" . . . . . . . . V . . . . . V . V . . . . . V . V . . . . . V . V . . . . . V . V . . . . . V . V . . . . . V . V . . . . . V . V . . . . . V . . V . . . V . . . . V . V . . . . . . V . . . . . . . . . . . . . . . . . . . . "W" . . . . . . . . . J J J . . . . . . . . . . . . . . . . . . . . "K" . . . . . . . . K . . . . . K . K . . . . K . . K . . . K . . . K . . K . . . . K . K . . . . . K K . . . . . . K . K . . . . . K . . K . . . . K . . . K . . . K . . . . K . . K . . . . . K . . . . . . . . . . . . . . . . . "L" . . . . . . . . . L . . . . . . . L . . . . . . . L . . . . . . . L . . . . . W . . . . . W . W . . . . . W . W . . . . . W . W . . . . . W . W . . . . . W . W . . W . . W . W . . W . . W . W . W . W . W . W . W . W . W . . W . . . W . . . W . . . W . . . . . . . . . . . . . . . . . . "X" . . . . . . . . X . . . . . X . X . . . . . X . X . . . . . X . . X . . . X . . . . X . X . . . . . . X . . . . . . X . X . . . . X . . . X . . X . . L . . . . . . . L . . . . . . . L . . . . . . . L . . . . . . . L . . . . . . . L . . . . . . . L L L L L L . . . . . . . . . . . . . . . . . "M" . . . . . . . . M . . . . . M . M M . . . M M . M . M . M . M . M . . M . . M . M . . M . . M . M . . M . . M . M . . . . . M . M . . . . . M . M . . . . . M . M . . . . . M . M . . . . . M .  . . . . . X . X . . . . . X . X . . . . . X . . . . . . . . . . . . . . . . . "Y" . . . . . . . . Y . . . . . Y . Y . . . . . Y . Y . . . . . Y . . Y . . . Y . . . . Y . Y . . . . . . Y . . . . . . . Y . . . . . . . Y . . . . . . . Y . . . . . . . Y . . . . . . . Y . . . . . . . . . . . . . . . . . . . . "Z" . . . . . . . . Z Z Z Z Z Z Z . . . . . . . . . . . . . . . . . "N" . . . . . . . . N . . . . . N . N N . . . . N . N . N . . . N . N . N . . . N . N . . N . . N . N . . N . . N . N . . . N . N . N . . . N . N . N . . . . N N . N . . . . . N . N . . . . . N . . . . . . . . . . . . . . . . . "O" . . . . . . . . . . O O O . . . . O . . . O . . O . . . . . O . O . . . . . O . O . . . . . O . . . . . . Z . . . . . . . Z . . . . . . Z . . . . . . Z . . . . . . Z . . . . . . Z . . . . . . Z . . . . . . Z . . . . . . . Z . . . . . . . Z Z Z Z Z Z Z . . . . . . . . . . . . . . . . . "[" . . . . . . . . . . . [ [ [ . . . . . [ . . . . . . . [ . . . . . . . [ . . . . . . . [ . . . . . . . [ . . . . . . . [ . . . . . . . [ . . . . . . . [ . . . . . . O . . . . . O . O . . . . . O . O . . . . . O . O . . . . . O . . O . . . O . . . . O O O . . . . . . . . . . . . . . . . . . . "P" . . . . . . . . P P P P P . . . P . . . . P . . P . . . . . P . P . . . . . P . P . . . . . P . P . . . . P . . P P P P P . . . P . . . . . . . P . . . . . . . P . . . . . . . P . . . . . . . . . . . . . . .  . . [ . . . . . . . [ [ [ . . . . . . . . . . . . . . . . . . "\" . . . . . . . . . . . . . . . . . . . . . . . . \ . . . . . . . . \ . . . . . . . . \ . . . . . . . . \ . . . . . . . . \ . . . . . . . . \ . . . . . . . . \ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "]" . . . . . . . . . ] ] ] . . . . . . . ] . . . . . . . . . . . . "Q" . . . . . . . . . . Q Q Q . . . . Q . . . Q . . Q . . . . . Q . Q . . . . . Q . Q . . . . . Q . Q . . . . . Q . Q . . . . . Q . Q . Q Q Q . Q . Q Q . . . Q Q . . Q . . . Q . . . . Q Q Q . Q . . . . . . . . . . . . . . . . . "R" . . . . . . . . R R R R R . . . R . . . . R . . R . . . . . R . R . . . . . R . R . . . . R . . R R R R R . . . . . ] . . . . . . . ] . . . . . . . ] . . . . . . . ] . . . . . . . ] . . . . . . . ] . . . . . . . ] . . . . . . . ] . . . . . ] ] ] . . . . . . . . . . . . . . . . . . . . "^" . . . . . . . . . . . ^ . . . . . . ^ . ^ . . . . ^ . . . ^ . . ^ . . . . . ^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R . . R . . . . R . . . R . . . R . . . R . . . R . . . . R . . R . . . . . R . . . . . . . . . . . . . . . . . "S" . . . . . . . . . . S S S . . . . S . . . S . . S . . . . . S . S . . . . . . . . S . . . . . . . . S S S . . . . . . . . S . . . . . . . . S . S . . . . . S . . S . . . S . . . . S S S . . . . . . . . . . . . . . . . . . . "T"  . . . . . . . . . . . . . . . . . . . . . . . "_" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _ _ _ _ _ _ _ . . . . . . . . . . . . . . . . . . . . . . . . . T T T T T T T . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . T . . . . . . . . . . . . . . . . . . . . "U" . . . . . . . . U . . . . . U . U . . . . . U . U . . . . . U . U . . . . . U . U . . . . . U . U . . . . . U . U . . . . . U . U !     !     "     "     #     #     $     $     %     %     &     &     '     '     (     (     )     )     *     *     +     +     ,     ,     -     -     .     .     /     /     0     0     1     1     2     2     3     3     4     4     5     5     6     6     7     7     8     8     9     9     :     :     ;     ;     <     <     =     =     >     >     ?     ?     @     @     A     A     B     B     C     C     D     D     E     E     F     F     G     G     H     H     I     I     J     J     K     K     L     L