-
Notifications
You must be signed in to change notification settings - Fork 23
/
pass_two.h
49 lines (43 loc) · 944 Bytes
/
pass_two.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __PASS_TWO_H
#define __PASS_TWO_H
typedef enum {
ARG_NUM_8,
ARG_NUM_16,
ARG_NUM_24,
ARG_ADDR_OFFSET,
ARG_IX_IY_OFFSET,
ARG_BIT_NUM,
ARG_RST
} arg_type;
typedef enum {
OUTPUT_ECHO,
OUTPUT_SHOW
} output_type;
typedef struct tagexpr{
int program_counter;
int line_num;
int curr_reusable;
unsigned char *out_ptr;
int listing_offset;
char *expr;
arg_type type;
char *input_file;
bool listing_on;
int inst_size;
int or_value;
struct tagexpr *next;
} expr_t;
typedef struct output {
int program_counter;
int line_num;
int curr_reusable;
char *expr;
output_type type;
char *input_file;
struct output *next;
} output_t;
void add_pass_two_expr (char *expr, arg_type type, int inst_size, int or_value);
void add_pass_two_output (char *expr, output_type type);
void run_second_pass ();
void write_arg (int value, arg_type type, int inst_size, int or_value);
#endif