forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick question about syscall

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Ladon0081



Joined: 03 Mar 2005
Posts: 1

PostPosted: Thu Mar 03, 2005 3:14 pm    Post subject: Quick question about syscall Reply with quote

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
View user's profile Send private message Send e-mail
Guest






PostPosted: Thu Mar 03, 2005 5:40 pm    Post subject: Reply with quote

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

PostPosted: Thu Mar 03, 2005 5:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Thu Mar 03, 2005 6:14 pm    Post subject: Reply with quote

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

PostPosted: Thu Mar 03, 2005 7:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group