Ansi Library; Overview; Ansi Library Function List - Epson S5U1C17001C Manual

Cmos 16-bit single chip microcontroller (c compiler package for s1c17 family) (ver. 3.2)
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

5.4 ANSI Library

5.4.1

Overview

The S1C17 Family C Compiler Package contains an ANSI library.
Each function in this library has ANSI-standard functionality. Certain ANSI library functions not supported by this package are not
included in the ANSI library. The client assumes responsibility for function implementation and prototype declarations when using
ANSI library functions not listed in Section 5.4.2, "ANSI Library Function List."
For some ANSI library functions not supported by this package, the header files include only prototype declarations. In these cases,
include the pertinent header file rather than declaring a prototype before implementing the function.
See the table in Section 2.2.2, "Library Functions and Header Files" for a discussion of ANSI library functions with prototype
declarations only.
The libc.a ANSI library file is installed in separate directories (24bit and 16bit) for each memory model.
A long long-type ANSI library is included in libgcc.a.
The following header files which contain definitions of each function are installed in the include directory.
stdio.h stdlib.h time.h math.h errno.h float.h limits.h ctype.h string.h stdarg.h
setjmp.h smcvals.h stddef.h
Registers used in the library
The registers %r0 to %r7 are used.
The registers %r4 to %r7 are protected by saving to the stack before execution of a function and by restoring from the stack
after completion of the function.
5.4.2

ANSI Library Function List

The contents of the Reentrant column in the tables are as follows:
Reentrant:
Reentrant function
Nonreentrant: Non-reentrant function
Conditional:
Non-reentrant function (This function refers to a global variable. It can be used as a reentrant function if there is no
change in the global variable, and your created read() and write() are reentrant functions.)
 Input/output functions
The table below lists the input/output functions included in libc.a.
Header file: stdio.h
Function
size_t fread(void *ptr, size_t size, size_t count,
FILE *stream);
size_t fwrite(void *ptr, size_t size, size_t
count, FILE *stream);
int fgetc(FILE *stream);
S5U1C17001C Manual
(Rev. 1.0)
Table 5.4.2.1 Input/output functions
Functionality
Input array element from
stdin.
Output array element to
stdout.
Input one character from
stdin.
Seiko Epson Corporation
Reentrant
Conditional Refer to global variables stdin and
_iob , and call read function.
Conditional Refer to global variables stdout , stderr
and _iob , and call write function.
Conditional Refer to global variables stdin and
_iob , and call read function.
5 Library
Notes
5-11

Advertisement

Table of Contents
loading

Table of Contents