-
Notifications
You must be signed in to change notification settings - Fork 0
/
va_vic.h
71 lines (63 loc) · 2.14 KB
/
va_vic.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
69
70
71
#ifndef VA_VIC_H
#define VA_VIC_H
#define maxKeywordLen 16
#define STANDARDuserInputLen 512
#define argumentAmount 4
// ######################################################################################## instructions
char instructionString[][maxKeywordLen] = {
"alloc", "free", "push", "pop", "flip", "unf", // 1
"staptr", "cdxptr", // 2
"mov", "set", "cast", "memv", "fill", "rsz", // 3
"inc", "dec", "add", "sub", "mul", "div", "mod", // 4
"and", "or", "xor", "not", "rshf", "lshf", // 5
"gcmp", "scmp", "gecmp", "secmp", "ecmp", "cmp", "pecmp", // 6
"input", "dprint", "print", "lib", // 7
"fread", "fwrite", "flen", "time", // 8
"ex", // 9
"Ce", "Cse", "Cge", "Cs", "Cg", "Cn", "jmp", "call", "ret", // 10
"def", "enum", "opens", "clons", "insert",// 12
"\0end"
};
enum instructionEnum {
allocst, freest, push, pop, flip, unf, // 1
staptr, cdxptr, // 2
mov, set, cast, memv, fill, rsz, // 3
inc, dec, add, sub, mul, divi, modu, // 4
and, or, xor, not, rshf, lshf, // 5
gcmp, scmp, gecmp, secmp, ecmp, cmp, pecmp, // 6
input, dprint, print, lib, // 7
firead, fiwrite, flen, timei, // 8
ex, // 9
Ce, Cse, Cge, Cs, Cg, Cn, jmp, call, ret, // 10
def, enumb, opens, clons, insert,// 11
final
};
char instructionKinds[][argumentAmount+1] = {
"d___", "d___", "p___", "P___", "d___", "d___", // 1
"D___", "D___", // 2
"Pp__", "Dd__", "Ddd_", "Ppdd", "Pdd_", "Pd__", // 3
"D___", "D___", "Ddd_", "Ddd_", "Ddd_", "Ddd_", "Ddd_", // 4
"Ddd_", "Ddd_", "Ddd_", "Dd__", "Ddd_", "Ddd_", // 5
"dd__", "dd__", "dd__", "dd__", "dd__", "dd__", "pp__", // 6
"Ppd_", "dd__", "pd__", "vvvv", // 7
"PpdD", "ppdD", "DpD_", "D___", // 8
"vvvv" // 9
};
char operationString[] = {
'_', '$', '@', 'B', 'T', '!', '^', ']', '>', '*', '*', 'l', 'o', 't', '~', ',', '%', 'N', 'b' };
enum operationEnum {
opNoop, opStackref, opStackrevref, opStackrefImm, opStackrevrefImm, opImm,
opMakenry, opEntry, opRef, opEntryKeep, opRefKeep,
opLength, opOffset, opSizeof,
opSwap, opComma,
opNry, opNrs, opBrk
};
char typeString[][4] = {
"chr", "i8", "u8",
"i16", "u16", "i32", "u32",
"i64", "u64", "f32", "f64", "\0end"
};
enum compareEnum {
CE = 1, CG = 2, CS = 4,
};
#endif