Commit 71b781f6 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add OS_FSControl 58 to enumerate handles, does OS_Args 7 and 254 in one hit.

Version 2.74. Tagged as 'FileSwitch-2_74'
parent 70efb18b
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "2.73"
Module_Version SETA 273
Module_MajorVersion SETS "2.74"
Module_Version SETA 274
Module_MinorVersion SETS ""
Module_Date SETS "27 Nov 2011"
Module_ApplicationDate SETS "27-Nov-11"
Module_ComponentName SETS "FileSwitch"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileSwitch"
Module_FullVersion SETS "2.73"
Module_HelpVersion SETS "2.73 (27 Nov 2011)"
Module_FullVersion SETS "2.74"
Module_HelpVersion SETS "2.74 (27 Nov 2011)"
END
/* (2.73)
/* (2.74)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.73
#define Module_MajorVersion_CMHG 2.74
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 27 Nov 2011
#define Module_MajorVersion "2.73"
#define Module_Version 273
#define Module_MajorVersion "2.74"
#define Module_Version 274
#define Module_MinorVersion ""
#define Module_Date "27 Nov 2011"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "FileSwitch"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileSwitch"
#define Module_FullVersion "2.73"
#define Module_HelpVersion "2.73 (27 Nov 2011)"
#define Module_LibraryVersionInfo "2:73"
#define Module_FullVersion "2.74"
#define Module_HelpVersion "2.74 (27 Nov 2011)"
#define Module_LibraryVersionInfo "2:74"
......@@ -245,7 +245,7 @@ FSControl_FileInfo # 1 ; 32
FSControl_ReadFSName # 1 ; 33
FSControl_SetContexts # 1 ; 34
FSControl_RegisterImageFS # 1 ; 35 - Functions introduced post Risc OS 2.00 start here
FSControl_RegisterImageFS # 1 ; 35 - Functions introduced post RISC OS 2.00 start here
FSControl_DeRegisterImageFS # 1 ; 36
FSControl_CanonicalisePath # 1 ; 37
FSControl_InfoToFileType # 1 ; 38
......@@ -270,7 +270,8 @@ FSControl_ReadFreeSpace64 # 1 ; 55 - These introduced after RISC O
FSControl_DefectList64 # 1 ; 56
FSControl_AddDefect64 # 1 ; 57
FSControl_ROL_EnumerateHandles # 1 ; 58 - In RISC OS Select 1i9
FSControl_EnumerateHandles # 1 ; 58 - These introduced after RISC OS 5.16
FSControl_ROL_FileSwitchInfo # 1 ; 59 - In RISC OS Select 1i9 (undocumented)
FSControl_ROL_RunAbsolute # 1 ; 60 - In RISC OS Select 4
FSControl_ROL_RunUntyped # 1 ; 61 - In RISC OS Select 4
......
......@@ -93,7 +93,7 @@ FSControlEntry ROUT
JTE ReadFSNameEntry, FSControl_ReadFSName
JTE FSControl_BadReason, FSControl_SetContexts
; New reason codes introduced since 1.70
; New reason codes introduced since 1.70
JTE AddImageFSEntry, FSControl_RegisterImageFS
JTE RemoveImageFSEntry, FSControl_DeRegisterImageFS
JTE CanonicalisePathEntry, FSControl_CanonicalisePath
......@@ -118,6 +118,9 @@ FSControlEntry ROUT
JTE DefectList64Entry, FSControl_DefectList64
JTE AddDefect64Entry, FSControl_AddDefect64
; New reason code introduced since 2.73
JTE EnumerateHandlesEntry, FSControl_EnumerateHandles
FSControl_Max * (.-$JumpTableName) :SHR: 2
......@@ -2287,6 +2290,36 @@ AddDefect64Entry
BL JunkFileStrings
SwiExit
; EnumerateHandlesEntry. Top level FSControl entry
; =====================
; In r0 = 58
; r1 = last handle enumerated, or -1 to start
; Out r0 = stream status word
; r1 = handle number, or -1 for no more
; r2 = filing system info word
EnumerateHandlesEntry
NewSwiEntry "scb"
10
ADD r1, r1, #1
CMP r1, #MaxHandle
MOVHI r1, #-1
BHI %FT90
ADR r14, streamtable
LDR scb, [r14, r1, LSL #2]
ADRL r14, UnallocatedStream
CMP scb, r14
BEQ %BT10
LDR r0, scb_status
LDR r14, scb_fscb
LDR r2, [r14, #fscb_info]
90
SwiExit
; NameDiscEntry. Top level FSControl entry
; =============
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment