-
Notifications
You must be signed in to change notification settings - Fork 0
/
CODE.H
49 lines (41 loc) · 855 Bytes
/
CODE.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
// Single-byte opcode descriptors
#define EXEC 1
#define VAR0_ASSIGN 2
#define VAR1_ASSIGN 3
#define VAR2_ASSIGN 4
#define GENERAL_IF 5
#define ELSE 6
#define GOTO 7
#define FOR_LOOP0 8
#define FOR_LOOP1 9
#define SWITCH 10
#define CASE 11
#define ENDSCRIPT 255
// Single-byte operand descriptors
#define OP_IMMEDIATE 1
#define OP_VAR0 2
#define OP_VAR1 3
#define OP_VAR2 4
#define OP_GROUP 5
// Single-byte IF handler parameters
#define ZERO 0
#define NONZERO 1
#define EQUALTO 2
#define NOTEQUAL 3
#define GREATERTHAN 4
#define GREATERTHANOREQUAL 5
#define LESSTHAN 6
#define LESSTHANOREQUAL 7
// Single byte assignment descriptors
#define SET 1
#define INCREMENT 2
#define DECREMENT 3
#define INCSET 4
#define DECSET 5
// Operand combination descriptors
#define ADD 1
#define SUB 2
#define MULT 3
#define DIV 4
#define MOD 5
#define OP_END 255