Need help with 'leti' OPcodes. It says to use it for inserting values for registers but I'm not sure I'm really looking at when it comes to a finished script: Especially when I see a long string of them. Other than that I think I'm mostly set ^^
They're just like x86 assembler commands for setting registers. Ex. mov eax, edx (Set eax register to the value in edx) or mov eax, 12345678h (set register to 12345678 in hex)
The two equivalents in PSO assembly would be like let R1, R2 (set register 1 to the value in register 2) or leti R1, 12345678 (set register 1 to hex value 12345678h)
In PSO assembly, though, when copying registers, we use let instead of leti. leti is only used for setting integer values. (Hence the "i" at the end.)
When you see a long string of them, it's usually setting a number of registers in sequential order and then calling a command with the base register.
Example, when item creates happen, usually 12 registers are leti (ex: leti R61-R72) or set in succession then item_create2 is called with the initial register. (R61)
Each register holds a byte of the new item to create. And item_create2 reads all 12 then makes the call to the server to create the item.
This is just one example.