Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Thu Mar 28, 2024 11:15 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Sep 19, 2007 6:30 pm 
Offline
Kommunist
Kommunist

Joined: Sun Aug 26, 2007 3:49 pm
Posts: 5
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?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 19, 2007 7:52 pm 
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)


Top
  
Reply with quote  
PostPosted: Fri Sep 21, 2007 5:19 pm 
Offline
Kommunist
Kommunist

Joined: Sun Aug 26, 2007 3:49 pm
Posts: 5
Excellent! Thank you very much; I appreciate your help.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 94 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group