Thanks for the kind words, dfzx!
In my first approach (which worked out), I used z88dk from Sourceforge, but it's the older version of 2017.
To install the recent version, which uses "zsdcc", like suggested in the tutorial, seems a bit tougher.
Here's what I did now:
The tutorial wants two additional files, "zsdcc" and "zsdcpp". These are executables from a different compiler called "sdcc". They are used with z88dk though.
It seems, z88dk uses two different compilers and even two completely different sets of C-libraries. That makes it all a bit complicated.
For now, how to get the two files. It seems, the directories in the sdcc-source have changed a bit, since the page with instructions was written.
1. Getting the recent source of sdcc:
Code: Select all
svn checkout svn://svn.code.sf.net/p/sdcc/code/trunk sdcc-code
2. Get the code of "sdcc-z88dk.patch" from "
https://github.com/z88dk/z88dk/tree/master/src/zsdcc". It's also in z88dk's source files.
3. "cd sdcc-code/sdcc" and copy "sdcc-z88dk.patch" in there. Execute:
It should tell, that four files have been patched in the "src"-directory below.
4. Configure with:
Code: Select all
./configure --disable-mcs51-port --disable-avr-port --disable-ds390-port --disable-hc08-port --disable-pic-port --disable-pic16-port --disable-xa51-port --disable-stm8-port --disable-tlcs90-port --disable-s08-port --disable-pic14-port --disable-ds390-port --disable-ds400-port --disable-ucsim --disable-device-lib --disable-packihx
This disables most targets for sdcc, but the zx-target. Otherwise compilation would take almost forever.
5. Go (with cd) to "sdcc-code/sdcc/src". Run "make" here. (Important step. Otherwise main compilation won't work).
6. Go (with cd) to "sdcc-code/sdcc" again. Run "make" here. It will probably fail, but go on to next step.
7. Check, if there's the "sdcc"-binary in "sdcc-code/sdcc/bin". If it is, rename it to "xsdcc".
8. Go (cd) to "sdcc-code/sdcc/support/cpp". Run "./configure" and "make" here.
9. Now, there should be the "zsdcpp"-binary in "sdcc-code/sdcc/bin". If it is, rename it to "xzsdcpp". Done.
It took me quite a while, to figure that out. (Maybe that information could be useful for someone else some time.)
I still have problems, running the recent z88dk-compiler though. I'm getting this error-message:
Code: Select all
m4:/usr/local/share/z88dk/lib/config/../..//libsrc/_DEVELOPMENT/target/zx/startup/zx_crt_0.asm.m4:1: cannot open `z88dk.m4': No such file or directory
Env had been set (and I tried to copy the file 'z88dk.m4' - which I have - about everywhere):
Code: Select all
export ZCCCFG=/usr/local/share/z88dk/lib/config
I can run the older version of z88dk from Sourceforge though.
In general, you should probably "
write in C".

I'm just not sure, if 48K memory (or even less) is enough to hold interesting programs. Maybe it has to be Assembly on such small systems to get decent results. We'll see.
From this point of view, it was really amazing, how much content they pushed into such little memory, when you think of "The Hobbit", for example.