def execCallReturn(self, emu, value, ccinfo=None): sp = emu.getRegister(REG_SP) pc = struct.unpack('>H', emu.readMemory(sp, 2))[0] sp += 2 # For the saved pc sp += (2 * argc) # Cleanup saved args emu.setRegister(REG_SP, sp) emu.setRegister(REG_R0, value) emu.setProgramCounter(pc)
def getCallArgs(self, emu, count): return emu.getRegister( 0xf ) # r0-r3 are used to hand in parameters. additional ph8s are stored and pointed to by r0
def getCallArgs(self, emu, count): return emu.getRegister(0xf) # r0-r3 are used to hand in parameters. additional ph8s are stored and pointed to by r0