Difference between revisions of "Template:Syscall"

From WikiPrizm
Jump to navigationJump to search
m (→‎Synopsis: Added new lines)
Line 1: Line 1:
<noinclude>See the discussion page for this template for how to use it.</noinclude>
+
<noinclude>
 +
== Usage notes ==
 +
This template takes up to 4 arguments:
 +
* Name
 +
* Index (the number of the call)
 +
* Function signature
 +
* Header containing the prototype (in libfxcg)
  
 +
You'll probably want to do a straight-up inclusion of the template into pages for ease of editing.  For example:
 +
<nowiki>{{subst:syscall|FakeSyscall|0x0000|void FakeSyscall(void)|syscall_example.h}}</nowiki>
 +
This will fill in the template contents when you save the page.
 +
 +
Further information on template usage can be found in the [https://en.wikibooks.org/wiki/MediaWiki_User_Guide/Templates MediaWiki User Guide].
 +
 +
== Finding information ==
 +
If you're documenting syscalls that are already in [[libfxcg]] but don't know the index, you can find it by looking at the source.  Each call is in its own file.  For example, the definition for [[Bdisp_PutDisp_DD]] is in libfxcg/syscalls/Bdisp_PutDisp_DD.S, which looks like this:
 +
#include <asm.h>
 +
 +
SYSCALL(_Bdisp_PutDisp_DD, 0x025F)
 +
We can see that the index of this one is 0x25F, then.
 +
</noinclude>
 
{{DISPLAYTITLE:{{{1}}}}}
 
{{DISPLAYTITLE:{{{1}}}}}
 
== Synopsis ==
 
== Synopsis ==

Revision as of 13:15, 14 May 2012

Usage notes

This template takes up to 4 arguments:

  • Name
  • Index (the number of the call)
  • Function signature
  • Header containing the prototype (in libfxcg)

You'll probably want to do a straight-up inclusion of the template into pages for ease of editing. For example:

{{subst:syscall|FakeSyscall|0x0000|void FakeSyscall(void)|syscall_example.h}}

This will fill in the template contents when you save the page.

Further information on template usage can be found in the MediaWiki User Guide.

Finding information

If you're documenting syscalls that are already in libfxcg but don't know the index, you can find it by looking at the source. Each call is in its own file. For example, the definition for Bdisp_PutDisp_DD is in libfxcg/syscalls/Bdisp_PutDisp_DD.S, which looks like this:

#include <asm.h>

SYSCALL(_Bdisp_PutDisp_DD, 0x025F)

We can see that the index of this one is 0x25F, then.


Synopsis

Header: {{{4}}}

Syscall index: {{{2}}}

Function signature: {{{3}}}

Inputs

Returns

Comments

Example