Changes

Jump to: navigation, search

Z88DK

663 bytes added, 23:10, 13 August 2010
The libraries supplied with z88dk are designed to be as generic as possible, indeed it is possible to port to a new machine simply by supplying two library routines and some startup code. It is hoped that one day z88dk will support as many z80 based machines as there is information available and sufficient interest in.
Warning : you would really install a recent version like the nightly build to enjoy of the last improvement for CPC.
== Supported Targets ==
Binary releases are available for Amiga, Solaris and Win32. Win16/MSDOS needs to be rolled by the user. On BSD machines, GNU make should be used instead of the native make program.
 
== usage ==
 
world.c from the z88dk console examples :
<pre>
/*
* Hello World
*/
 
#include <stdio.h>
 
main()
{
printf("Hello world!\n");
}
</pre>
 
another more specific example :
 
<pre>
#include <stdio.h>
#include <cpc.h>
 
int main(void) {
int model;
char * model_name;
 
model = cpc_model() ;
switch (model) {
case 0:
model_name = "464";
break;
 
case 1:
model_name = "664";
break;
 
case 2:
model_name = "6128";
break;
 
default:
model_name = "unknown";
}
 
printf("model=%s\n",model_name);
return 0 ;
}
</pre>
== Libraries for the CPC ==
19
edits