MEGA65 / mega65-libc

Simple C library for the MEGA65
Other
25 stars 18 forks source link

Function `open()` not working with clang #20

Closed mlund closed 1 year ago

mlund commented 1 year ago

The following works with cc65 but when running with a clang generated .prg, xemu enters the monitor. Check if fileio.s is compiled correctly.

#include <stdio.h>
#include <fileio.h>

unsigned char fd;
char filename[80 + 1] = "TEST.DAT";
int main() {
    closeall();
    fd = open(filename);
    if (fd == 0xff) {
        printf("Load error");
    }
    return 0;
}