1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-10 04:25:21 +00:00

separating standard file I/O from low-level paravirtualization

This commit is contained in:
Brad Smith
2019-05-27 14:57:31 -04:00
committed by Oliver Schmidt
parent 53bfd2e8cd
commit 26d436b90d

View File

@@ -115,12 +115,11 @@ The <tt/exit/ function may also be used to terminate with an exit code.
Exit codes are limited to 8 bits. Exit codes are limited to 8 bits.
The standard C library file input and output is functional, The standard C library high level file input and output is functional,
with <tt/STDIN_FILENO/, <tt/STDOUT_FILENO/ and <tt/STDERR_FILENO/ mapped to sim65's and can be used like a command line application in sim65.
STDIN_FILENO, STDOUT_FILENO and STDERR_FILENO.
These utilize an underlying set of built-in virtual functions Lower level file input and output is provided by
for simple file input and output: a set of built-in paravirtualization functions:
<tscreen><verb> <tscreen><verb>
int open (const char* name, int flags, ...); int open (const char* name, int flags, ...);
@@ -129,6 +128,10 @@ for simple file input and output:
int __fastcall__ write (int fd, const void* buf, unsigned count); int __fastcall__ write (int fd, const void* buf, unsigned count);
</verb></tscreen> </verb></tscreen>
These built-in functions can be used with
<tt/STDIN_FILENO/, <tt/STDOUT_FILENO/ and <tt/STDERR_FILENO/
which are mapped to sim65's corresponding file descriptors.
<sect>Creating a Test in Assembly<p> <sect>Creating a Test in Assembly<p>