| View previous topic :: View next topic |
| Author |
Message |
Ladon0081
Joined: 03 Mar 2005 Posts: 1
|
Posted: Thu Mar 03, 2005 3:14 pm Post subject: Quick question about syscall |
|
|
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? |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Mar 03, 2005 5:40 pm Post subject: |
|
|
EI = Enable Interrupts. That should be self-explanatory.
It is a COP0 instruction and surely is documented. But if COP0 instructions are documented in a different section of the manual that would explain why you didn't see them. |
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Thu Mar 03, 2005 5:59 pm Post subject: |
|
|
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:
| Code: | | 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. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Mar 03, 2005 6:14 pm Post subject: |
|
|
| pixel wrote: | | gorim ? you seem to be quite missing the points of questions from people lately :) |
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. :)
| Ladon0081 wrote: |
Also, I've seen the instruction ei in code but have not seen it documented. Is this some kinda pseudoinstruction?
|
Now, if you think I am still missing a point, please by all means point it out to me more clearly ;) |
|
| Back to top |
|
 |
pixel
Joined: 30 Jan 2004 Posts: 791
|
Posted: Thu Mar 03, 2005 7:48 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|