- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
#define REGISTERS_LIST A, B, C, D, E, SI, BP, SP, IP
#define LREGISTERS_LIST AH, AL, BH, BL, CH, CL, DH, DL, EH, EL, SIH, SIL, BPH, BPL, SPH, SPL, IPH, IPL
enum RegisterID
{
REGISTERS_LIST,
LREGISTERS_LIST
};
const static std::string registerId2registerName[] = {
#define _MAP(x) #x
MAP_LIST(_MAP, REGISTERS_LIST),
MAP_LIST(_MAP, LREGISTERS_LIST)
};
#undef _MAP
const static std::map<std::string, RegisterID> registerName2registerId = {
#define _MAP(x) {#x, x}
MAP_LIST(_MAP, REGISTERS_LIST),
MAP_LIST(_MAP, LREGISTERS_LIST)
};
#undef _MAP