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

OS_UpCall 2

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_UpCall
» OS_UpCall 2

OS_UpCall 2

(SWI &33)
Entry
R0 2
R1 Filing system number
R2 Pointer to media name
R3 Device number
R4 Iteration count
R5 Timeout delay
R6 Pointer to media type
Exit
R0 0 if medium change, or -1 if medium no longer required, else preserved
R1 Preserved
R2 Preserved
R3 Preserved
R4 Preserved
R5 Preserved
R6 Preserved

Use

The purpose of this call is to call warn applications that a filing medium is not known.

Notes

This Upcall is called when a media change (eg another disc) is required.

The following information applies to both OS_UpCall 1 & OS_UpCall 2.

Any routines on this vector should:

  • Prompt you to supply the medium with a string built up using:
  • The medium type string (passed in R6)
    #the filing system name (obtained by calling XOS_FSControl 33 acting on the value of R1)
  • The medium name (passed in R2), for example:
    ‘Please insert disc ADFS:XYZ and press Space (Escape to abort)’
  • Give you a way of indicating that you have either supplied the medium, or wish to cancel the operation
  • Intercept the vector with R0 = -1 if you wish to cancel the operation
  • Intercept the vector with R0 = 0 if the time limit is reached, or if you say you have supplied the medium

When you intercept the call to the vector, control passes back to the filing system routine that called OS_UpCall…

  • If R0 = -1, then the routine calls OS_UpCall 4; it then returns an error to say that the medium wasn’t found.
  • If R0 = 0, then the routine checks for you that the medium has been changed and the correct one supplied. If so, it calls OS_UpCall 4; otherwise it just calls OS_UpCall 1 or OS_UpCall 2 again, after incrementing R4

The timeout period in R5 is set to a small value for media that can detect when the medium has been changed (such a floppy disc drives) and to a large value (typically &FFFFFFFF) for other media. In the former case, this means that RISC OS will automatically detect that new medium has been supplied, and check that it is the correct one.

If R1 is unchanged on exit, nobody handled the request. In general this should be treated by filing systems as the media not present error.

The most common use of OS_UpCall 1 and 2 are to request that a floppy disc is inserted.

See also

  • Filing System Numbers
  • OS_UpCall
  • OS_UpCall 1
  • OS_UpCall 4
  • XOS_FSControl33
Created on December 4, 2009 14:28:31 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: OS_UpCall, OS_UpCall 1, OS_UpCall 4, FileCore_MiscOp 4, FileCore_MiscOp 5

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 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