-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fread and fwrite works only with ADL pointers #66
Comments
I'd also like to add to this that This code sequence:
Could be replaced with this sequence, which is also smaller:
|
as I'm currently digging around in the MOS API implementation code I've taken a look at this. I can confirm that it looks like mos_fread and mos_fwrite both weren't adjusting the pointer argument in HL to be 24-bit compatible. I've looked around a bit further than I think they may be the only APIs that had that oversight - everywhere else I've looked so far is ensuring that registers with pointers are made 24-bit compatible. doh! also the fatfs versions of fread and write were also both the only places in the code that were using EXX I just added a commit to #91 that addresses these issues I might end up back-porting these to 2.3, as MOS 3 is probably still quite a while away from release |
These fixes got back-ported, and released as part of MOS 2.3.2 |
I can open file by 16 bit pointer in legacy cpu mode but when I'll try read or write to buffer from non-ADL mode I'm getting failure - cause API works only with full ADL pointers.
As current workaround I'm using prefixed LD command(LD.LIL) but best solution will be making API consistent and allow use fread and fwrite with non-ADL pointers(when MB isn't equal zero).
The text was updated successfully, but these errors were encountered: