28
CHAPTER 4 Program Reference for the Standard I/O Library
4.1 Standard I/O Function Interface Putchar
Outputs one character to the standard I/O device.
■ Putchar
[Interface]
Format int ercd = putchar(int chrcd);
Parameter chrcd :Output character code
Return parameter ercd :Output character code :Normal completion
EOF :Error
[Description]
Outputs one character to the standard I/O device. The function returns the output character if the
character is output normally. If an error occurs, the function returns EOF (-1).
[Examples]
❍ Assembler interface
#include scdef.inc
.import _putchar
mov a, "*"
pushw a
callp _putchar
popw a
❍ C interface
#include "scdef.h"
prog()
{
putchar('*');
}