-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstr.h
68 lines (59 loc) · 2.32 KB
/
instr.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef __INSTR_H__
#define __INSTR_H__
struct instr_decode_common {
uint16_t instr;
uint16_t args[3];
};
struct instr_decode {
uint16_t icode;
uint16_t arguments;
void (*code)(struct instr_decode_common *);
void (*transpile)(struct instr_decode_common *);
const char *name;
};
void instr_add(struct instr_decode_common *);
void instr_and(struct instr_decode_common *);
void instr_call(struct instr_decode_common *);
void instr_eq(struct instr_decode_common *);
void instr_gt(struct instr_decode_common *);
void instr_halt(struct instr_decode_common *);
void instr_in(struct instr_decode_common *);
void instr_jmp(struct instr_decode_common *);
void instr_jf(struct instr_decode_common *);
void instr_jt(struct instr_decode_common *);
void instr_ld(struct instr_decode_common *);
void instr_mod(struct instr_decode_common *);
void instr_mult(struct instr_decode_common *);
void instr_nop(struct instr_decode_common *);
void instr_not(struct instr_decode_common *);
void instr_or(struct instr_decode_common *);
void instr_out(struct instr_decode_common *);
void instr_pop(struct instr_decode_common *);
void instr_push(struct instr_decode_common *);
void instr_ret(struct instr_decode_common *);
void instr_rmem(struct instr_decode_common *);
void instr_wmem(struct instr_decode_common *);
void instr_unimp(struct instr_decode_common *);
void trans_add(struct instr_decode_common *);
void trans_and(struct instr_decode_common *);
void trans_call(struct instr_decode_common *);
void trans_eq(struct instr_decode_common *);
void trans_gt(struct instr_decode_common *);
void trans_halt(struct instr_decode_common *);
void trans_in(struct instr_decode_common *);
void trans_jmp(struct instr_decode_common *);
void trans_jf(struct instr_decode_common *);
void trans_jt(struct instr_decode_common *);
void trans_ld(struct instr_decode_common *);
void trans_mod(struct instr_decode_common *);
void trans_mult(struct instr_decode_common *);
void trans_nop(struct instr_decode_common *);
void trans_not(struct instr_decode_common *);
void trans_or(struct instr_decode_common *);
void trans_out(struct instr_decode_common *);
void trans_pop(struct instr_decode_common *);
void trans_push(struct instr_decode_common *);
void trans_ret(struct instr_decode_common *);
void trans_rmem(struct instr_decode_common *);
void trans_wmem(struct instr_decode_common *);
#endif