#define LAST_CH_POS	132
#define SFIELD	26	/*23*/
#define STABSZ	6000
#define SBOLSZ	32

/*
 * symbol flags
 */
#define DEFZRO	2	/* defined - page zero address	*/
#define MDEF	3	/* multiply defined		*/
#define UNDEF	1	/* undefined - may be zero page */
#define DEFABS	4	/* defined - two byte address	*/
#define UNDEFAB 5	/* undefined - two byte address */

/*
 * operation code flags
 */
#define CLASS1		0x010000
#define CLASS2		0x020000
#define CLASS3		0x040000
#define CLASS5		0x080000
#define CLASS6		0x100000
#define CLASS7		0x200000
#define CLASS8		0x400000
#define PSEUDO		0x008000
#define ACC			0x000001
#define IMM			0x000002
#define ZP			0x000004
#define ZP_X		0x000008
#define ZP_Y		0x000010
#define ZP_IND		0x000020
#define ZP_IND_X	0x000040
#define ZP_IND_Y	0x000080
#define ABS			0x000100
#define ABS_X		0x000200
#define ABS_Y		0x000400
#define ABS_IND		0x000800
#define ABS_IND_X	0x001000

/*
 * pass flags
 */
#define FIRST_PASS	0
#define LAST_PASS	1
#define DONE		2

struct t_opcode {
	char *name;
	int   flag;
	int   value;
	int   type_idx;
};

struct t_input_info {
	FILE *fptr;
	int   lnum;
	char  name[120];
};

struct t_symbol {
	struct t_symbol *next;
	struct t_symbol *local;
	int  type;
	int  value;
	int  bank;
	int  page;
	char name[32];
};

struct t_line {
	struct t_line *next;
	char *data;
};

struct t_macro {
	struct t_macro *next;
	struct t_line *line;
	char name[32];
};

struct pcx_header {
	char  manufacturer, version,
		  encoding,
		  bpp;
	short xmin, ymin, xmax, ymax,
		  xdpi, ydpi;
	char  colormap[16][3],
		  reserved,
		  np;
	short bytes_per_line,
		  palette_info,
		  xscreen, yscreen;
	char  pad[54];
};

