This crate contains the Userspace to Kernel API for the Monotron.
It is pulled in by the Kernel (github.com/thejpster/monotron) and the various user-space example applications (github.com/thejpster/monotron-apps).
The API in here is modelled after both the UNIX/POSIX API and the MS-DOS
API. We use function pointers rather than
SWI calls (software
interrupts), provided in a structure. This structure is designed to be
A C header file version of this API can be generated with
All types in this file must be
This structure contains all the function pointers the application can use to access OS functions.
Describes a string of fixed length, which must not be free'd by the recipient. The given length must not include any null terminators that may be present. The string must be valid UTF-8 (or 7-bit ASCII, which is a valid subset of UTF-8).
Describes a file as it exists on disk.
A bitfield indicating if a file is:
Describes a handle to some resource.
Describes an instant in time. The system only supports local time and has no concept of time zones.
Represents the seven days of the week
Describes the result of a function which may return nothing if everything
was Ok, or return an
The set of Error codes the API can report.
Describes the sort of files you will find in the system-wide virtual filesystem. Some exist on disk, and some do not.
Describes the result of a function which may return a
Represents how far to move the current read/write pointer through a file. You can specify the position as relative to the start of the file, relative to the end of the file, or relative to the current pointer position.
The ways in which we can open a file.
Describes the result of a function which may return a numeric count of
bytes read/written if everything was Ok, or return an
Is the archive bit set in this FileMode bit-field?
Is the read-only bit set in this FileMode bit-field?
Is the system bit set in this FileMode bit-field?
Is the volume label bit set in this FileMode bit-field?
Create a new Read Only open mode object, for passing to the
Create a new Read Write open mode object, for passing to the
Create a new Write Only open mode object, for passing to the