C0 as Pointer

Started by Deathwolf, April 25, 2011, 11:27:27 PM

Previous topic - Next topic

Deathwolf

Is it possible to use C0 as pointer?

noramly C0 needs a stw for the address but my address is moving around.
maybe this is the solution?

Pointer address:809E1278

stwu r1,-80(r1) 
stmw r14,8(r1)
lis r14,0x809E
ori r14,r14,0x1278
addi r14,r14,0x66C
lis r15,0x0000
ori r15,r15,0x000C
stw r15,0(r14)
lwz r15,0(r14)
lmw r14,8(r1)
addi r1,r1,80


809E1278 + 066C
write 0000000C to new address.

C0000000 00000006
9421FFB0 BDC10008
3DC0809E 61CE1278
39CE066C 3DE00000
61EF000C 91EE0000
81EE0000 B9C10008
38210050 4E800020


for some reason it freez but why? what's wrong with this?

thanks for any help!



lolz

Nutmeg

stwu r1,-80(r1)  
stmw r14,8(r1)
lis r14,0x809E
ori r14,r14,0x1278
addi r14,r14,0x66C
lis r15,0x0000
ori r15,r15,0x000C
stw r15,0(r14)
lwz r15,0(r14)
lmw r14,8(r1)
addi r1,r1,80
blr

EDIT:  It's in your code, but not in the ASM.
I'm inbetween your legs... that's not awkward.

Deathwolf

kk thanks but I mant something like this:

load into address 809E1278
load into value of the address (809E1278) example 80AXXXXXX.
add 66C bytes to the value.
write and store.
lolz