Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
F
FileSys
ResourceFS
ResourceFS
Commits
2372513e
Commit
2372513e
authored
Apr 25, 2000
by
Kevin Bracey
Browse files
Made 32-bit compatible.
Version 0.21. Tagged as 'ResourceFS-0_21'
parent
6137f039
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
82 deletions
+64
-82
VersionASM
VersionASM
+10
-10
VersionNum
VersionNum
+9
-9
s/ResourceFS
s/ResourceFS
+45
-63
No files found.
VersionASM
View file @
2372513e
;
; This file is automatically maintained by srccommit, do not edit manually.
;
GBLS
Module_MajorVersion
GBLA Module_Version
GBLS
Module_MinorVersion
GBLS
Module_Date
GBLS
Module_FullVersion
Module_MajorVersion
SETS "0.2
0
"
Module_Version SETA 2
0
Module_MinorVersion
SETS
""
Module_Date
SETS "04 Aug 1999
"
Module_FullVersion SETS "0.2
0
"
GBLS
Module_MajorVersion
GBLA Module_Version
GBLS
Module_MinorVersion
GBLS
Module_Date
GBLS
Module_FullVersion
Module_MajorVersion
SETS "0.2
1
"
Module_Version SETA 2
1
Module_MinorVersion
SETS
""
Module_Date
SETS "25 Apr 2000
"
Module_FullVersion SETS "0.2
1
"
END
VersionNum
View file @
2372513e
/* (0.2
0
)
/* (0.2
1
)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG
0.2
0
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG
04 Aug 1999
#define Module_MajorVersion_CMHG
0.2
1
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG
25 Apr 2000
#define Module_MajorVersion
"0.2
0
"
#define Module_Version 2
0
#define Module_MinorVersion
""
#define Module_Date
"04 Aug 1999
"
#define Module_MajorVersion
"0.2
1
"
#define Module_Version 2
1
#define Module_MinorVersion
""
#define Module_Date
"25 Apr 2000
"
#define Module_FullVersion "0.2
0
"
#define Module_FullVersion "0.2
1
"
s/ResourceFS
View file @
2372513e
...
...
@@ -43,6 +43,8 @@
; 08-Sep-98 0.17 KJB Cope with registrations above &80000000.
; 09-Sep-98 0.18 KJB Optimise word-aligned case of data reads.
; 19-Oct-98 0.19 KJB Don't need to GET Hdr:CMOS.
; 04-Aug-99 0.20 KJB Ursula branch merged (service call table)
; 25-Apr-00 0.21 KJB Made 32-bit compatible.
;
Module_BaseAddr
...
...
@@ -156,7 +158,10 @@ MySWIBase * Module_SWISystemBase + ResourceFSSWI * Module_SWIChunkSi
DCD
0
[
International_Help
<>
0
DCD
message_filename
-
Module_BaseAddr
|
DCD
0
]
DCD
ROMFS_Flags
-
Module_BaseAddr
ROMFS_HelpStr
=
"ResourceFS"
,
TAB
,
"
$Module_MajorVersion
(
$Module_Date
)"
...
...
@@ -166,6 +171,13 @@ ROMFS_HelpStr
=
0
ALIGN
ROMFS_Flags
[
No32bitCode
DCD
0
|
DCD
ModuleFlag_32bit
]
ROMFS_HC_Table
Command
ResourceFS
,
0
,
0
,
International_Help
&
0
...
...
@@ -231,7 +243,7 @@ StartedCallback Entry "r0-r9"
MOV
r1
,
#
Service_ResourceFSStarted
SWI
XOS_ServiceCall
Debug
init
,
"StartedCallBack:complete"
EXIT
S
EXIT
; *****************************************************************************
...
...
@@ -460,7 +472,7 @@ ReadUpperCaseTable ENTRY
MOVVS
r0
,
#
0
STR
r0
,
UpperCaseTable
BL
JunkQuickIndexBlock
EXIT
S
EXIT
; *****************************************************************************
;
...
...
@@ -508,18 +520,22 @@ ROMFS_Die ENTRY
STR
R0
,
message_file_block
+
12
TEQ
R12
,
#
0
LDRNE
R2
,
ROMFSFileData
TEQNE
R2
,
#
0
01
LDRNE
R3
,
[
R2
,
#
link_next
]
STRNE
R3
,
ROMFSFileData
; remove link
MOVNE
R0
,
#
upfsfile_Delete
; tell the Filer
BLNE
modifyingfiles
; (preserves flags)
MOVNE
R0
,
#
ModHandReason_Free
SWINE
XOS_Module
MOVNES
R2
,
R3
BEQ
%FT05
LDR
R2
,
ROMFSFileData
TEQ
R2
,
#
0
BEQ
%FT05
01
LDR
R3
,
[
R2
,
#
link_next
]
STR
R3
,
ROMFSFileData
; remove link
MOV
R0
,
#
upfsfile_Delete
; tell the Filer
BL
modifyingfiles
MOV
R0
,
#
ModHandReason_Free
SWI
XOS_Module
MOVS
R2
,
R3
BNE
%BT01
MOV
R1
,#
Service_ResourceFSDying
; Resources: is disappearing!
05
MOV
R1
,#
Service_ResourceFSDying
; Resources: is disappearing!
SWI
XOS_ServiceCall
Debug
die
,
"Service_ResourceFSDying done"
...
...
@@ -530,7 +546,8 @@ ROMFS_Die ENTRY
Debug
die
,
"FSControl_RemoveFS done"
EXITS
; return V clear
CLRV
EXIT
; return V clear
; *****************************************************************************
;
...
...
@@ -549,7 +566,7 @@ JunkQuickIndexBlock Entry "r0,r2"
CMP
r2
,
r14
MOVNE
r0
,
#
ModHandReason_Free
SWINE
XOS_Module
EXIT
S
VC
EXIT
VC
STR
r0
,
[
sp
]
EXIT
...
...
@@ -558,7 +575,7 @@ JunkQuickIndexBlock Entry "r0,r2"
; ConstructQuickIndexBlock
;
; In - quick index block junked
; Out - and quick index block constructed
; Out - and quick index block constructed
. Ignore exit V.
;
ConstructQuickIndexBlock
Entry
"r0-r5,r7-r9"
...
...
@@ -592,7 +609,7 @@ ConstructQuickIndexBlock Entry "r0-r5,r7-r9"
MOV
r3
,
r9
,
ASL
#
2
; 4 bytes for index
ADD
r3
,
r3
,
#
4
; for the number of entries
SWI
XOS_Module
EXIT
S
VS
; Doesn't matter if fails - simply works slowly
EXIT
VS
; Doesn't matter if fails - simply works slowly
MOV
r8
,
r2
; the index
STR
r9
,
[
r2
]
; number of entries
...
...
@@ -659,7 +676,7 @@ ConstructQuickIndexBlock Entry "r0-r5,r7-r9"
MOV
r0
,
#
ModHandReason_Free
SWI
XOS_Module
EXIT
S
EXIT
85
; Error from OS_HeapSort - junk both arrays
...
...
@@ -674,7 +691,7 @@ ConstructQuickIndexBlock Entry "r0-r5,r7-r9"
SWI
XOS_Module
; Errors not important - just run slowly
EXIT
S
EXIT
QuickIndexCompare
Entry
"r4,r5"
Internat_UpperCaseLoad
LR
...
...
@@ -751,7 +768,7 @@ QuickIndexFind Entry "r0,r2-r10"
CMP
r3
,
#
0
BNE
%BT20
30
MOVHS
r10
,
pc
; preserve last HS result we got
SavePSR
r10
,
HS
; preserve last HS result we got
MOVLO
r6
,
r5
50
MOVS
r7
,
r7
,
LSR
#
1
...
...
@@ -763,7 +780,7 @@ QuickIndexFind Entry "r0,r2-r10"
SUB
r8
,
r8
,
#
1
CMP
r8
,
r6
ADDHS
r6
,
r6
,
#
1
TEQHSP
pc
,
r10
RestPSR
r10
,
HS
LDR
r1
,
[
r9
,
r6
,
ASL
#
2
]
DebugS
quickindex
,
"Found:"
,
r1
Debug
quickindex
,
"Final results:"
,
r6
,
r8
,
r10
...
...
@@ -788,8 +805,8 @@ modifyingfiles ENTRY "R0-R10"
MOV
R6
,
#
0
; no special field
MOV
R0
,
#
UpCall_ModifyingFile
SWI
XOS_UpCall
; ignore errors
EXIT
S
CLRV
EXIT
null
DCB
0
ALIGN
...
...
@@ -848,7 +865,7 @@ svc_fsredeclare ENTRY "R0-R3"
BL
ROMFS_Declare
; else redeclare myself
EXIT
S
EXIT
; *****************************************************************************
;
...
...
@@ -945,12 +962,6 @@ ROMFS_FSFunc ENTRY
Debug
fs
,
"FSFunc"
,
R0
[
{FALSE}
; RISC SO 3.00: Cat done by FileSwitch
TEQ
R0
,
#
fsfunc_Cat
BEQ
%FT10
]
; Do nothing on *Dir to keep FileSwitch happy
TEQ
r0
,
#
fsfunc_Dir
EXIT
EQ
...
...
@@ -1008,35 +1019,6 @@ runboot = "*Run &.!Boot", 0 ; OPT 4 2
STRB
r0
,
[
r2
,
#
1
]
EXIT
[
{FALSE}
; RISC OS 3.00: Cat done by FileSwitch
; *cat
; in: R1 -> dirname (ignored)
;
10
Debug
fs
,
"*Cat: R1 ="
,
R1
LDR
R3
,
ROMFSFileData
; head of chain
20
CMP
R3
,
#
0
; no more chunks?
EXIT
EQ
LDR
R1
,
[
R3
,
#
link_data
]
11
LDR
R2
,
[
R1
,
#
ROMFile_Offset
]
; end of list within chunk?
TEQ
R2
,
#
0
LDREQ
R3
,
[
R3
,
#
link_next
]
BEQ
%BT20
ADD
R0
,
R1
,
#
ROMFile_Name
SWI
XOS_Write0
SWIVC
XOS_NewLine
ADDVC
R1
,
R1
,
R2
BVC
%BT11
EXIT
]
; .............................................................................
; in: R1 -> wildcarded directory name
...
...
@@ -1152,7 +1134,7 @@ ROMFS_Open ENTRY
MOV
R3
,
R4
; size of file
MOV
R2
,
#
&100
; buffer size
MOV
R0
,
#
fsopen_ReadPermission
EXIT
S
EXIT
; *****************************************************************************
;
...
...
@@ -1162,7 +1144,7 @@ ROMFS_Open ENTRY
;
ROMFS_Close
ROUT
MOV
S
PC
,
R14
MOV
PC
,
R14
; *****************************************************************************
;
...
...
@@ -1198,7 +1180,7 @@ ROMFS_MediaToBuffer ENTRY
STRNE
R0
,
[
R2
],
#
4
SUBS
R3
,
R3
,
#
4
BNE
%BT03
EXIT
S
EXIT
05
TEQ
R3
,
#
0
10
...
...
@@ -1206,7 +1188,7 @@ ROMFS_MediaToBuffer ENTRY
STRNEB
R0
,
[
R2
],
#
1
SUBS
R3
,
R3
,
#
1
BNE
%BT10
EXIT
S
EXIT
; *****************************************************************************
;
...
...
@@ -1261,7 +1243,7 @@ FindFileOrDirectory ENTRY
TEQ
r0
,
#
0
BLEQ
ConstructQuickIndexBlock
LDR
r0
,
QuickIndexBlock
TEQ
r0
,
#
0
CMP
r0
,
#
0
; clear V (just in case)
BEQ
%FT30
; Check for wildcards in filename
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment