ack/plat/cpm
George Koehler 84f65f7ce3 Raise _XOPEN_SOURCE from 500 to 700
In OpenBSD, _XOPEN_SOURCE 500 forces _POSIX_C_SOURCE down to 199506,
which hides the declarations of openat() and fdopendir() and causes
compiler warnings.

Don't set _POSIX_C_SOURCE, because _XOPEN_SOURCE may set
_POSIX_C_SOURCE to a different value.
2019-03-22 14:35:07 -04:00
..
emu Raise _XOPEN_SOURCE from 500 to 700 2019-03-22 14:35:07 -04:00
include Move time() into sys; change the name of the variable which controls it. 2018-06-23 19:40:50 +02:00
libsys CP/M sbrk now handles overflow correctly. 2019-02-08 21:43:52 +01:00
tests Don't run the floating point tests on i80. 2019-02-09 14:24:31 +01:00
boot.s Experimentally use rst 1 to optimise frame variable loads. Reduces Star Trek 2019-02-07 00:06:32 +01:00
build-pkg.lua Experimentally use rst 1 to optimise frame variable loads. Reduces Star Trek 2019-02-07 00:06:32 +01:00
build-tools.lua Experimentally use rst 1 to optimise frame variable loads. Reduces Star Trek 2019-02-07 00:06:32 +01:00
descr Instead of using parameterised rsts for stack access, add a huge swathe of 2019-02-13 22:45:22 +01:00
README Update cpm/README for console changes, ack -fp. 2018-05-07 16:08:44 -04:00

# $Source$
# $State$
# $Revision$


The cpm platform
=================

cpm is an i80-based BSP that generates CP/M executables that can be run on any
CP/M-compliant machine.

This port only implements a very limited set of syscalls --- and most of those
are stubs required to make the demo apps link. File descriptors 0, 1 and 2
represent the console. Each read() blocks and reads an entire line (it can't
read part of a line) from the CP/M line editor, then appends \n. Each write()
converts \n to \r\n. The line editor and \n conversion can't be turned off.

There's a special, if rather minimilist, interface to give applications access
to CP/M. See include/cpm.h for details.

Link with `ack -fp` to enable software floating point. Otherwise, attempts to
use floating-point numbers will cause the program to terminate.


Example command line
====================

ack -mcpm -O -o cpm.com examples/paranoia.c

The file cpm.com can then be run.

(Although note that Paranoia is very big, and you'll need a CP/M machine with
lots of memory for it to fit. Which it does, just.)


David Given
dg@cowlark.com