I notice while debugging my toupper code that there is a problem with how fread is working.
It seems to be stripping out the 0x0d characters. The document says its a direct i/o function
and the I see the fgets is processing the string as expected.
Am I getting this wrong ?
FREAD may do be doing undocumented feature
Re: FREAD may do be doing undocumented feature
Digging into the libsrc ./libsrc/stdio/fread.c
I see that fgetc is used by both z80 and 8080 code paths.
line 132 of fgetc filters 0x0d.
Is there a way to read file data in binary mode ?
I see that fgetc is used by both z80 and 8080 code paths.
line 132 of fgetc filters 0x0d.
Is there a way to read file data in binary mode ?
Re: FREAD may do be doing undocumented feature
SO, the answer is yes.
Use fnctl
Use fnctl
Re: FREAD may do be doing undocumented feature
If you add “b” to the fopen mode, so “rb“ then reading should be verbatim and quicker.
Re: FREAD may do be doing undocumented feature
Ah yes. Use the binary read mode. I used to know that.
tnx
tnx