RESIDENT_MSG	EQU	0 
DISCARDABLE_MSG	EQU	1 
MAXRESIDENTPAGES	EQU	2 
MAXDISCARDPAGES	EQU	2 
INVALID_MSG	EQU	-1 


Def_Message_Table MACRO   tablename
                  public      tablename,_&tablename
tablename           label   word
_&tablename         label   word
                    ?lastmsg = 0
                  ENDM


Def_Msg_Table_Entry MACRO msgno
                      if (?lastmsg NE 0)
                        .errnz (msgno LE ?lastmsg)
                      endif
                      dw msgno
                      dw 0       
                      ?lastmsg = msgno
                    ENDM


Def_Load_Message_Table MACRO
                       public      _Load_Message_Table
_Load_Message_Table      label word
                         ?lastmsg = 0
                       ENDM


Def_Load_Msg MACRO msgno,type
               if (?lastmsg NE 0)
                 .errnz (msgno LE ?lastmsg)
               endif
               dw msgno
               ifidni <type>,<Resident>
                 db RESIDENT_MSG
               else
                 db DISCARDABLE_MSG
               endif
               ?lastmsg = msgno
             ENDM



LoadMsgEntry	STRUC
MsgNumber	DW	?
MsgType	DB	?
LoadMsgEntry	ENDS


MsgEntry	STRUC
MsgNo	DW	?
pMsg	DD	?
MsgEntry	ENDS


file_head	STRUC
signature_h	DB	8 DUP (?)
component_id	DB	3 DUP (?)
msg_count	DD	?
base_mid	DD	?
offset_type	DB	?
version	DD	?
header_length	DD	?
cp_type	DB	?
code_page	DD	?
reserved	DB	8 DUP (?)
file_head	ENDS

