I'm going to look like a fool for asking this, I fear.
I have a code that stores one of two values into a gecko register pending an If codetype. However, I am having issues writing this value to another place. The CT4/CST2 (Gecko Register Functions / Save Register To) codes write to [XXXXXXXX], but I can find no codes which do the equivalent to XXXXXXXX, which would make life a lot easier. I suppose it is possible for me to use a second register to permanently store the place where I'd like to write to, but I was wondering if there was a more efficient means to write to this point.
Thanks for your help.
EDIT: There was a mistake elsewhere in my code, it seems, and I managed to patch it up. It turns out the codetypes DO write to XXXXXXXX. Does this mean that the codetype document is incorrect, or did I make an error reading it? Sorry for the fuss.
you could always set the value to 0 and have your gecko Register be added to the value, which is basically moving it :|
what are you trying to do?
because there is an option to store XXXXXXXX to gR
no he want's gR to XXXXXXXX
gR to [XXXXXXXX] or to XXXXXXXX? because you can't store anything to a value xwink
use this:
84UYZZZN XXXXXXXX:
8400 : writes the 8bits in grN ZZZ times+1 at [XXXXXXXX]
8401 : writes the 8bits in grN ZZZ times+1 at [XXXXXXXX+ba]
9401 : writes the 8bits in grN ZZZ times+1 at [XXXXXXXX+po]
8410 : writes the 16bits in grN ZZZ times+1 at [XXXXXXXX]
8411 : writes the 16bits in grN ZZZ times+1 at [XXXXXXXX+ba]
9411 : writes the 16bits in grN ZZZ times+1 at [XXXXXXXX+po]
8420 : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX]
8421 : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX+ba]
9421 : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX+po]
I think you should use 8420
Doesnt anybody read the codetypes? >_>
eehh... yeah, sorry. but why put an 04 in front?
but still, people shoud look at the codetypes before asking.
My initial concern was that there was no simple way to write grN to XXXXXXXX - thanks paprika for resolving this for me. However, I later discovered that the gecko register codetypes which SAY they write to [XXXXXXXX] ACTUALLY write to XXXXXXXX. Which is different, I thought.
[XXXXXXXX] is a address and XXXXXXXX is a value
QuoteSo [XXXXXXXX] means "the data stored at XXXXXXXX".
Does this not imply that:
Quote8420 : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX]
means:
Write grN ZZZ times+1 at the address stored at XXXXXXXX
?
Quote from: Almas on January 04, 2009, 08:36:24 PM
QuoteSo [XXXXXXXX] means "the data stored at XXXXXXXX".
Does this not imply that:
Quote8420 : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX]
means:
Write grN ZZZ times+1 at the address stored at XXXXXXXX
?
no
Well then, my point is that the codetype doesn't do that. It writes the Gecko Register to the address XXXXXXXX, rather than the value stored at the address XXXXXXXX, as the codetype document would suggest (and you have just agreed with me upon).
yeah, I'm sorry. it does write to the address, I didn't read it properly. my bad
84200000 80123456
that code will write the value at gR0 to 80123456
so if gR0 is 11111111, 80123456 will become 11111111
No, it doesn't. Which is what my editted point was - the description of it in the codetype document is incorrect, I believe.
Quote from: Almas on January 04, 2009, 08:36:24 PM
QuoteSo [XXXXXXXX] means "the data stored at XXXXXXXX".
Does this not imply that:
Quote8420 : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX]
means:
Write grN ZZZ times+1 at the address stored at XXXXXXXX
?
8420ZZZN XXXXXXXX : writes the 32bits in grN ZZZ times+1 at [XXXXXXXX]
--> so if you want to write the value of gr0 to 80102030
--> 84200000 80102030
the ZZZ would write it multiple times:
84200020 80102030 --> writes 80102030, 80102034, 80102038 - ZZZ+1 = 002+1 = 3 times!
I know what this code does, however, I am arguing that in the codetypes document it should be described as:
Quote8420 : writes the 32bits in grN ZZZ times+1 at XXXXXXXX
Because we are talking about storing it at the location XXXXXXX, not storing it at the address specified by the location XXXXXXXX.
you can't store a value at a value (http://i108.photobucket.com/albums/n31/Romaap/e49b77fb.jpg)
Eh, I guess I just interpret it in a different way to you, I can kinda understand where you're coming from. Either way my problem has been resolved. Thanks for the help.
That said I've started working on a couple of codes which require ASM, which I see giving me even more grief. Twice the freeze glitches, half the comprehension =).