summaryrefslogtreecommitdiffstats
path: root/development/z88dk/man/zcc.1
blob: 723b0841194557dffbd511b7d690ee21adf22688 (plain)
.\"Text automatically generated by txt2man
.TH zcc 1 "01 December 2009" "" "z88 Development Kit"
.SH NAME
\fBzcc \fP- The frontend of z88dk
.SH SYSNOPIS
zcc [flags] [files to be compiled/linked]
.SH DESCRIPTION
This manual page documents briefly the z88dk tools. This manual page
was written for the Debian GNU/Linux distribution (but may be used
by others), because the original program does not have a manual page.
.RE
.PP

.RS
Please refer to the z88dk documentation in /usr/share/doc/z88dk-doc for the complete description of the system.
If /usr/share/doc/z88dk-doc not exists, please install the package z88dk-doc.
.PP
The frontend of z88dk is called zcc, it is this that you should call
if you want to do any compilations.
.PP
The files can be either C files (.c), preprocessed C \fBfiles\fP(.i),
compiled C files (.asm), optimised compiled file (.opt) or assembled
files (.obj), any combination of them can be mixed together and the
relevant processed done on them.
.PP
Processing of a file list is done on each file in turn (i.e. preprocess,
compile, optimise, assemble) at the end all files may be linked into
a single executable if desired.
.SH OPTIONS
Options to control the action of the frontend:
.TP
.B
+[file]
Name of alternate config file (must be the first argument).
.PP
.nf
.fam C
   Predefined alternate configs:
     abc80        ABC80
     aceansi      Jupiter ACE, using VT-ANSI engine
     cpm          CP/M
     msx          MSX 1
     mz           Sharp MZ
     mzansi       Sharp MZ, using VT-ANSI
     nc           Amstrad NC100
     rex          REX 6000
     sam          Sam Coupe
     svi          Spectravideo SVI
     m5           SORD M5
     ti82         Ti82, using ROM text routines
     ti82ansi     Ti82, using VT-ANSI
     ti83         Ti83, using ROM text routines
     ti83ansi     Ti83, using VT-ANSI
     ti85         Ti85, using ROM text routines
     ti85ansi     Ti85, using VT-ANSI
     ti86         Ti86, using ROM text routines
     ti86ansi     Ti86, using VT-ANSI
     ti8x         Ti83+, using ROM text routines
     [ti8xansi]   Ti83+, using VT-ANSI
     vz           VZ / Laser 200
     vzansi       VZ / Laser 200, using VT-ANSI
     z88          Cambridge Z88
     z88ansi      Cambridge Z88, using VT-ANSI
     z88net       Cambridge Z88 with TCP/IP
     zx           ZX Spectrum
     zx81         ZX 81
     zx81ansi     ZX 81, using VT-ANSI
     zxansi       ZX Spectrum, using VT-ANSI

.fam T
.fi
.TP
.B
\fB-a\fP
Produce .asm (or .opt) file only
.TP
.B
\fB-c\fP
Do not link object files
.TP
.B
\fB-E\fP
Preprocess files only, leave output in .i file
.TP
.B
\fB-o\fP [file]
Specify output file for binary (default is a.bas for BASIC programs and a.bin for application binaries)
.TP
.B
\fB-On\fP
Optimize compiler output (to .opt file) n can be either 0 (none) 1,2,3, level 2 is recommended. Level 3 is suitable for large programs (includes certain lib functions to reduce size of \fBcode\fP(!))
.TP
.B
\fB-v\fP
Verbose - echo commands as they are executed
.TP
.B
\fB-vn\fP
Don't be verbose
.RE
.PP


