Syscalls: Difference between revisions
Jump to navigation
Jump to search
(Add exit()) |
m (→TI-Nspire GUI: typo) |
||
Line 52: | Line 52: | ||
==TI-Nspire GUI== | ==TI-Nspire GUI== | ||
*<tt>void ascii2utf16(void *buf, const char *str, int max_size)</tt> | *<tt>void ascii2utf16(void *buf, const char *str, int max_size)</tt>: converts the ASCII string <tt>str</tt> to the UTF-8 string <tt>buf</tt> of size <tt>max_size</tt>. | ||
*<tt>void show_dialog_box2(int winid, const char *utf8_title, const char *utf8_msg)</tt>: displays a dialog box of title <tt>utf8_title</tt> containing <tt>utf8_msg</tt>. <tt>utf8_title</tt> and <tt>utf8_msg</tt> are C strings converted with <tt>ascii2utf16()</tt>. <tt>winid</tt> must be 0. | *<tt>void show_dialog_box2(int winid, const char *utf8_title, const char *utf8_msg)</tt>: displays a dialog box of title <tt>utf8_title</tt> containing <tt>utf8_msg</tt>. <tt>utf8_title</tt> and <tt>utf8_msg</tt> are C strings converted with <tt>ascii2utf16()</tt>. <tt>winid</tt> must be 0. |
Revision as of 18:17, 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.