[Coco] Floating-point arithmetic from a CMOC program

Pierre Sarrazin sarrazip at sarrazip.com
Sun Oct 23 21:28:06 EDT 2016

Hi folks,

Here are some news about CMOC, a cross-compiler for a subset of
the C language.

Along with the release of version 0.1.33, I have just published
a sample CMOC program called FuncPlot that plots a mathematical
function in PMODE 4 graphics. It uses code provided by a new
source file, fp.h, which contains wrappers for many Color Basic
floating-point routines. The program implements an expression
parser and an RPN interpreter to evaluate the user's function across
an interval.

The programming interface in fp.h is not very friendly because it
is mapped on Color Basic's routines, but a higher-level set of
floating-point functions could be implemented on top of it. The
RPN interpreter in this package is an example.

This sample program (with source) can be obtained here:


It requires a 32K CoCo with Extended Basic.

To try the program without having to compile it, download this
DSK image:


Since version 0.1.30 of CMOC, several bugs have been fixed.

CMOC can be downloaded from its home page:


Pierre Sarrazin <sarrazip @ sarrazip . com>

More information about the Coco mailing list