vmod/vmodttl: fixed bug related to luns not ordered and/or not starting from zero.
[ht-drivers.git] / mttn / include / opcodes.h
blobe8d70a0774adf31b720022fbb337cf15f9f1892f
2 #ifndef OPCODES_H
3 #define OPCODES_H
4 /* Describe the MTT CTG module instruction Set */
7 typedef enum {
9 HALT = 0x00,
10 NOOP = 0x4d,
11 INT = 0xC1,
13 WEQV = 0x91, WEQR = 0x11,
14 WRLV = 0x92, WRLR = 0x12,
15 WORV = 0x93, WORR = 0x13,
17 MOVV = 0xe2, MOVR = 0x62,
19 MOVIR= 0x64,
20 MOVRI= 0x65,
22 ADDV = 0xe6, ADDR = 0x66,
23 SUBV = 0xe7, SUBR = 0x67,
24 LORV = 0xe8, LORR = 0x68,
25 ANDV = 0xe9, ANDR = 0x69,
26 XORV = 0xea, XORR = 0x6a,
27 LSV = 0xeb, LSR = 0x6b,
28 RSV = 0xec, RSR = 0x6c,
30 WDOG = 0x34,
31 JMP = 0x85,
32 BEQ = 0x86,
33 BNE = 0x87,
34 BLT = 0x88,
35 BGT = 0x89,
36 BLE = 0x8a,
37 BGE = 0x8b,
38 BCR = 0x8c,
40 OPCODES = 36
42 } IdNumber;
44 /* Describe the MTT CTG module register Set */
46 #define REGISTERS 256
47 #define REGNAMES 15
48 #define GLOBALS 224
49 #define LOCALS 32
50 #define GLOBAL_REG 1
51 #define LOCAL_REG 2
53 typedef struct {
54 char *Name;
55 char *Comment;
56 int Start;
57 int End;
58 int Offset;
59 int LorG; /* 1=>Global 2=>Local */
60 } RegisterDsc;
64 extern OpCode InstructionSet[OPCODES];
65 extern RegisterDsc Regs[REGNAMES];
67 #endif