Quote
Does the assembler understand capital letters for the register names?
Thanks for the tip: that's exactly what it was. The compiler fails two different ways if you:
Write the mnemonics in upper case.
Write register operands in upper case
Now that I know, I'll make sure to lower-case mnemonics and register operands.
And now that I've done that, I can now read 256 bytes from a file directly into a memory buffer. I've actually got two more extensions to make to that method: stop on null, and stop on CR.
On that note
@Jesper Gravgaard, I'm considering the naming convention for the CMDR File I/O routines.
I started using fopen, fgetc, and fgets, but the signature of all those does not match the conventions in the ANSI C stdio library.
for example, my fopen looks like this:
void fopen(byte channel, byte device, byte secondaryAddress, char *filename)
while ANSI's stdio looks like
FILE * fopen ( const char * filename, const char * mode );
Would it be better to rename the routines, or just overload the standard names with the platform-specific signatures?
The names I'm considering are: cxopen, cxgetc, cxgets, cxseek, cxputc, cxputs, and cxclose. This keeps the original fopen() and related function names free, in case someone decides to implement a standardized version of those functions in the future.