#ifndef symbols_h
#define symbols_h

/* This is the symbol table definitions.
 *
 * $Log: symbols.h,v $
 * Revision 1.2  1997/06/04 01:20:05  david
 * ANSI-fied the program.
 *
 */

static char *symbols_h_Id = "$Id: symbols.h,v 1.2 1997/06/04 01:20:05 david Exp $";

enum optype
   {
   DEFINITION, INHERENT, IMMEDIATE, DIRECT, EXTENDED, EXT_IND, RELATIVE
   };

struct xref
   {
   int line; /* Which line? */
   WORD addr; /* Reference address */
   enum optype type; /* Type of operand used in referencing this symbol */
   struct xref *next;
   };

struct symtab
   {
   struct symtab *next; /* Pointer to next symbol */
   char muldef;         /* 'M' if symbol Multiply defined */
   WORD value;          /* Value of symbol */
   char *name;          /* Symbol size + 1 for NULL */
   int  line;           /* Line that symbol is defined on */
   struct xref *xptr;   /* Pointer to Cross Reference structure lines */
   int length;          /* Length of symbol */
   };

/* This is the relocatable symbol structure which is part of the relocatable
 * object file.
 */
struct relsym
   {
   int length; /* Total length of name */
   int type; /* Type of symbol */
   int value; /* Value of symbol */
   char name[1]; /* First character of name (followed by the rest) */
   };


/* This is the format for the relocation table in the object file */
struct reloc
   {
   char operation; /* Type of operation to be performed on this variable */
   char operand; /* Type of operand for the resulting value */
   int length; /* Length of name */
   char name[1]; /* Name of variable to search for */
   };

#endif /* symbols_h */
