Tuesday, March 8, 2011

z88dk Target

Looking at the instructions for porting the z88dk to a new machine target.. if "system is ROM based, base the startup file on lib/rex_crt0.asm"

So lets see what the rex configuration will do.. (wasn't that a pocket organizer Jerry Seinfeld gave to his father?)

The relevant example is in "z88dk\examples\rex". I created a C file test.c with only an empty main() block ... and compiled thusly:

zcc +rex -o test.bin test.c

I downloaded and compiled (under Cygwin gcc) the disassembler "z80dasm-1.1.2.tar.gz".

Ran the disassembler against test.bin and got exactly just the codes from lib/rex_crt0.asm

The custom crt0 is created in "lib" and the configuration .cfg file should be created in the lib/config directory for the target. (According to "z88dk/doc/zcc.html#config" we can create that configuration file anywhere.)

No comments:

Post a Comment