.RS
Options to control library usage:
.TP
.B
\fB-l\fP[name]
Link in a library - supply just the name (after placing them in the correct directory).
.PP
.nf
.fam C
      The 'name' are:
      farz88       Z88 far support
      gfx          Z88 BASIC graphics lib
      gfxapp       Z88 application graphics lib
      m            Generic math routines
      malloc       Generic near malloc routine
      mz           OZ's math routines
      ndos         Fake file-routines, return errors only
      net          Z88 socket routines for ZSock
      netdev       Z88 socket routines for devices
      p3           +3 file support library
      tigray82     Ti82 graylib routines
      tigray83     Ti83 graylib routines
      tigray83p    Ti83+ graylib routines
      tigray85     Ti85 graylib routines
      tigray86     Ti86 graylib routines
      z88          Some Z88 application routines, like mailboxing
      zxmath       ZX Spectrum ROM based math routines
      zxvgs        ZXVGS hardware support

.fam T
.fi
.TP
.B
\fB-m\fP
Generate .map files when assembling/linking
.RE
.PP


.RS
Options to control the type code produced:
.TP
.B
\fB-unsigned\fP
Implicitly define everything as unsigned unless explicitly told otherwise.
.TP
.B
\fB-create-app\fP
Create an application image (i.e. bank 63,62 etc)
.TP
.B
\fB-make-app\fP
(App) Notify the compiler that you're trying to make an application
.TP
.B
\fB-reqpag\fP=
(App) Number of 256 byte pages required for bad application
.TP
.B
\fB-zorg\fP=
(App) Origin for a Z88 application
.TP
.B
\fB-safedata\fP=
(App) Amount of safedata required by your code
.TP
.B
\fB-defvars\fP=
(App) Where static variables should be dropped (only valid for single file compilations, but see later)
.TP
.B
\fB-expandz88\fP
(App) Expanded z88 required
\fB-no-expandz88\fP (App) Expanded z88 not required (these two flags toggle some startup code to check for an expanded machine)
.TP
.B
\fB-startup\fP=3
Produce standalone code that can be run from a set address from BASIC. Use \fB-zorg\fP= to change the address
.TP
.B
\fB-R\fP
(Use with above) produces relocatable code that can be loaded into a DIM'd BASIC array.
.TP
.B
\fB-smartpf\fP
Intelligent printf routine handling
.TP
.B
\fB-no-smartpf\fP
Turn off the intelligent printf handling
.TP
.B
\fB-make-lib\fP
Shortcut to generate .o files from library .c files
.TP
.B
\fB-stackoffset\fP
Sets the stack offset for shared libs (see package.txt for details)
.RE
.PP


.RS
Miscellaneous options:
.TP
.B
\fB-z80-verb\fP
Allow z80asm to be verbose, this tends to generate a lot
of output to the screen so may not be desired.
.TP
.B
\fB-cc\fP
Intersperse C code as comments in the assembler output, warning:
this *will* clobber some optimizations.
.TP
.B
\fB-Wall\fP
Turn on all the compiler warnings
.TP
.B
\fB-Wnone\fP
Turn off all compiler warnings
.TP
.B
\fB-Wn\fP[num]
Turn off the compiler warning [num]
.TP
.B
\fB-W\fP[num]
Turn on the compiler warning [num]
.TP
.B
\fB-asxx\fP
Cause the compiler to emit asxx compatible code
.TP
.B
\fB-Cp\fP[option]
Pass an option through to the pre-processor
.TP
.B
\fB-Ca\fP[option]
Pass an option through to the assembler
.PP
In addition, the flags, \fB-D\fP, \fB-I\fP, \fB-U\fP are passed through to the preprocessor.
.SH SEE ALSO
\fBz88dk\fP(1), \fBz88dk-zcc\fP(1), \fBz88dk-z80asm\fP(1), \fBz88dk-appmake\fP(1), \fBz88dk-copt\fP(1).
.RE
.PP

.SH AUTHOR
z88dk was written by Dominic Morris <dom@z88dk.org>, and others.
This manual page was written by Krystian Wlosek <tygrys@waw.pdi.net> using exists documentation, for the Debian GNU/Linux system.