Just trying to work out how you compare a value in a register with an actual value
r0 : 00000DBE
How would I compare r0 with DBE?
cmpwi r0,DBE
I can then use bne to jump past the next few lines if it's not equal? whats different with bne- and bne+ ?
also is each line the value of 4 in hex? I have some ASM guides but they explain it as if you understand it already :(
ta
I think i sussed it:
cmpwi r0,3518
bne- 0x8
li r6,15
stbx r6,r7,r0
http://hpcf.nersc.gov/vendor_docs/ibm/asm/branch_mnem.htm (http://hpcf.nersc.gov/vendor_docs/ibm/asm/branch_mnem.htm)
+ Predict branch to be taken
- Predict branch not to be taken (fall through)
Thanks Link
Is there a tutorial anywhere about a button activator code via asm?
When my C2 code runs i want to load the value at an address (8014E110) into a register and compare that to certain values and do things accordingly
ta
Black_Wolf made a tutorial for an ASM moonjump (http://wiird.l0nk.org/forum/index.php/topic,1454.0.html) code with button activator.
but what you have to do is just:
lis rA,0x8014
ori rA,rA,0xE110
lwz rB,(rA)
cmpi rB,value
Top banana
thanks Ro to the map
hes not romap hes rommap
romaap i mean XD
for example (with random registers and random values)
lis r5,0x5222
lwz r4,0x1222(r5)
#r4 now holds the value at 52221222 (random location, but just an example)
cmpwi r4,0x5555
bne skip
#put the code you wanna skip over here, for example:
addi r4,0x2
skip:
#continues here
addi r4,0x5