#include <stdio.h>
#include <string.h>

char __namebuf[FILENAME_MAX+1];
struct {char *name,dummy[9];} __rmparm;

void OSFILERM()=
"\tldy\t#-1\n"
"loop:\n"
"\tiny\n"
"\tlda\t(r0),y\n"
"\tsta\t___namebuf,y\n"
"\tbne\tloop\n"
"\tlda\t#$d\n"
"\tsta\t___namebuf,y\n"
"\tlda\t#<___namebuf\n"
"\tsta\t___rmparm\n"
"\tlda\t#>___namebuf\n"
"\tsta\t___rmparm+1\n"
"\tldx\t#<___rmparm\n"
"\tldy\t#>___rmparm\n"
"\tlda\t#6\n"
"\tjsr\t$ffdd\n"
"\tldx\t#0\n"
"\tcmp\t#1\n"
"\tbeq\tok\n"
"\tldx\t#-1\n"
"ok:\n"
"\ttxa\n"
"\trts\n";

int remove(const char *name)
{
 OSFILERM(); 
}
