Kodewerx https://www.kodewerx.org/forum/ |
|
Adding values to an address with AR for DS. https://www.kodewerx.org/forum/viewtopic.php?f=17&t=4291 |
Page 1 of 1 |
Author: | i.lost.my.face [ Wed Sep 19, 2007 6:30 pm ] |
Post subject: | Adding values to an address with AR for DS. |
I'm attempting to write an AR DS code that will add the value of 1 to an address whenever I press R+Right button. I have the code for the joker already, but I can't find any AR code that will add values. This is what I have so far: 94000130 FEEF0000 (R+Right) 3214FAD0 000000A5 (Only execute if A5 is greater than the value at 0214FAD0) NEEDED (Add 1 to the value at 0214FAD0) D0000000 00000000 (END) Are there any AR codes that will add or subtract a value to an address, and if so what are they? |
Author: | lemmayoshi [ Wed Sep 19, 2007 7:52 pm ] |
Post subject: | Re: Adding values to an address with AR for DS. |
d9000000 XXXXXXXX <- Load the value at this address d4000000 YYYYYYYY <- Add this to it d6000000 XXXXXXXX <- Write the value back to the Address This should be in Dial 911 - Handheld Help, so I'll move it there. So, in your case: Code: 94000130 FEEF0000 (R+Right)
3214FAD0 000000A5 (Only execute if A5 is greater than the value at 0214FAD0) d9000000 0214FAD0 < d4000000 00000001 < Add 1 to 0214FAD0 d6000000 0214FAD0 < D2000000 00000000 (END) (change D0000000 00000000 to D2000000 00000000) |
Author: | i.lost.my.face [ Fri Sep 21, 2007 5:19 pm ] |
Post subject: | Re: Adding values to an address with AR for DS. |
Excellent! Thank you very much; I appreciate your help. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |