Subject: Re: [stella] My code is broked! From: Jason Rein <jjrein@xxxxxxxxxxxxx> Date: Tue, 7 Oct 2003 20:07:10 -0700 |
It could just be that I still don't fully understand indirect addressing... But this should work?
?
I know this loop does not replace the first byte in either location, but it should "swap" the others... However
my results are not very good :-)?What am I doing wrong?
?
?
PlayerHand = $B0 ; -> $B6
Player3 = $A0 ; -> $A6
?
TradeHands
??? ?LDY #7
??? ?LDA #PlayerHand
??? ?STA tmpVar3
??? ?LDA #Player3
??? ?STA tmpVar4
TradeLoop
??? ?LDA (tmpVar3),y
??? ?STA tmpVar2
??? ?LDA (tmpVar4),y
?????STA (tmpVar3),y
?????LDA tmpVar2
??? ?STA (tmpVar4),y
??? ?DEY
??? ?BNE TradeLoop
??? ?RTS
?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[stella] My code is broked!, Chris Larkin | Thread | Re: [stella] My code is broked!, Chris Larkin |
[stella] My code is broked!, Chris Larkin | Date | Re: [stella] My code is broked!, Christopher Tumber |
Month |