1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-28 10:51:14 +00:00
C02/vic20/dir.c02
2018-01-28 13:57:49 -05:00

45 lines
723 B
Plaintext

/*********************************
* FILES - Test file.h02 Library *
*********************************/
#include <vic20.h02>
#include <stdio.h02>
#include <string.h02>
#include <file.h02>
char chan, c, i;
char dir = "$";
main:
//Initialize File System
fsinit();
//Open Directory
chan = fopen(8, &dir);
if (!chan) {
outstr("ERROR ");
prbyte(ferror());
outstr(" OPENING ");
putstr(&dir);
goto exit;
}
i = 0;
while() {
c = fgetc(chan);
if (feof(chan)) break;
i++;
if (i<4) continue;
if (c) {
putchr(c);
}
else {
newlin();
i=0;
}
}
goto exit;