DEFINITION MODULE Graphic;

FROM GEMVDIbase IMPORT BigPxyArrayType;
FROM SYSTEM IMPORT ADDRESS ;        

CONST 
      xindex = 0;(* unit size 40x20*)
      maxwidth = 7;
      yindex = 0;
      maxheight = 9;
      spritewidth = 20;
      spriteheight = 20;

TYPE  a1 = POINTER TO MFDBType;
MFDBType = RECORD (*memory form definition block*)
pointer : ADDRESS; (*address of first plane*)
width   : CARDINAL;
height  : CARDINAL;
widthw  : CARDINAL;
format  : CARDINAL;
planes  : CARDINAL;
rsvd1,rsvd2 : CARDINAL;
END;

VAR
           
   ScreenPhis,ScreenLog,Addr1,Addr2,Addr0 : ADDRESS;
   erase : BigPxyArrayType; 
   sprite : ARRAY[xindex..maxwidth]OF ARRAY[yindex..maxheight] OF BigPxyArrayType;
   screen,b1,b2,b3 : a1;      
   handle : INTEGER;
PROCEDURE flip;
PROCEDURE show;
PROCEDURE NeoRead(VAR Name : ARRAY OF CHAR; VAR Addr1 : ADDRESS);
PROCEDURE Setspriteto(snw,snh,sdx,sdy : INTEGER);
PROCEDURE Setspritefrom(snw,snh,sdx,sdy : INTEGER);
PROCEDURE Setspriterase(sdx,sdy : INTEGER);
PROCEDURE InitGraphic;
PROCEDURE Term;
PROCEDURE clearhome;
PROCEDURE Base;
END Graphic.