home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
JSAGE
/
ZSUS
/
PROGPACK
/
SMALLC-Z.MZG
/
SMALLC-Z.MSÇ
Wrap
Text File
|
2000-06-30
|
4KB
|
86 lines
the intent of this blurb is to see if there is any interest in a little
project i've been toying around with - a zcpr version of the small-c
compiler. small-c is not a full c, but:
- the source is available and enhancements are possible. (i've done a
few that are detailed below. if there is real interest, others are
possible.)
- it produces reasonable code for what it is, and that too can be
improved upon.
- it is free and documentation on 2.1 can be purchased. i'd like to
make that unnecessary, tho...
- it allows in-line assembler code, and you can link separate modules,
which can be assembler or small-c. this also means that if your
linkable libraries are properly constructed, your programs only
contain code they actually use (some compilers have bloated runtime
routines).
- it supports redirection. one direct example of a benefit of this is
that you can crank up the compiler without an input file, type in
code at the keyboard, and actually see the assembler code it generates
on the screen.
the version i currently have:
- is based on small-c version 2.1, which is the most recent 8-bit
version and the one that the books and source code marketed by dr.
dobbs support.
- now outputs z80 rather than 8080 mnemonics for assembly. default
filetype is .Z80 to support the slr assembler/linker combo. i think
they still work fine with m80/l80, but the latter are slow enough to
drive me crazy, so i haven't tried lately.
- sets the zcpr program error flag on exit if compile errors were
encountered to facilitate aliases and zex/submit files that don't do
unnecessary assemblies.
- is capable of writing a standard zcpr "z3env" header to its assembler
source output file with a "-z" command line switch. defaults to a
type one environment, but generates type 1-4 with -z1, -z2, -z3, and
-z4 switches. if one of these switches is specified, three global
variables are created, one containing the environment type, one
pointing at the environment descriptor, and one pointing at the base
of the program in memory. this last is in support of type 3 and 4
programs. these are accessible without declaration in the main
module. other modules must declare them external.
the possibilities are limited mainly by the imagination and effort.
for example:
- writing downloadable documentation of the compiler and library(ies).
- optimizing/enhancing the code in the standard clib for both size
and speed.
- making the file i/o routines in the clib respect zcpr standards
(multiple user areas, named directories, etc.) one would want to
retain the ability to redirect stdin and stdout tho. - writing
equivalents of vlib and z3lib. given source to those this could be
relatively easily done, with the major changes involving interface
(parameters to and return codes from the functions).
- optimizing the code the compiler itself outputs. there may be a
variety of things that can be done regarding this, tho i haven't
looked into it in detail yet.
- it may be possible to build profiling routines into the compiler and
clib that are invoked with a compiler option, imbedded into the
compiled program, and help debug or identify "hot spots" in the code
that are candidates for optimization. the profiling code could later
be left out of the final version of the program by recompiling.
- one would imagine that almost any kind of debugger could be written
that is possible within the memory constraints involved, since the
compiler can be changed to support it. source level debugging anyone?
if you are interested in this either because you'd like to see a zcpr
public domain higher level language, or because you find the concept
interesting and would be into working on one or another aspect of it,
let me know. if there is enough interest, perhaps something can be
organized. input is appreciated in any case. i have only so much time,
energy, and ideas.
i'm reachable at the following boards in chicago:
lillipute znode 1 (312) 649-1730
lillipute znode 2 (312) 649-1730
the advocate (312) 939-4411
al grabauskas 10/19/88