\r
EaCalc(0,0x003f,sea,size);\r
EaRead(0, 1,sea,size,0x003f);\r
\r
EaCalc(0,0x003f,sea,size);\r
EaRead(0, 1,sea,size,0x003f);\r
\r
EaCalc (1,0x003f,sea,0); // Lea\r
EaCalc (0,0x0e00,tea,2,1);\r
\r
EaCalc (1,0x003f,sea,0); // Lea\r
EaCalc (0,0x0e00,tea,2,1);\r
\r
ot(" ldr r10,[r7,#0x3c]\n");\r
EaCalc (1,0x003f, ea,0);\r
\r
ot(" ldr r10,[r7,#0x3c]\n");\r
EaCalc (1,0x003f, ea,0);\r
\r
ot(" stmdb sp!,{r9} ;@ Push r9\n"); // can't just use r12 or lr here, because memhandlers touch them\r
ot(" ldrh r11,[r4],#2 ;@ r11=register mask\n");\r
\r
ot(" stmdb sp!,{r9} ;@ Push r9\n"); // can't just use r12 or lr here, because memhandlers touch them\r
ot(" ldrh r11,[r4],#2 ;@ r11=register mask\n");\r
if(dir) { // er\r
if (ea==0x3a) Cycles=16; // ($nn,PC)\r
else if (ea==0x3b) Cycles=18; // ($nn,pc,Rn)\r
if(dir) { // er\r
if (ea==0x3a) Cycles=16; // ($nn,PC)\r
else if (ea==0x3b) Cycles=18; // ($nn,pc,Rn)\r
\r
if(dir) { // reg to mem\r
EaCalc(11,0x0e00,0,size); // reg number -> r11\r
EaRead(11,11,0,size,0x0e00); // regval -> r11\r
EaCalc(10,0x0007,ea,size);\r
\r
if(dir) { // reg to mem\r
EaCalc(11,0x0e00,0,size); // reg number -> r11\r
EaRead(11,11,0,size,0x0e00); // regval -> r11\r
EaCalc(10,0x0007,ea,size);\r
- if(size==2) { // if operand is long\r
- ot(" mov r1,r11,lsr #24 ;@ first byte\n");\r
- EaWrite(10,1,ea,0,0x0007); // store first byte\r
- ot(" add r10,r10,#2\n");\r
- ot(" mov r1,r11,lsr #16 ;@ second byte\n");\r
- EaWrite(10,1,ea,0,0x0007); // store second byte\r
- ot(" add r10,r10,#2\n");\r
- }\r
- ot(" mov r1,r11,lsr #8 ;@ first or third byte\n");\r
- EaWrite(10,1,ea,0,0x0007);\r
- ot(" add r10,r10,#2\n");\r
- ot(" and r1,r11,#0xff\n");\r
- EaWrite(10,1,ea,0,0x0007);\r
+ if(size==2) { // if operand is long\r
+ ot(" mov r1,r11,lsr #24 ;@ first byte\n");\r
+ EaWrite(10,1,ea,0,0x0007); // store first byte\r
+ ot(" add r10,r10,#2\n");\r
+ ot(" mov r1,r11,lsr #16 ;@ second byte\n");\r
+ EaWrite(10,1,ea,0,0x0007); // store second byte\r
+ ot(" add r10,r10,#2\n");\r
+ }\r
+ ot(" mov r1,r11,lsr #8 ;@ first or third byte\n");\r
+ EaWrite(10,1,ea,0,0x0007);\r
+ ot(" add r10,r10,#2\n");\r
+ ot(" and r1,r11,#0xff\n");\r
+ EaWrite(10,1,ea,0,0x0007);\r
} else { // mem to reg\r
EaCalc(10,0x0007,ea,size,1);\r
EaRead(10,11,ea,0,0x0007,1); // read first byte\r
} else { // mem to reg\r
EaCalc(10,0x0007,ea,size,1);\r
EaRead(10,11,ea,0,0x0007,1); // read first byte\r
- ot(" add r10,r10,#2\n");\r
- EaRead(10,1,ea,0,0x0007,1);\r
+ ot(" add r10,r10,#2\n");\r
+ EaRead(10,1,ea,0,0x0007,1);\r
- ot(" add r10,r10,#2\n");\r
- EaRead(10,1,ea,0,0x0007,1);\r
+ ot(" add r10,r10,#2\n");\r
+ EaRead(10,1,ea,0,0x0007,1);\r