1 
2 static UINT32 EA;
3 static UINT16 EO;
4 static UINT16 E16;
5 
EA_000(nec_state_t * nec_state)6 static unsigned EA_000(nec_state_t *nec_state) { EO=Wreg(BW)+Wreg(IX); EA=DefaultBase(DS0)+EO; return EA; }
EA_001(nec_state_t * nec_state)7 static unsigned EA_001(nec_state_t *nec_state) { EO=Wreg(BW)+Wreg(IY); EA=DefaultBase(DS0)+EO; return EA; }
EA_002(nec_state_t * nec_state)8 static unsigned EA_002(nec_state_t *nec_state) { EO=Wreg(BP)+Wreg(IX); EA=DefaultBase(SS_)+EO; return EA; }
EA_003(nec_state_t * nec_state)9 static unsigned EA_003(nec_state_t *nec_state) { EO=Wreg(BP)+Wreg(IY); EA=DefaultBase(SS_)+EO; return EA; }
EA_004(nec_state_t * nec_state)10 static unsigned EA_004(nec_state_t *nec_state) { EO=Wreg(IX); EA=DefaultBase(DS0)+EO; return EA; }
EA_005(nec_state_t * nec_state)11 static unsigned EA_005(nec_state_t *nec_state) { EO=Wreg(IY); EA=DefaultBase(DS0)+EO; return EA; }
EA_006(nec_state_t * nec_state)12 static unsigned EA_006(nec_state_t *nec_state) { EO=FETCH(); EO+=FETCH()<<8; EA=DefaultBase(DS0)+EO; return EA; }
EA_007(nec_state_t * nec_state)13 static unsigned EA_007(nec_state_t *nec_state) { EO=Wreg(BW); EA=DefaultBase(DS0)+EO; return EA; }
14 
EA_100(nec_state_t * nec_state)15 static unsigned EA_100(nec_state_t *nec_state) { EO=(Wreg(BW)+Wreg(IX)+(INT8)FETCH()); EA=DefaultBase(DS0)+EO; return EA; }
EA_101(nec_state_t * nec_state)16 static unsigned EA_101(nec_state_t *nec_state) { EO=(Wreg(BW)+Wreg(IY)+(INT8)FETCH()); EA=DefaultBase(DS0)+EO; return EA; }
EA_102(nec_state_t * nec_state)17 static unsigned EA_102(nec_state_t *nec_state) { EO=(Wreg(BP)+Wreg(IX)+(INT8)FETCH()); EA=DefaultBase(SS_)+EO; return EA; }
EA_103(nec_state_t * nec_state)18 static unsigned EA_103(nec_state_t *nec_state) { EO=(Wreg(BP)+Wreg(IY)+(INT8)FETCH()); EA=DefaultBase(SS_)+EO; return EA; }
EA_104(nec_state_t * nec_state)19 static unsigned EA_104(nec_state_t *nec_state) { EO=(Wreg(IX)+(INT8)FETCH()); EA=DefaultBase(DS0)+EO; return EA; }
EA_105(nec_state_t * nec_state)20 static unsigned EA_105(nec_state_t *nec_state) { EO=(Wreg(IY)+(INT8)FETCH()); EA=DefaultBase(DS0)+EO; return EA; }
EA_106(nec_state_t * nec_state)21 static unsigned EA_106(nec_state_t *nec_state) { EO=(Wreg(BP)+(INT8)FETCH()); EA=DefaultBase(SS_)+EO; return EA; }
EA_107(nec_state_t * nec_state)22 static unsigned EA_107(nec_state_t *nec_state) { EO=(Wreg(BW)+(INT8)FETCH()); EA=DefaultBase(DS0)+EO; return EA; }
23 
EA_200(nec_state_t * nec_state)24 static unsigned EA_200(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(BW)+Wreg(IX)+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
EA_201(nec_state_t * nec_state)25 static unsigned EA_201(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(BW)+Wreg(IY)+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
EA_202(nec_state_t * nec_state)26 static unsigned EA_202(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(BP)+Wreg(IX)+(INT16)E16; EA=DefaultBase(SS_)+EO; return EA; }
EA_203(nec_state_t * nec_state)27 static unsigned EA_203(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(BP)+Wreg(IY)+(INT16)E16; EA=DefaultBase(SS_)+EO; return EA; }
EA_204(nec_state_t * nec_state)28 static unsigned EA_204(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(IX)+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
EA_205(nec_state_t * nec_state)29 static unsigned EA_205(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(IY)+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
EA_206(nec_state_t * nec_state)30 static unsigned EA_206(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(BP)+(INT16)E16; EA=DefaultBase(SS_)+EO; return EA; }
EA_207(nec_state_t * nec_state)31 static unsigned EA_207(nec_state_t *nec_state) { E16=FETCH(); E16+=FETCH()<<8; EO=Wreg(BW)+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
32 
33 static unsigned (*const GetEA[192])(nec_state_t *)={
34 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
35 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
36 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
37 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
38 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
39 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
40 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
41 	EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
42 
43 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
44 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
45 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
46 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
47 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
48 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
49 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
50 	EA_100, EA_101, EA_102, EA_103, EA_104, EA_105, EA_106, EA_107,
51 
52 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
53 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
54 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
55 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
56 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
57 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
58 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207,
59 	EA_200, EA_201, EA_202, EA_203, EA_204, EA_205, EA_206, EA_207
60 };
61