2018-08-02 09:10:14 +00:00
|
|
|
The C02 library provides functions for common tasks and allows the
|
|
|
|
creation of programs that can be compiled for different systems with
|
|
|
|
little or no changes.
|
|
|
|
|
|
|
|
Use of the C02 library requires a system specific header, which can be
|
|
|
|
specified using the #include directive in the source code or by using
|
|
|
|
a command line argument when running the compiler. The available
|
|
|
|
headers include:
|
|
|
|
|
|
|
|
appl2std Original Apple 2 (incomplete)
|
|
|
|
apple1 Apple 1 (incomplete)
|
|
|
|
c64 Commodored 64 (incomplete)
|
|
|
|
oric Oric-1 (incomplete)
|
|
|
|
plus4 Commoded Plus/4 (incomplete)
|
|
|
|
py65 Python 6502 Emulator - py65mon
|
|
|
|
vic3k Vic-20 with 3k memory (incomplete)
|
|
|
|
vic8k Vic-20 with 8k+ memory (incomplete)
|
|
|
|
|
|
|
|
The library functions are contained in various modules. The #include
|
|
|
|
directive is used to allow the functions in a module to be used in a
|
|
|
|
program. Most modules require that orher modules be included. These
|
|
|
|
dependencies are detailed in the documentation for each individual
|
|
|
|
module. The available modules are as follows:
|
|
|
|
|
|
|
|
stddef Standard Definitions
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Commonly used constants, as well as base functions
|
|
|
|
common to nearly every other module.
|
2018-08-02 09:10:14 +00:00
|
|
|
|
|
|
|
stdlib Standard Library
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
The most commonly used functions, including eight bit
|
2018-08-02 09:10:14 +00:00
|
|
|
mathematical operations and string/numeric conversions.
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
bitlib Bit Library
|
|
|
|
|
|
|
|
Bit shift, rotate, and nybble manipulation functions
|
|
|
|
for 8-bit values.
|
|
|
|
|
|
|
|
intlib Integer Library
|
|
|
|
|
|
|
|
Mathematical, bit shifting and string/numeric
|
|
|
|
conversion functions for 16-bit values.
|
|
|
|
|
|
|
|
ctype Characted Type
|
|
|
|
|
|
|
|
Functions to detect character types and convert
|
|
|
|
between lower and upper case.
|
|
|
|
|
2018-08-02 09:10:14 +00:00
|
|
|
stdio Standard Input/Output
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions for reading and writing characters
|
2018-08-02 09:10:14 +00:00
|
|
|
and strings from the keyboard and to the screen.
|
|
|
|
|
|
|
|
stdiox Standard Input/Output Extended
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions for writing formatted data to the
|
2018-08-02 09:10:14 +00:00
|
|
|
screen, including decimal and hexadecimal numbers.
|
|
|
|
|
|
|
|
string String functions
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions for copying, searching, comparing,
|
2018-08-02 09:10:14 +00:00
|
|
|
and concatenating strings.
|
|
|
|
|
|
|
|
stringx String Extended
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
The more powerful, but less frequently used
|
2018-08-02 09:10:14 +00:00
|
|
|
string manipulation functions.
|
|
|
|
|
|
|
|
memory Memory functions
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions for copying, searching, and comparing
|
2018-08-02 09:10:14 +00:00
|
|
|
arrays.
|
|
|
|
|
|
|
|
block Block functions
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions for reading, writing, and searching
|
2018-08-02 09:10:14 +00:00
|
|
|
for fixed length segments of data to an arbitrarily large
|
|
|
|
section of memory.
|
|
|
|
|
2019-03-23 01:22:24 +00:00
|
|
|
stack Stack functions
|
2018-08-02 09:10:14 +00:00
|
|
|
|
|
|
|
Contains functions for pushing and popping variable
|
|
|
|
length segments of data onto and off of a stack in memory.
|
2019-03-23 01:22:24 +00:00
|
|
|
|
|
|
|
memio Memory Input/Ouput
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions to simulate reading and writing to
|
2019-03-23 01:22:24 +00:00
|
|
|
a section of memory as though it were a file.
|
|
|
|
|
|
|
|
fileio File Input/Ouput
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
Functions to access, read from, and write to
|
2019-03-23 01:22:24 +00:00
|
|
|
files on cassette and/or disk.
|
|
|
|
|
2020-10-05 16:14:37 +00:00
|
|
|
dirent Directory Entry
|
|
|
|
|
|
|
|
Functions to read directories from disk, disk
|
|
|
|
like devices, and possibly tapes.
|
|
|
|
|
|
|
|
direct Directory Access
|
|
|
|
|
|
|
|
Functions to switch between, create and remove
|
|
|
|
directories, and to switch between devices.
|
|
|
|
|
|
|
|
|