I've run across some 68000 assembly that I'm not familiar with and was hoping someone could give me some info.
I'll post the assembly trace first, then I'll ask my question below...
00:BB88 EE 48 LSR.W #7,D0 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00001000 D1=00000006 D2=00000020 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BB8A 32 00 MOVE.w D0,D1 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000006 D2=00000020 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BB8C 34 2B MOVE.w $0054(A3),D2 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000020 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BB90 E5 42 ASL.W #2,D2 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BB92 20 7C MOVE.l #$00010E64,A0 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BB98 C1 F0 MULS.W $00(A0,D2),D0 A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BB9C C3 F0 MULS.W $02(A0,D2),D1 A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000000 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BBA0 D1 6B ADD.W D0,$0028(A3) A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000000 D1=00001900 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BBA4 D3 6B ADD.W D1,$002A(A3) A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000000 D1=00001900 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
=================================
Here's my question: At the very bottom of the trace (00:BBA4), the value I'm interested in is in register D1 (1900). I can see that at 00:BB9C, they are multiplying the value at ROM address $00010E66 (which is 00C8) by D1 (which is 0020): C8 x 20 = 1900. No problems so far. For the GG code I want to make, I can't modify the "C8" value because it affects other things, so I want to find out where the "20" value is coming from (in D1). I traced the 20 in D1 back to 00:BB8A 32 00 MOVE.w D0,D1 where the 0020 in register D0 is moved to D1. Now all I have to do is figure out where the 20 in D0 is coming from. This is where I'm having problems. I don't know what this line means:
00:BB88 EE 48 LSR.W #7,D0
This is what seems to load the "20" into D0, but I have no idea how. Can anyone help with this? Do I need to include more of the trace?
Thanks for any help.
I'll post the assembly trace first, then I'll ask my question below...
00:BB88 EE 48 LSR.W #7,D0 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00001000 D1=00000006 D2=00000020 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BB8A 32 00 MOVE.w D0,D1 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000006 D2=00000020 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BB8C 34 2B MOVE.w $0054(A3),D2 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000020 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BB90 E5 42 ASL.W #2,D2 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BB92 20 7C MOVE.l #$00010E64,A0 A0=000113C0 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BB98 C1 F0 MULS.W $00(A0,D2),D0 A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000020 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BB9C C3 F0 MULS.W $02(A0,D2),D1 A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000000 D1=00000020 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
00:BBA0 D1 6B ADD.W D0,$0028(A3) A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000000 D1=00001900 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnzvc
00:BBA4 D3 6B ADD.W D1,$002A(A3) A0=00010E64 A1=FFFFCA32 A2=FFFFC6CE A3=FFFFB04A A4=FFFFB88A A5=FFFFD404 A6=00000000 A7=FFFFFFF2 D0=00000000 D1=00001900 D2=00000000 D3=00000020 D4=00000000 D5=0000FF00 D6=00000000 D7=00000001 xnZvc
=================================
Here's my question: At the very bottom of the trace (00:BBA4), the value I'm interested in is in register D1 (1900). I can see that at 00:BB9C, they are multiplying the value at ROM address $00010E66 (which is 00C8) by D1 (which is 0020): C8 x 20 = 1900. No problems so far. For the GG code I want to make, I can't modify the "C8" value because it affects other things, so I want to find out where the "20" value is coming from (in D1). I traced the 20 in D1 back to 00:BB8A 32 00 MOVE.w D0,D1 where the 0020 in register D0 is moved to D1. Now all I have to do is figure out where the 20 in D0 is coming from. This is where I'm having problems. I don't know what this line means:
00:BB88 EE 48 LSR.W #7,D0
This is what seems to load the "20" into D0, but I have no idea how. Can anyone help with this? Do I need to include more of the trace?
Thanks for any help.
Comment