ack/plat/cpm
George Koehler 154509038d Enable the line editor in read() for CP/M.
This changes the BDOS call from CPM_BDOS_CONSOLE_INPUT to
CPN_BDOS_READ_CONSOLE_BUFFER.  This allows commands like ^H to delete
characters and ^C to exit to CCP.  This is more like how Unix read(2)
uses canonical mode of termios to read a line.

This change has a disadvantage: the user buffer to read(2) must now be
large enough for an entire line.  This is because CP/M, unlike Unix,
lacks a kernel buffer to hold the rest of the line.  If you use a
buffered input library like stdio to call read(2), then it works; but
if you try to read part of a line or a single character, then it
doesn't work.
2018-05-04 18:21:01 -04:00
..
include Change sbrk() to take an int rather than an intptr_t (following the OpenBSD way 2016-11-23 22:06:24 +01:00
libsys Enable the line editor in read() for CP/M. 2018-05-04 18:21:01 -04:00
boot.s Apply fix contributed by George Koehler: 2013-06-02 22:02:15 +01:00
build-pkg.lua Turns out I wasn't building the syscall libraries. Do so. 2016-08-14 11:23:57 +02:00
build-tools.lua Biggish refactor to break cycles; my build rules were full of them. cpm builds, 2016-08-14 01:39:40 +02:00
descr Teach i80 ncg to use libfp. Enable ack -mcpm -fp. 2018-04-25 16:09:56 -04:00
README Documented floating-point status. 2007-04-28 22:34:47 +00: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. All reads block. There's enough TTY emulation to allow
\n conversion and local echo (but it 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.

IEEE floating point is not available. 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