Syscalls: Difference between revisions

From Hackspire
Jump to navigation Jump to search
(Created)
 
(Add exit())
Line 2: Line 2:


Your help is needed to make this list grow to a full-fledged library. Try to find new syscalls, [[Ndless features and limitations#Syscalls|test them]] and share them for integration in Ndless.
Your help is needed to make this list grow to a full-fledged library. Try to find new syscalls, [[Ndless features and limitations#Syscalls|test them]] and share them for integration in Ndless.
Functions marked with (*) are available only if the program is linked against [http://sourceware.org/newlib/ Newlib], i.e. when the <tt>nspire-ld</tt> switch <tt>-nostdlib</tt> is ''not'' used.


==[http://en.wikipedia.org/wiki/C_standard_library C standard library]==
==[http://en.wikipedia.org/wiki/C_standard_library C standard library]==
Line 22: Line 24:


===[http://www.cplusplus.com/reference/clibrary/cstdlib/ stdlib.h]===
===[http://www.cplusplus.com/reference/clibrary/cstdlib/ stdlib.h]===
*[http://www.cplusplus.com/reference/clibrary/cstdlib/exit/ exit] (*)
*[http://www.cplusplus.com/reference/clibrary/cstdlib/free/ free]
*[http://www.cplusplus.com/reference/clibrary/cstdlib/free/ free]
*[http://www.cplusplus.com/reference/clibrary/cstdlib/malloc/ malloc]
*[http://www.cplusplus.com/reference/clibrary/cstdlib/malloc/ malloc]

Revision as of 18:06, 8 October 2010

Syscalls are OS functions exposed by Ndless to C and assembly programs. This article describes the syscalls currently available with Ndless 1.7.

Your help is needed to make this list grow to a full-fledged library. Try to find new syscalls, test them and share them for integration in Ndless.

Functions marked with (*) are available only if the program is linked against Newlib, i.e. when the nspire-ld switch -nostdlib is not used.

C standard library

stdarg.h

stdio.h

stdlib.h

string.h

C POSIX library

sys/stat.h

Nucleus

TODO: Document these functions

  • NU_Local_Control_Interrupts
  • NU_Get_First
  • NU_Get_Next
  • NU_Done

TI-Nspire GUI

  • void ascii2utf16(void *buf, const char *str, int max_size):: converts the ASCII string str to the UTF-8 string buf of size max_size.
  • void show_dialog_box2(int winid, const char *utf8_title, const char *utf8_msg): displays a dialog box of title utf8_title containing utf8_msg. utf8_title and utf8_msg are C strings converted with ascii2utf16(). winid must be 0.