cclose instead of fclose cgetc instead of fgetc cputc instead of fputc scanf instead of fscanf int instead of short must use cc test.c -lp to use iolib functions srand() is different, see example rand() is available no strcat (include as additional function definition) fopen is available but I used copen instead getchar() and putchar are available fclose is missing, use cclose instead open 0 = read 1 = write 2 = append unirubik for v7 uses fputc to output and fgetc to input unirubik for v6 uses cputc to output and cgetc to input For v7: fp_in = fopen (fn_in, "r"); if (fp_in == NULL) { printf ("No input file %s\n", fn_in); goto out; } For v6: fp_in = copen (fn_in, 'r'); if (fp_in < 0) { printf ("No input file %s\n", fn_in); goto out; } For v7: srand (time(NULL)); c = rand() % SIDES; For v6: time(stime); srand(stime[1]); c = rand() % SIDES; For v7: q[z][x][y] = fgetc(fp_in); For v6: q[z][x][y] = cgetc(fp_in); For v7: FILE *output; fputc (q[z][x][y], output); For v6: int output; cputc (q[z][x][y], output); strcat function must be explicitly defined in v6 strcat function is part of stdio in v7