• Please review our updated Terms and Rules here

Cowgol, C & assembler development environment hosted on Z80 computers running CP/M


Apr 27, 2022
Cowgol is a programming language for very small systems, including Z80 computers ( see https://github.com/davidgiven/cowgol ).

You will find here: https://github.com/Laci1953/Cowgol_on_CP_M , a complete Cowgol development environment, hosted on CP/M, for Z80 computers.

To compile Cowgol source files (and, optionally, C and assembler files), or to build an executable starting from Cowgol source files (and, optionally, C & assembler files), the following command is used:

COWGOL [-C] [-Mmapfile] [-Lfile] source1.cow [ source2.cow | source.c | source.as ] ...

More than one source file may be specified (with extensions: .cow = cowgol source file, .c = C source file, .as = assembler source file)
The first file must be a Cowgol source file.
If more than one Cowgol source files are used, the first one will give the name of the executable being built, but the last one must contain the 'main' code.
C and assembler routines may be called from the cowgol source files.
If you want just to compile/assemble the files, the option -C must be used.
If the option -C is not specified, the files will be first compiled/assembled, then linked into a CP/M executable (named after the first file in the list).
The option -M builds a memory map for the executable.
The option -Lfile adds the file "libfile.lib" to the link list.
HiTech's LINK is used to link the object files.

Example of use:

C>cowgol startrek.cow xrnd.as

compiles the startrek.cow cowgol source file,
assembles the xrnd.as assembler source,
links the object files,
producing the startrek.com executable