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

45 lines
723 B
Plaintext
Raw Normal View History

2018-01-28 18:57:49 +00:00
/*********************************
* 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;