--- np2/i286a/i286a_8x.s 2003/12/16 21:59:07 1.1 +++ np2/i286a/i286a_8x.s 2003/12/19 12:29:04 1.7 @@ -1,23 +1,21 @@ INCLUDE i286a.inc + INCLUDE i286aea.inc INCLUDE i286aalu.inc - IMPORT i286core - IMPORT _szpcflag8 IMPORT i286a_ea - IMPORT i286a_lea - IMPORT i286_memoryread - IMPORT i286_memoryread_w - IMPORT i286_memorywrite - IMPORT i286_memorywrite_w - - EXPORT i286a_80 - EXPORT i286a_81 - EXPORT i286a_83 + IMPORT i286a_memoryread + IMPORT i286a_memoryread_w + IMPORT i286a_memorywrite + IMPORT i286a_memorywrite_w + + EXPORT i286aop80 + EXPORT i286aop81 + EXPORT i286aop83 AREA .text, CODE, READONLY -i286a_80 GETPC8 +i286aop80 GETPC8 and r6, r0, #(7 << 3) cmp r0, #&c0 bcc ope80m @@ -35,10 +33,10 @@ ope80m CPUWORK #7 GETPC8 adr r1, op8x_reg8 ldr pc, [r1, r6 lsr #1] -ope80e mov r4, r0 +ope80e mov r5, r0 + bl i286a_memoryread + mov r4, r0 GETPC8 - mov r5, r0 - bl i286_memoryread adr r1, op8x_ext8 ldr pc, [r1, r6 lsr #1] @@ -92,46 +90,46 @@ cmp_r8_i ldrb r6, [r5] SUB8 r6, r0 mov pc, r11 -add_r8_e ADD8 r0, r4 +add_r8_e ADD8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -or_r8_e OR8 r0, r4 + b i286a_memorywrite +or_r8_e OR8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -adc_r8_e ADC8 r0, r4 + b i286a_memorywrite +adc_r8_e ADC8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -sbb_r8_e SBB8 r0, r4 + b i286a_memorywrite +sbb_r8_e SBB8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -and_r8_e AND8 r0, r4 + b i286a_memorywrite +and_r8_e AND8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -sub_r8_e SUB8 r0, r4 + b i286a_memorywrite +sub_r8_e SUB8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -xor_r8_e XOR8 r0, r4 + b i286a_memorywrite +xor_r8_e XOR8 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite -cmp_r8_e SUB8 r0, r4 + b i286a_memorywrite +cmp_r8_e SUB8 r4, r0 mov pc, r11 ; ---- -i286a_81 GETPC8 +i286aop81 GETPC8 and r6, r0, #(7 << 3) cmp r0, #&c0 bcc ope81m CPUWORK #3 - R8SRC r0, r5 + R16SRC r0, r5 add r5, r5, #CPU_REG GETPC16 adr r1, op8x_reg16 @@ -146,19 +144,19 @@ ope81m CPUWORK #7 GETPC16 adr r1, op8x_reg16 ldr pc, [r1, r6 lsr #1] -ope81e mov r4, r0 +ope81e mov r5, r0 + bl i286a_memoryread_w + mov r4, r0 GETPC16 - mov r5, r0 - bl i286_memoryread_w adr r1, op8x_ext16 ldr pc, [r1, r6 lsr #1] -i286a_83 GETPC8 +i286aop83 GETPC8 and r6, r0, #(7 << 3) cmp r0, #&c0 bcc ope83m CPUWORK #3 - R8SRC r0, r5 + R16SRC r0, r5 add r5, r5, #CPU_REG GETPC8 tst r0, #(1 << 7) @@ -177,12 +175,12 @@ ope83m CPUWORK #7 orrne r0, r0, #(&ff << 8) adr r1, op8x_reg16 ldr pc, [r1, r6 lsr #1] -ope83e mov r4, r0 +ope83e mov r5, r0 + bl i286a_memoryread_w + mov r4, r0 GETPC8 - mov r5, r0 tst r0, #(1 << 7) - orrne r5, r5, #(&ff << 8) - bl i286_memoryread_w + orrne r0, r0, #(&ff << 8) adr r1, op8x_ext16 ldr pc, [r1, r6 lsr #1] @@ -236,35 +234,35 @@ cmp_r16_i ldrh r6, [r5] SUB16 r6, r0 mov pc, r11 -add_r16_e ADD16 r0, r4 +add_r16_e ADD16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -or_r16_e OR16 r0, r4 + b i286a_memorywrite_w +or_r16_e OR16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -adc_r16_e ADC16 r0, r4 + b i286a_memorywrite_w +adc_r16_e ADC16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -sbb_r16_e SBB16 r0, r4 + b i286a_memorywrite_w +sbb_r16_e SBB16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -and_r16_e AND16 r0, r4 + b i286a_memorywrite_w +and_r16_e AND16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -sub_r16_e SUB16 r0, r4 + b i286a_memorywrite_w +sub_r16_e SUB16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -xor_r16_e XOR16 r0, r4 + b i286a_memorywrite_w +xor_r16_e XOR16 r4, r0 mov r0, r5 mov lr, r11 - b i286_memorywrite_w -cmp_r16_e SUB16 r0, r4 + b i286a_memorywrite_w +cmp_r16_e SUB16 r4, r0 mov pc, r11 END