// Header for module DAsUnit2, generated by p2c 1.21alpha-07.Dec.93
#ifndef DASUNIT2_H
#define DASUNIT2_H


#ifndef STRTYPE_H
#include "/software/include/p2c/strtype.h"
#endif


#ifdef DASUNIT2_G
# define vextern
#else
# define vextern extern
#endif


// #define MaxLBuf         64
// #define MaxLRec         512
// #define MaxLabels       (MaxLBuf * MaxLRec)

#define MaxLabels	65536

#define MaxCdByte       8
#define MaxLabelLength  16
#define MaxOpcodes      1024


typedef char Str11[MaxLabelLength + 2];

typedef uchar ByteSec[MaxCdByte];
enum LabelInfoType {
  free_, Lab, EQU, Table
};

struct TableRecType {
  LabelInfoType I;
  char S[MaxLabelLength];
  unsigned short B;
  int Hash;
};

struct LabelRecType {
  LabelInfoType I;
  char S[MaxLabelLength + 1];
  int Hash;
};


//extern unsigned short CurrentLabel;
extern int HighestLabel;
//extern unsigned short AllocatedLabels;
// extern unsigned short daBaseAddr;


extern void InstallOpcodeExit(void);
extern boolean MatchAdr(unsigned short);
extern boolean ReadCodes(char *);
extern char *GetCode(char *, uchar *, unsigned short &);
extern boolean GetTable(unsigned short &, char *, const int);

// extern void WriteLabelStr(unsigned short, char *);

extern boolean GetLabelStr(unsigned short, char *);
extern boolean AddLabel(unsigned short, char *);
extern boolean AddTable(unsigned short, char *, uchar);
extern boolean DeleteLabel(unsigned short);

extern int GetLabelNum(int);

extern void ClearAllLabels(void);
extern char *HexaWord(char *, unsigned short);
extern char *HexaByte(char *, uchar, boolean);
extern void ReadSymbols(char *);
extern void WriteSymbols(char *);
extern void *GetLabelObj(unsigned short);


#undef vextern

#endif /*DASUNIT2_H*/

// End.
