http://schmenk.is-a-geek.com/tarfiles/c ... 0-diff.zip
is the directory structure of the cc65 source tree containing only the new files or files that have been modified. To apply, download the current stable source archive from www.cc65.org and copy the patched files over the existing ones. I have submitted the files to cc65.org for inclusion in the next release, but it would be nice to test it more. Two new targets are available to the compiler, apple1 and replica1. The difference lies in the memory map of the two computers. The Apple 1 has a disjoint 8K memory map whereas the Replica 1 has a nice contiguous 32K. The code generated by the compiler isn't really compact, so it would tend to overflow 8K. 32K fits nice. In order to compile the classic:
- Code: Select all
#include <stdio.h>
int main(void)
{
printf("Hello, world.\n");
return (0);
}
one would type "cl65 -t replica1 hello.c" and get a binary called hello. Since I was the lucky one to get Vince's SE prototype, I send things over the USB/serial interface. I have included a utility program under util/apple1/bintomon.c that reads the binary file and spits out Woz monitor compatible text. Redirect the output to save to a file. The linker set the start address at $280 for both the Apple 1 and Replica 1. You can interact with your program through stdio, or you can use some very basic routines to read the keyboard and write to video. The file include/apple1.h has the function prototypes for these routines. The standard I/O library is very large so if you don't need it, use the simple routines. Both targets generate standard 6502 code. If you have a 65c02, you can get slightly more efficient code by including a " --cpu 65c02 " on the command line. Now, even if you aren't into C coding on the 6502, the cc65 suite has a pretty powerful assembler as well. Not quite as nifty as having a resident Replica 1 assembler, but its easier to write that giant Apple 1 masterpiece of coding you have always wanted to do.
Dave...