OK, I new to ps2 programming and I am having some difficulty with syscall. What does syscall with v1 == 0x3C ( aka RFU060 ) do exactly, and what does it return? I notice all code loads sp with v0 after the call.
Also, I've seen the instruction ei in code but have not seen it documented. Is this some kinda pseudoinstruction?
Quick question about syscall
gorim ? you seem to be quite missing the points of questions from people lately :)
Anyway, I've aliased RFU060 to SetupThread lately. It should only be used in the crt0 of the software (that is, the small startup code that runs before your software)
The actual prototype is:
So, this syscall should be to set up your main thread, and, indeed, it does return the stack pointer. It shouldn't be used outside of crt0 anyway I think.
Anyway, I've aliased RFU060 to SetupThread lately. It should only be used in the crt0 of the software (that is, the small startup code that runs before your software)
The actual prototype is:
Code: Select all
void * SetupThread(void * gp, void * stack, s32 stack_size, void * args, void * root_func);
So, this syscall should be to set up your main thread, and, indeed, it does return the stack pointer. It shouldn't be used outside of crt0 anyway I think.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Really ? I answered the one part I had an immediate answer to. Did you not see it ? Here let me repeat it for you, and then perhaps you should go take another look to make sure I am not lying to you. :)pixel wrote:gorim ? you seem to be quite missing the points of questions from people lately :)
Now, if you think I am still missing a point, please by all means point it out to me more clearly ;)Ladon0081 wrote: Also, I've seen the instruction ei in code but have not seen it documented. Is this some kinda pseudoinstruction?
Aah, sorry, it's me who just didn't read his question completely ^_^
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.