News:

11 March 2016 - Forum Rules

Main Menu

Strange 68000 effective address

Started by tryphon, August 22, 2013, 10:20:48 AM

Previous topic - Next topic

tryphon

Hello,

I'm not much used to 68000 assembler,and here's an instruction I can't figure out :

At address $B6A2, my disassembler shows :

MOVE.b *+$B654(PC, D2.w), D2

Could someone explain me where it reads the byte to put in D2 ?
When I traced the code, I had D2 = 0, PC = $B6A2, and D2 got the value $06, which is located at $B654. But I don't understand why, neither can I predict what would happen for different values of D2.

Ti_

It's works like:
lea data,a0
lea (a0,d2.w),d2
....
.....

data:
dc.b 0,1,2,3,4,5

adress = a0+d2.



move.b table(pc,d2.w),d2
....
....
table
dc.b $11,$56,$89,$30

if d2=0, new d2 is $11
if d2=1, new d2 is $56


In hex value of 'table' in command itself from +127/-128.  It's applies to PC like beq's, bcc's e.t.c.

tryphon