li r3, 0 <--this will not work.
li %r3, 0 <--this will work.
bl (address to bl to)
bl 0x248FA4
bdnz -0x14
beq 0x14
bne 0x2C
li r3, 0 <--this will not work.
li %r3, 0 <--this will work.
bl (address to bl to)
bl 0x248FA4
bdnz -0x14
beq 0x14
bne 0x2C
func:
mflr %r0 // set up the stack frame
stw %r0, 8(r1)
stwu %r1, -16(r1)
addi %r3, %r3, 3 // add 3 to the argument and return it
addi %r1, %r1, 16 // destroy the stack frame
lwz %r0, 8(r1)
mtlr %r0
blr // return
.globl _main
_main:
mflr %r0 // set up the stack frame
stw %r0, 8(r1)
stwu %r1, -16(r1)
lis %r3, hi16(847318093) // load big number into r3
ori %r3, %r3, lo16(847318092)
bl func // call stuff
addi %r1, %r1, 16 // destroy the stack frame
lwz %r0, 8(r1)
mtlr %r0
blr // return
func:
mflr %r0 // set up the stack frame
stw %r0, 8(r1)
stwu %r1, -16(r1)
addi %r3, %r3, 3 // add 3 to the argument and return it
addi %r1, %r1, 16 // destroy the stack frame
lwz %r0, 8(r1)
mtlr %r0
blr // return
.globl _main
_main:
mflr %r0 // set up the stack frame
stw %r0, 8(r1)
stwu %r1, -16(r1)
lis %r3, hi16(847318093) // load big number into r3
ori %r3, %r3, lo16(847318092)
bl func // call stuff
addi %r1, %r1, 16 // destroy the stack frame
lwz %r0, 8(r1)
mtlr %r0
blr // return
Copyright © 2024, NextGenUpdate.
All Rights Reserved.