=> R0 = 1
R1 = FS number
R2 = pointer to media name
R3 = device number
R4 = iteration count
R5 = timeout delay
R6 = pointer to media type
<= R0 = changed
This Upcall is called when a media change (eg another disc) is required.
Any routines on this vector should :
· Prompt you to supply the medium with a string built up using:
1 the medium type string (passed in R6)
2 the filing system name (obtained by calling XOS_FSControl 33 acting on the value of R1)
3 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 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 is to request that a floppy disc is inserted.
See PRM 1, page 179
|
|
|