is it possible "stw grN,d(rA)"?

Started by bigbank, November 30, 2008, 01:45:39 AM

Previous topic - Next topic

bigbank

It means that load value to grN(Gecko Register) than write to Broadway's Register directly.

do such a thing below:

li gr0,999
stw gr0,24(r0)
blr


I don't know the principle of hardware,just ask... :confused:

brkirch

From the WiiRD / Gecko OS Code Type Document:
Quote from: kenobigrN : "Gecko Register N". It's not a real register, like r0 or r1.
      It's a 32-bits value, for which the Gecko has reserved a place
      in memory. N can range from 0x0 to 0xF.
      You can store/load anything in it, however be careful that other
      codes could overwrite your value. Don't expect it to be the same
      each time the code handler is executed. If you want to store a value
      that must not change, try to use a "real" address ouside of the code handler,
      or use the 46/4E code types along with a goto code type.
      Note that grN are stored before the gecko/code handler. That mean they
      should always be accessible at a static address : 0x80001804.
      [0x80001804]=gr0, [0x80001808]=gr1,...,[0x80001840]=grF. That way
      you can access them directly, when inserting an asm routine for exemple.
So no, you can't use Gecko registers in ASM instructions.

paprika_killer

by reading that I persume you can just store to the actual adress grN is?
[SIGPIC][/SIGPIC]

Romaap

yeah, you can do that but the GeckoRegisters are different in each geckoOS version.(atleast, thats what i've read.)