How would you do this?
My pointer address is 809E1278
stwu r1,-80(r1)
stmw r14,8(r1)
lis r14,0x809E <--- load into address 809E1278
ori r14,r14,0x1278
-------------------- <--- what's the instruction for "loading into the "(value) new pointer address)?
addi rX,rX,0x66C <--- add 66C bytes to the new address
lis r15,0x0000 <--- write 0000000C
ori r15,r15,0x000C
stw r15,0(rX) <---- store
lwz r15,0(rX)
lmw r14,8(r1)
addi r1,r1,80
Thanks for any help
Your coding is a bit rough. I just re-did the entire thing:
stwu r1,-80(r1)
stmw r14,8(r1)
lis r14,0x809E
lwz r14, 0x1278(r14) //loads the pointer into r14
lis r15, 0x8180
cmpw r14, r15
bgt- 0x18 //checks to see if po is under 0x81800000
lis r15, 0x8000
cmpw r14, r15
blt- 0xC //checks to see if po is above 0x80000000
li r12, 0xC
stw r12, 0x66C(r14)
lmw r14,8(r1)
addi r1,r1,80
Edit: I branched to the lmw instruction. I'm 99% sure that's where to branch to, but I don't know the circumstances. :p
my pointer is over 93XXXXXX.
and no it freez because your're not loading into the value, just into the address.
Careful, Nutmeg.
You actually want bge-, not bgt-. What if the value loaded was 81800000? That would be a very rare bug, but when it hit the game would crash.
The assembler uses # for comments, not //.
You are not loading the po. The po is an actual value in the code handler. You are just loading some pointer.
You should use branch labels instead of calculating destinations by hand.
Putting it all together, that line should look more like this. bge- _END # makes sure pointer is less than 81800000
You are correct that the _END: label goes after the stmw. Note that I prefix labels with _; this is unnecessary, but when you do advanced assembler it helps separate branch labels from other variables.
Passt schon wieder man. Schreib hier ne Antwort auf meine frage oder mach einen neuen Thread für Nutmegs Problem auf.Wird ja immer schlimmer.
-closed-