z88dk forums

z80 Development Kit

You are not logged in.

#1 2016-04-02 06:54:36

alvin
Administrator
Registered: 2007-07-16
Posts: 1522

zcc --c-code-in-asm for sdcc compiles

An option "--c-code-in-asm" for sdcc compiles will embed C code as comments in output assembly listings.  With the recent change to using sdcc's preprocessor for sdcc compiles, the C code is correctly placed in the output asm listing.

There is potential for use of this option to cause compile errros when strings containing non-ascii characters are listed in the C code comments.  The error arises because one of z88dk's tools, copt (a regular expression engine), is unable to deal with non-ascii character sets.  You will still get the asm listing but binary generation will fail.  To get the output binary in these cases, simply compile without this option enabled.

Example use:

zcc +zx -vn -SO3 -clib=sdcc_iy --max-allocs-per-node200000 test.c -o test --c-code-in-asm --list

Among the generated files will be .lst files containing the asm output of the compiler with c code mingled in as comments.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson