-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon.h
34 lines (31 loc) · 803 Bytes
/
common.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
#ifndef _COMMON_H
#define _COMMON_H
namespace size
{
enum param_size { BIT_8, BIT_16, BIT_32,MAX_SIZE,ERROR_SIZE};
}
namespace regs
{
enum regs { EAX,EBX,ECX,EDX,ESI,EDI,EBP,ESP,AX,BX,CX,DX,SI,DI,BP,SP,AH,BH,CH,DH,AL,BL,CL,DL,MAX_REG};
char regs_name [][8];
}
namespace parameters
{
enum parameters { REGISTER,NUMBER,MEMORY,MAX_PARAMETERS,ERROR_PARAM};
}
namespace excp
{
enum exception { NO_REGISTER_FREE,NO_METHOD_AVAILABLE,STACK_OVERFLOW,ILLEGAL_OPERAND};
}
namespace op
{
enum operands {OP_DEFAULT,OP_PUSH,OP_ERROR};
}
#define PARAMETERS_NOT_PROTECTED 0x01 //in case the operand is not reversible...
#define PARAMETERS_8 0x02
#define PARAMETERS_16 0X04
#define PARAMETERS_32 0X08
#define PARAMETERS_NUMBER 0X20
#define PARAMETERS_REG 0X40
#define PARAMETERS_MEM 0X80
#endif