This is from BWAK3N2 - (8065 multibank with 4 banks) I found these when looking for a different bug.
Code: Select all
8ce34: c3,01,98,f2,44 stw R44,[R0+f298]
..also...
8cdd8: a3,01,98,f2,34 ldw R34,[R0+f298]
8cddd: b3,01,a3,f2,46 ldb R46,[R0+f2a3]
8cd86: b3,01,96,f2,46 ldb R46,[R0+f296]
8cd8b: 9b,01,d6,f0,46 cmpb R46,[R0+f0d6]
using 8ce34 - if it's a signed offset, which the 80c196 handbook implies it is, does this then negate and overflow to become address [d68] ?
It can't be address [1f298] (i.e. with data bank) as that's ROM, unless it's a specialist chip ??
But addresses don't seem to match anything in the handbook
If it's 0xd68 why the hell isn't the instruction STW R44, [R0+d68] ???
This seems a truly WEIRD way to do it.... or does the overflow trigger something ??
It doesn't look like this is incorrect disassembly (or bank order) as there are no invalid opcodes anywhere in any bank.
(NB. for disassembly I've assumed RAM/KAM exists in a virtual bank 0 - 0x1fff, with the CPU registers, and not therefore in bank 1.
This is so addresses below 0x2000 don't ever appear with any bank prefix number.
It's not really clear to me if addresses below 0x2000 get mapped to a bank at all )
But then just to mess up that logic, there is this opcode within A9L, which implies the long offset is NOT signed
Code: Select all
84b2: a3,01,00,0d,14 ldw R14,[R0+d00] R14 = [d00]; # Console status
84b7: 99,2a,15 cmpb R15,2a
84ba: d7,2c jne 84e8 if (R15 != 2a) goto 84e8; # console present?
84bc: 3c,24,1b jb B4,R24,84da if (Console_flag = 0) {
84bf: 38,0a,18 jb B0,Ra,84da if (HSO_OVF = 0) {
84c2: 47,01,0e,20,06,80 ad3w R80,R6,[R0+200e] HSO_time = IO_Timer + [200e]; # add 5D to current IOTime
84c8: d7,02 jne 84cc if (HSO_time = 0) {
84ca: 07,80 incw R80 HSO_time++; } # increment past zero
84cc: c3,01,1a,c1,80 stw R80,[R0+c11a] [c11a] = HSO_time; # to console location ? <<<<<<<<<<<<<<
84d1: a0,80,0e ldw Re,R80 HSI_Time = HSO_time;
84d4: b1,0f,0d ldb Rd,f HSO_Cmd = f; # request interrupt (in 5D IOtimes)
84d7: ef,2c,4b call d006 d006(); } } # Console call
84da: a3,01,80,0c,14 ldw R14,[R0+c80] R14 = [c80]; # flags for data pointers
the Ford handbook specifically mentions c11a as a time field for cal console................which implies that a long index is UNSIGNED
Any suggestions ??
Thanks,