hoglet67 / MMFS

Modern SD Card File System for Acorn 8-bit Machine (Master, Beeb, Electron)
68 stars 17 forks source link

Unrecognised OSWORD A=08 service call bug #8

Closed hoglet67 closed 1 month ago

hoglet67 commented 6 years ago

When MMFS is not the current file system, this service call is claimed rather than passed on.

See: http://www.stardot.org.uk/forums/viewtopic.php?p=193394#p193394

Dave

SteveFosdick commented 2 years ago

There appear to be two separate underlying bugs here:

  1. In the OSWORD code the check for whether MMFS is the current filing system and setting the return status of the service call as A=00 are done in the wrong order.
  2. In FSisMMFS, testing the file minimum file handle does not test is MMFS is the current FS as MMFS uses the same file handles as DFS so this returns true even if DFS is the current FS.

I have a version that fixed both of these - see: https://github.com/SteveFosdick/MMFS/commit/5bba36f8582e0a31e870bfda510900915a665d31 though I can't see immediately how to turn that into a pull request.

hoglet67 commented 2 years ago

Thanks Steve,

I can pull the commit in directly and merge it.

Dave

SteveFosdick commented 2 years ago

And a version of the test program:

   10osword=&FFF1
   20PROCrunosw("DISC")
   30PROCrunosw("CARD")
   40PROCrunosw("DISC")
   50PROCrunosw("CARD")
   60END
   70DEFPROCrunosw(F$)
   80OSCLI F$
   90A%=&7E
  100X%=&70
  110Y%=0
  120CALLosword
  130N%=(!&71 AND &FFFF)DIV10
  140PRINTF$;": Number of tracks ";N%
  150ENDPROC
hoglet67 commented 1 year ago

Fix included in MMFS 1.54.

See further discussion here: https://stardot.org.uk/forums/viewtopic.php?p=390229#p390229