|
The C Library contains functions for working with buffered file IO, e.g. fprintf. The following functions could be supplied by the application in order to implement a file system. Note that only one of __write and __writechar and one of __read and __readchar needs to be replaced, respectively.
__open()
__close()
__read()
__readchar()
__write()
__writechar()
__lseek()
remove()
rename()
The default implementation maps stdin, stdout, and stderr to the C-SPY terminal window and ignores all other requests. See the corresponding C files.
The low-level functions for communicating with the terminal window of the C-SPY debugger is __putchar and __getchar. They are declared and used just like the standard functions putchar and getchar, respectively.
In order to use time-related functions in the C Library, the low-level function time must be implemented. See the file time.c.
The C Library function getenv uses the enviroment defined by the global variable __environ. See the file environ.c.
E-mail: info@telesys.ru