![]() |
| |
Thread Tools Display Modes |
|
PS2 Hacking:Saving and loading instructions tutorial
Saving and loading instructions tutorial
-------------------------------------------------------------------------------- Written by uni-terror *Updated with Doubleword instructions and Immediates* *Updated with Quadword instructions* - blu3 Saving and Loading instructions guide by uni-terror It's very useful to know these. All of them load or save data data from or to the offset specified. If it's a loading instruction, they load the data stored at the offset into the first register of the instruction. If it's saving instruction, they take the first register and save it's data at the offset. These are very useful if your making your own subroutines and you need to save things across calls, or in general to understand what exactly the function is doing and why. Here's a somewhat complete list. Ok just to clarify things on data sizes: Word = 32 bits of data = "XXXXXXXX" = 8 digits Halfword = 16 bits of data = "XXXX" = 4 digits Byte = 8 bits of data = "XX" = 2 digits DoubleWord = 64 bits of data = "XXXXXXXX, XXXXXXXX" = 16 digits Quadword = 128 bits of data = "XXXXXXXX, XXXXXXXX, XXXXXXXX, XXXXXXXX" = 32 digits unalligned data ulw unalligned load word ulh unaligned load halfword ulhu unaligned load halfword unsigned usw unaligned store word ush unaligned store halfword lwl load word left lwr load word right swl store word left swr store word right aligned data sw save word sh save halfword sb save byte lw load word lh load halfword lhu load halfword unsigned lb load byte lbu load byte unsigned doubleword instructions ld load doubleword sd save doubleword immediate instructions li load immediate (loads an immediate value given into register) lui load upper immediate (loads an immediate value 4 digits to the left, example "XXXX0000") quadword instructions lq load quadword sq store quadword I think that's all of them for standard registers, if anyone knows one I missed please post. I'll probably write up a little floating point instruction tutorial soon because they are far too often overlooked when they play a large role in understanding functions. Credit:uni-terror
__________________
![]() Socom 3/CA Clan [E]LeMeNt R.I.P. Dec '05-Jan '07 [img]<a href="http://www.us.playstation.com/PSN/Users/whitey111"><img src="http://pid.us.playstation.com/user/whitey111.jpg" width="235" height="149" border="0" /></a>[/img] |
|||||||
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|












Linear Mode
