Subroutines in fileio.s overlaps with C functions:
mega65_io_enable()
lcopy()
- Copying filename to
0x0100 could be done directly from C. Is it safe to override 0x0100 for temporary storage for setname?
Using C for the above, fileio.s becomes smaller; could be inline; and reduce compiler specific code.
Ping @ki-bo.
Notes
size_t read512(uint8_t* buffer)
{
volatile size_t len;
asm volatile("lda 0x1a\n"
"sta 0xd640\n"
"nop\n"
"stx %0\n"
"sty %1\n"
"lda 0x80\n"
"tsb 0xD689\n"
: "+r"(*(&len + 0)), "+r"(*(&len + 1))
:
: "a", "x", "y");
lcopy(0xFFD6E00, (uint32_t)buffer, 512);
return len;
}
Subroutines in
fileio.soverlaps with C functions:mega65_io_enable()lcopy()0x0100could be done directly from C. Is it safe to override0x0100for temporary storage forsetname?Using C for the above,
fileio.sbecomes smaller; could be inline; and reduce compiler specific code.Ping @ki-bo.
Notes