lbz (1 byte)
lhz (2 bytes)
lwz (4 bytes)
ld (8 bytes)
lwz RESULT, ADDRESS, TEMP_VAL
Result = register containing the byte at the address
ADDRESS = register containing the address to read from
TEMP_VAL= we can use it as a temporary 'addic'
lis r3, 0xff r3 = 00 ff 00 00 (0xff0000)
addic r3, r3, 0x1234 r3 = 00 ff 12 34 (0xff1234)
lwz r4, r3, 0 r4 = the first 4 bytes at 0xff1234
lis r3, 0xff
lwz r4, r3, 0x1234 <- we use it as a temporary addic to save a line !!! but WARNING: on the next line r3 will be restored to 00 ff 00 00 while
using addic make it permanent !!!!
lis r3, 0x0110
lwz r4, r3, 0xd60c
lis r3, 0x0110
addic r3,r3, 0xd60c
lwz r4, r3, 0
stb (1 byte)
sth (2 bytes)
stw (4 bytes)
std (8 bytes)
stw VALUE, ADDRESS, TEMP_VAL
lis r3, 0x210 (0x2100000) || 02 10 00 00
li r4, 0x15
stw r4, r3, 0
lis r3, 0xFC (r3 = 00 FC 00 00)
li r4. 0x15
stw r4, r3, 0xA280 (0xFCA280)
Copyright © 2024, NextGenUpdate.
All Rights Reserved.