I am working on a CP/M card for the Atari 1090XL. Thus far, I've got CP/M running and need to develop a few utilities so as to use the system within this particular environment. Last evening, I installed the latest version of z88dk and tried to get an example program to compile. This program was compiled by another and I believe used a different compiler.
Here's the program I am trying to compile....
Code: Select all
#include <stdio.h>
#include <string.h>
#include <cpm.h>
unsigned char buffer[128];
int main(int argc, char **argv) {
int i;
cpm_fcb.ex = cpm_fcb.s1 = cpm_fcb.s2 = cpm_fcb.rc = 0;
memcpy(&cpm_fcb.f, "FOO BAR", 11);
printf("Opening file\n");
if (cpm_make_file(&cpm_fcb) == 0xff) {
printf("Error opening file, file exists?\n");
return 1;
}
printf("Setting DMA\n");
cpm_set_dma(buffer);
printf("Filling buffer\n");
for (i=0; i<128; i++)
buffer[i] = i;
printf("Writing buffer\n");
if (cpm_write_sequential(&cpm_fcb)) {
printf("Error writing to disk\n");
return 1;
}
printf("Closing file\n");
if (cpm_close_file(&cpm_fcb) == 0xff) {
printf("Error closing file\n");
return 1;
}
printf("Done.\n");
return 0;
}
write.c:10:12: fatal error: Unknown symbol: cpm_fcb
Any thoughts or corrections as how to get this to work with z88dk?
Thanks!
Brian