RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Filing System MiscOp Entry

FileCore
» Technical Details
» Filing System MiscOp Entry

Filing System MiscOp Entry

The entry for MiscOp does much of the work for a MiscOp SWI. It is passed the same values as FileCore_MiscOp. The reason codes you must support are 0 (Mount), 2 (Lock floppy drive) and 3 (Unlock floppy drive) for floppy drives, you must also support reason codes 1 (Poll changed) and 4 (Poll period).

Your routine must preserve registers, and the N, Z and C flags – except where specifically stated otherwise.

You may only return an error from reason code 0 (Mount). This must be done in the same way as for the DiscOp entry.

For drives with disc sensing, reason code 1 (Poll changed) must always return changed in the spun-down state. If the drive is spun-up, you must return maybe changed if the drive has been permanently spun-up since the last ‘Poll changed’; other wise you must
return changed.

Reason codes 2 (Lock floppy drive) and 3 (Unlock floppy drive) must always perform that action. You must not try to track the state of the drive locking; FileCore does this for you.

Reason code 5 (Eject disc) will never be called if bits 6 and 7 of the descriptor block are clear, since this indicates that no drives support power-ejection. Otherwise it may get called in a variety of situations: for example, after dismounting all discs as part of
shutting down all filing systems.

Reason code 5 (Eject disc) is also called whenever FileCore issues an UpCall 1 (medium not present), or an UpCall 2 (medium not known). In this case, the top bit of the drive number is set, indicating that a disc should be ejected from the drive considered to be most appropriate. The values passed to the UpCall in R4 (the iteration count) and in R5 (the minimum timeout period) are also passed on in the same registers to the MiscOp entry point. The filing system may treat these as appropriate; for example, it may choose to eject only on iteration 0 for an auto-insert detect drive, as doing further ejects may make it hard to get a new disc into the drive.

See also

  • FileCore
  • FileCore_Create
  • FileCore_MiscOp
Created on May 13, 2018 14:05:55 by Jon Abbott (1421)? (86.143.40.49)
Edit | Views: Print | Source | Linked from: FileCore FS Descriptor Block

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys