-
Notifications
You must be signed in to change notification settings - Fork 91
Description
in the exerciser code we can see:
`00000DA2 881 * EA = x.L - BYTE only
00000DA2 207C 000F0100 882 move.l #$000F0100 , a0 * point to memory to address 0x100
00000DA8 10FC 0001 883 move.b #$01 , (a0)+ * populate test data
00000DAC 10FC 00FC 884 move.b #$FC , (a0)+ * populate test data
00000DB0 10FC 0080 885 move.b #$80 , (a0)+ * populate test data
00000DB4 0879 0000 000F0100 886 bchg.b #0 , $000F0100
00000DBC 6700 0248 887 beq BCHG_FAIL * branch if Z set
00000DC0 0879 0001 000F0101 888 bchg.b #1 , $000F0101 *
00000DC8 6600 023C 889 bne BCHG_FAIL * branch if Z clear
00000DCC 0879 0007 000F0102 890 bchg.b #7 , $000F0102 *
00000DD4 6700 0230 891 beq BCHG_FAIL * branch if Z set
00000DD8 207C 00000100 892 move.l #$00000100 , a0 * point to memory to address 0x100
00000DDE 0C18 0001 893 cmpi.b #$01 , (a0)+
00000DE2 6600 0222 894 bne BCHG_FAIL * branch if Z clear
00000DE6 0C18 00FC 895 cmpi.b #$FC , (a0)+
00000DEA 6600 021A 896 bne BCHG_FAIL * branch if Z clear
00000DEE 0C18 0080 897 cmpi.b #$80 , (a0)+
00000DF2 6600 0212 898 bne BCHG_FAIL * branch if Z clear
`
at line 883, mem is set at 0x01, at line 886, bit 0 is changed, so mem is now 0x00. At line 893 we test against 0x01 erroneously ...
I made the assumption that mem is only 16 bits addresses ...
We also see:
`000010DE 1146 * EA = n(An,D.W) - BYTE only
000010DE 207C 00000100 1147 move.l #$00000100 , a0 * point to memory to address
000010E4 227C 00000000 1148 move.l #$00000000 , a1 * point to memory to address
000010EA 247C 00000001 1149 move.l #$00000001 , a2 * point to memory to address
000010F0 7000 1150 move.l #$00000000 , d0 * point to memory to address
000010F2 7201 1151 move.l #$00000001 , d1 * point to memory to address
000010F4 10FC 00FF 1152 move.b #$FF , (a0)+ * populate test data
000010F8 10FC 00FF 1153 move.b #$FF , (a0)+ * populate test data
000010FC 207C 00000100 1154 move.l #$00000100 , a0 * point to memory to address
00001102 08B0 0000 0000 1155 bclr.b #0 , 0(a0,d0.w)
00001108 67FE 1156 beq * * branch if Z set
0000110A 08B0 0001 1000 1157 bclr.b #1 , 0(a0,d1.w) *
00001110 67FE 1158 beq * * branch if Z set
00001112 08B0 0002 1001 1159 bclr.b #2 , 1(a0,d1.w) *
00001118 66FE 1160 bne * * branch if Z clear `
mem is only initialised for addresses 0x100 & 0x101 at lines 1147 to 1153. And at line 1159 the memtested is at address 0x102 ???