summaryrefslogtreecommitdiff
path: root/nqasm.h
blob: 0bc51f76cf302aa8e66bd726821676b52f908096 (plain)
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
#ifndef NQ_NQASM_H
#define NQ_NQASM_H

#define ARG_INTEGER   0
#define ARG_LABEL     1
#define ARG_PC        2

struct argument {
	int type;
	union {
		long value;
		char *label;
	};
};

struct arguments {
	struct argument args[3];
};

struct instruction {
	int mnem;
	struct arguments args;
};

void add_instruction(const struct instruction *);
void add_label(const char *);

#endif