8 /* max # of bytes in db directive */
11 /* max # char in symbol name */
12 #define MAX_SYMBOL 1024
14 /* max # of bytes per line */
17 /* REL() computes branch operand from dest and memory */
18 /* location of the jump instruction itself */
19 /* this is later adjusted by one for jcu, of course */
20 #define BRANCH_SPACING 2
21 #define REL(dest, mem) (((dest)-((((mem)+1)/(\
22 BRANCH_SPACING))*(BRANCH_SPACING)))/(BRANCH_SPACING))
24 #define NOP_OPCODE 0 /* opcode for NOP */
26 /* a linked list of all the symbols */
31 int istarget; /* 1 if a branch target, 0 otherwise */
32 int isdef; /* 1 if defined, 0 if no value yet */
33 int line_def; /* line in which is was defined */
34 int isbit; /* 1 if a bit address, 0 otherwise */
36 int isreg; /* 1 if a register, 0 otehrwise */
37 int area; /* the area that this symbol is in */
38 struct symbol *next; };
40 /* a list of all the symbols that are branch targets */
41 /* (and will need to get aligned on 4 byte boundries) */
45 struct target *next; };
52 extern int current_area;
54 #define MEM_POS (area[current_area].alloc_position)
72 extern struct area_struct area[NUM_AREAS];
77 extern int p1, p2, p3, mem, m_len;
79 extern struct symbol * build_sym_list(char *thename);
80 extern int assign_value(char *thename, int thevalue);
81 extern int mk_bit(char *thename);
82 extern int mk_reg(char *thename);
83 extern void out(int *byte_list, int num);
84 extern int is_target(char *thename);
85 extern void pad_with_nop();
86 extern int binary2int(char *str);
87 extern int is_def(char *thename);
88 extern int get_value(char *thename);