PSP Elites
Would you like to react to this message? Create an account in a few clicks or log in to continue.


PsP hacking and gaming site
 
HomePortalLatest imagesSearchRegisterLog in

 

 How a Subroutine Works

Go down 
AuthorMessage
TheEliteOne

TheEliteOne


Posts : 72
Join date : 2009-10-25
Age : 31
Location : Earth

How a Subroutine Works Empty
PostSubject: How a Subroutine Works   How a Subroutine Works Icon_minitimeWed Oct 28, 2009 9:06 pm

MIPS Used:
Lui [Load Upper Immedaite]
Ori [Or Immedaite]
Sw [Store Word]
Jr Ra [Jump Register Return Address]

Registers Used:
t0 [Temperary 0]
t1 [Temperary 1]
Ra [Return Address]

Template and Explination:

Lui t0 $Loads the first half of the real address and stores it in the regitser t0, if the address is negitive (Second half is 7F80 or more) then add one here
Lui t1 $Loads the first half of the hex value and stores it into t1
Ori t1 t1 $Adds the second half of the hex value into the first t1 and stores it into the second t1
Sw t1 $Stores the second half of the real address into t1, the (t0) means that the first half is loeded from that register
Jr Ra jumps the register to the line that the hooks contains
Back to top Go down
 
How a Subroutine Works
Back to top 
Page 1 of 1
 Similar topics
-
» How To Write A Code Into A Subroutine
» Hot to write a DMA code into a subroutine
» *NOOB PROOF* Subroutine Guide by TheEliteOne aka Crioshinx aka Jinzo X
» *NOOB PROOF* Advanced Subroutine Guide by TheEliteOne aka Crioshinx aka Jinzo X

Permissions in this forum:You cannot reply to topics in this forum
PSP Elites :: PSP Section :: PSP Guides :: MIPS/PS2DIS Guides-
Jump to: