  (**************************************************************) 
  (*   This module was generated by BEG V1.84        *)
  (*        GMD Forschunsstelle an der Universitaet Karlsruhe   *)
  (*        Vincenz-Priessnitz-Str. 1 76131 Karlsruhe Germany   *)
  (**************************************************************)
DEFINITION MODULE Emit;
IMPORT IR;
FROM   IR IMPORT RegisterSet;
(*++++++ start insertion IpTypes ++++++*)

IMPORT CgBase;
FROM Strings	IMPORT	String;


(*------ end   insertion IpTypes ------*)
(*++++++ start insertion IpEmit_d ++++++*)

FROM SuErrors IMPORT SourcePosition;
FROM IR IMPORT MemAdr;

CONST	MaxCallLevel	= 32;		(* Max. # nested procedurecalls	    *)

VAR
    SizeTable     : ARRAY CgBase.Mode OF SHORTINT;
                            (* maps Mode to OpSize                         *)

    SuffixTable   : ARRAY CgBase.Mode OF CHAR;
			    (* maps Mode into suffix of load instruction   *)

    SignedTable   : ARRAY CgBase.Mode OF BOOLEAN;
                            (* calculates wether Mode is signed            *)

    NullSymb		: CgBase.RelSymb;
    DisplaySym		: CgBase.RelSymb;
    
    CurPos		: SourcePosition;
    CurLevel		: SHORTCARD;
    CallLevel		: SHORTCARD;
    
PROCEDURE DeclareModule
   (    extern       : BOOLEAN;
    VAR CompUnitName : ARRAY OF CHAR; 
    VAR ref          : CgBase.ModuleIndex);

PROCEDURE DeclareProcedure
   (    extern       : BOOLEAN;
	isFunction   : BOOLEAN;
	ProcMode     : CgBase.Mode;
    VAR ProcName     : ARRAY OF CHAR; 
        ProcNumber   : SHORTCARD;
        module       : CgBase.ModuleIndex;
	level        : SHORTCARD;
	father       : CgBase.ProcIndex;
    VAR ref          : CgBase.ProcIndex);

PROCEDURE DeclareString
   (    length : SHORTCARD;
    VAR string : ARRAY OF CHAR; 
    VAR ref    : CgBase.StringIndex);

PROCEDURE DeclareTempo
   (    mode: CgBase.Mode;
    VAR tempo: CgBase.Tempo);

PROCEDURE  BeginModule
   (AtModulName  :  ARRAY OF CHAR;
    AtFrameSize  :  LONGINT);

PROCEDURE IsNilMemAdr (a: MemAdr) : BOOLEAN;



(*------ end   insertion IpEmit_d ------*)

PROCEDURE EmitInstruction (e : IR.Expression);
PROCEDURE EmitStatement (e: IR.Expression);


END Emit.
