Kodewerx
https://www.kodewerx.org/forum/

AR DS code types question
https://www.kodewerx.org/forum/viewtopic.php?f=2&t=6933
Page 1 of 1

Author:  dragonboy269 [ Sun Jul 26, 2009 3:13 pm ]
Post subject:  AR DS code types question

I need help making a simple code using the AR DS code types
I pretty much mastered ASM, but I don't know anything about the regular code types except the writes >_>

I made this code in ASM, but I wanna make it without using ASM as well, kinda for practice XD
so, how would i make a code that does the following:

1. load an address
2. load the value stored at that address
3. compare the value to another value
4. If greater than, subtract a certain value from the original value, but continue the code
5. add a certain value to the original value (even if it was greater than)
6. store the value back into the original address

(and no, it's not that code A_Random_Person, but yes it seems similar XD)

Author:  kenobi [ Thu Sep 17, 2009 10:18 am ]
Post subject:  Re: AR DS code types question

Some questions before answering (the best might be that you post your asm routine, so there won't be any confusion) :

- "1. load an address" -> what you you mean *precisely*.
It could be D3000000 XXXXXXXX (the data you will load in 2. is stored at [0xXXXXXXXX], or D3000000 XXXXXXXX B0000000 00000000 (at [0xXXXXXXXX] you have another address, 0xYYYYYYYY, and the data you will load in 2. is stored at [0xYYYYYYYY])...

- in 2., what size is the value ? (8b, 16b, 32bits ?).

- 3., 4., 5, : the other "values" you're talking about, are they fixed values (like 0x00001000) ? Or you don't know them (they are stored in another place in the ram) ?

If you "don't know" the value for 3., 4. or 5., you can't do it with normal codes, ASM hacks are the only way.
Normal ARDS codes can not be used to compare, or to do math operations, on 2 "unknown" values.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/