#ifndef __ERRORMSG
#define __ERRORMSG
//---------------------------------------------------------
// ERRORMSG.H
// Keith Larson
// TMS320 DSP Applications
// (c) Copyright 1995, 1996
// Texas Instruments Incorporated
//
// This is unsupported freeware code with no implied warranties or
// liabilities.  See the disclaimer document for details
//---------------------------------------------------------
extern int  warn_cnt;
extern int  err_cnt;
extern char nullstring[];
#define bufsize 179
/*
typedef enum SYM_TYPES
{
  SYM_LABEL,
  SYM_VARIABLE,
  SYM_FOO
};

typedef enum NUM_TYPES
{
  NOREF  =0, // These typedefs are currently hard coded into the
  INTEGER=1, // asciinum() function.  To remove this dependancy
  FLOAT  =2, // both asciinum and all assembler forms 'AForm()'
  AUTO   =3, // will need to be cleaned.  IE will do at a later time...
  DEFINE =4,
  LONG   =5,
  ULONG  =6,
  QFORM  =7,
  VAR_ADD,    // 0
  LBL_ADD,    // 1
  DEF_ADD,    // 2
  ANNUL
};
*/
typedef enum {
  //
  // Operand field type returns
  //
  SRC_REG=1,  // NOTE: Do not change the values for these
  SRC_DIR,    // first four return values.  There is still
  SRC_IND,    // some code in ASMC40 which is hard coded.
  SRC_IMM,
  // General purpose returns
  PATCH_ERR,
  NO_LINE,                       // No line to convert
  NO_CODE,                       // No code at this line
  DIR_NO_ERR,                    // Directive NO_ERR
  PAR_NO_ERR,
  NO_ERR,                        // GP Assembler NO_ERR
  //
  WARNING,
  ERROR,
  // Expression analyzer I/O and token types
  NOTOK,
  DELIMITER,
  VARIABLE,
  NUMBER,
  FUNCTION,
  // General error returns
  TOO_MANY_ERR,
  FATAL,    // Fatal error return value(s)
  FATAL_OPC,// Fatal opcode or operand conversion
  WARN,     // Warning return value(s)
  W_GLBL,
  W_SIZE8,
  W_SIZE16,
  W_SIZE24,
  W_IS_IMMED,
  W_IS_REG,
  TIMEOUT,
  ABORT,
  //
  // Assembler error returns
  //
  SYM_LOAD,
  NO_OPRND,
  BAD_OPCD,
  REG_INT,
  USE_LDI,
  NO_STIK,
  NOT_IMMED,
  PAR_ERR,
  DISP_ERR,
  IND_ERR,
  IRX_ERR,
  INC_ERR,
  CIR_ERR,
  BAD_MOD,
  BAD_ARG,
  INV_CMBN,
  CONV_ERR,
  LABEL_ERR,
  SET_ERR,
  MULT_REF,
  //
  // Debugger error returns
  //
  IIF_ERR, BP_FOUND,
  MISSING_EQ,
  TOO_MANY_ARGS,
  UNKN_ERR, UNKN_EXPR,
  ACCESS_ERR,
  OPEN_ERR,
  DSK_FILE_ERR,
  FORMAT_ERR,
  DATA_ERR,
  SYS_ERR,
  TOO_MANY_BRKPT,
  OUT_MAP,
  DELAYED_ERR,
  NO_BRKPT,
  FLOAT_OVF,
  INT_VALUE,
  RUN_ERR,
  EXPR_ERR,
  EXPR_ANAL,
  MISS_ARG,
  XTRA_ARG,
  BAD_ARGS,
  UNK_FUNC,
  BP_ERR,
  USER_STOP,
  BAD_REGISTER,
  NOT_ALWD,
  //
  // COFF file handler errors
  //
  INV_COFF_MGC, BAD_OPTN_HDR, MAX_SECTN,
  //
  // General Purpose COMM Kernel errors
  //
  HOST_PORT,
  XMIT_ERR,RECV_ERR, COM_ERR,
  //
  // ERR returns for M4X (TMS320C4x Multiprocessor Comm & Debug Kernel)
  //
  BAD_LENGTH,
  INIT_ERR,
  Recover1,Recover2,
  RPTB_ERR,
  //
  // Enumerated directive search return values
  //
  FATAL_SYM1,
  FATAL_SYM2,
  range_warn,
  NO_REF,                 // reference table error
  //
  FIX_COFF,
  FLOAT_COFF,
  FATAL_OPEN,
  FILE_HEX,
  DSK_HEX,
  COFF_HEX,
  MEM_HEX,
  HEX_COFF,
  MEM_COFF,
  DSK_COFF,
  //
  DSBL_WIN,
  ENBL_WIN,
  MAX_FLEN,
  MAX_FLEN2,
  //
  d_disp,
  d_start,
  d_entry,
  d_data,
  d_text,
  d_err_sect1,
  d_err_sect2,
  d_sect,
  d_sect_add,
  d_end,
  d_set,
  d_set2,
  d_sdef,

  d_ifdef,
  d_ifndef,
  d_define,

  d_END,
  d_EOF,
  d_filelength,
  d_noload,
  d_word,
  d_float,
  d_int,
  d_long,
  d_byte,
  d_hword,
  d_ieee,
  d_sfloat,              // 4-1-11
  d_float8 ,             // 4-1-3  short-log or very short float format
  d_float16,             // 8-1-7  short float format (C32 equivelent)
  d_psfloat,             // 4-1-11
  d_pfloat8 ,            // 4-1-3  short-log or very short float format
  d_pfloat16,            // 8-1-7  short float format (C32 equivelent)

  d_space,
  d_fill,
  d_err,
  d_if, d_else, d_endif,
  d_nocode,               // return for if/else/endif no code blocks
  d_if_lvl,               // warning for if/endif nest errors
  d_align,
  d_bitrev,
  d_circ,
  d_qxx,
  d_copy, d_inc, d_inc2,
  d_rstring,
  d_string,
  d_double,
  d_loop,
  d_eloop,
  d_loop_start, // marks the start of a loop - not an error
  d_loop_end,   // marks the end of a loop
  d_Enh_En,
  DISABLED,
  //
  // Expression analyzer errors and messages
  non_coff_math,
  math_err,
  x_syntax,
  x_ubalance,
  x_noexp,
  KEY_HIT,
  RESET_ERR,
  FILE_LEN,
  BOOT_RNG,
  EXT_HELP,
  DOS_OS,
  UNIX_OS,
  VERIFY_ERR
}MSGS;
char * Error_Strg(MSGS err);       // Function protoypes

// Enumerated MSGS removed 5/20/97
//
//  CMDFILE,
//MEM_ERR,
//DASM_ERR,
//CPU_ERR,
//MEMORY_ERR,
//RPTS_ERR,
//EXEC_ERR,
//CALC_ERR,
//INSTR_ERR,
//TRAP_ERR,
//FIFO_OVF,
//BAD_OSTEP,
//RCRASH,
//XCRASH,
//SP_CONFLICT,
//NO_CREQ ,
//NO_CACK ,
//NO_CSTRB,
//NO_CRDY ,
//CRDY_STUCK_LO,
//CRDY_STUCK_HI,
//CSTRB_STUCK_LO,
//CSTRB_STUCK_HI,
//d_tfloat,
//d_loopn,
//EXT_MSG,

#endif
