Re: Plot function in z88dk
Posted: Mon Feb 26, 2018 3:25 pm
Ahah great find Siggi, when I'm back I'll search out this library ( its bound to be more complete ) and do some. Speed comparisons
Regards Andy
Regards Andy
Discussion forums for users of the Sinclair 8-bit range of computers - ZX80, ZX81, ZX Spectrum, Z88, clones...
https://www.sinclairzxworld.com/
Code: Select all
/* Plot Test by RobertK, 2018-03-14
Compile for ZX81:
zcc +zx81 -startup=2 -o plottest -create-app plottest.c
Compile for ZX80:
zcc +zx80 -o plottestZX80 -create-app plottest.c
*/
#include <stdio.h> // required for printf()
#include <graphics.h> // contains plot() and point() functions
void main()
{
printf("\n\n\n\n\n*** plot test ***\n\n");
plot(1,1);
plot(3,3);
plot(5,5);
printf("press any key to point-check\n\n");
fgetc_cons(); // wait for keypress
printf("point(3,3) (plotted) is %d\n",point(3,3));
printf("point(10,10) (blank) is %d\n",point(10,10));
fgetc_cons(); // wait for keypress
}