ref: 8460bb981bb821656f7bd54a7d5f647a7a9ff400
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Feb 8 04:53:22 EST 2012
Initial commit
--- /dev/null
+++ b/README
@@ -1,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