scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 8460bb981bb821656f7bd54a7d5f647a7a9ff400
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed,  8 Feb 2012 09:53:22 +0100

Initial commit

Diffstat:
README | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/README b/README @@ -0,0 +1,22 @@ +This is the kcc compiler, a one very stupid non retargetable compiler +for z80. This compiler is intended to be very simple and suitable for +running in small machines (like MSX for example), and let almost part +of optimizations for the programmer. + +After a lot of years seeing compilers for z80 I notice that it is very +hard for a C compiler generates a good code for a 8 bit processor like +z80, with a expensive indirect addressing mode, so the best solution +is don't try that compiler optimize the code and use C as a macro +macro assembler. + +In order to get this last, we need a compiler that does exactly the +things we want to do. For example is a variable is register it MUST be +register and fails in other case. If a variable is automatic try to +realize operations directly with the stack (for example use ADD +A,(IX+4), instead of allocate the variable into register add and store +again in memory). So if you declare an automatic variable you are a +big bullshit or you need it for recursion (static variables are your +friends). + +This is the reason why I begin to develop this compiler, and I hope +it will be useful for you.+ \ No newline at end of file