Commit d38bee6c authored by David Cotton's avatar David Cotton
Browse files

Comverted to use ObjASM and new shared makefiles.

Detail:
    Converted to use ObjASM and new shared makefiles. Added MkExp and MkRes
obey files.

Admin:
    Followed Stewarts guidelines for doing this work. Tested in a 32-bit
Lazarus build.

Version 0.23. Tagged as 'ResourceFS-0_23'
parent 32b200c7
......@@ -14,74 +14,21 @@
#
# Makefile for ResourceFS
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 25-May-94 AMcC Created.
# *************************************
# *** C h a n g e L i s t ***
# *************************************
# Date Name Description
# ---- ---- -----------
# 10-Apr-2001 DSC Created.
#
#
# Paths
#
EXP_HDR = <export$dir>
#
# Generic options:
#
MKDIR = cdir
AS = aasm
CP = copy
RM = remove
CCFLAGS = -c -depend !Depend -IC:
ASFLAGS = -depend !Depend -Stamp -quit -module -To $@ -From
CPFLAGS = ~cfr~v
#
# Program specific options:
#
COMPONENT = ResourceFS
SOURCE = s.ResourceFS
TARGET = rm.ResourceFS
EXPORTS = ${EXP_HDR}.${COMPONENT}
#
# Generic rules:
#
rom: ${TARGET}
@echo ${COMPONENT}: rom module built
export: ${EXPORTS}
@echo ${COMPONENT}: export complete
install_rom: ${TARGET}
${CP} ${TARGET} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom module installed
clean:
${RM} ${TARGET}
@echo ${COMPONENT}: cleaned
resources: resources-${CMDHELP}
@echo ${COMPONENT}: resource files copied
resources_common:
${MKDIR} ${RESDIR}.${COMPONENT}
TokenCheck LocalRes:Messages
${CP} LocalRes:Messages ${RESDIR}.${COMPONENT}.Messages ${CPFLAGS}
resources-None: resources_common
@
resources-: resources_common
TokenCheck LocalRes:Messages
print LocalRes:CmdHelp { >> ${RESDIR}.${COMPONENT}.Messages }
${TARGET}: ${SOURCE}
${AS} ${ASFLAGS} ${SOURCE}
HEADER1=ResourceFS
${EXP_HDR}.${COMPONENT}: hdr.${COMPONENT}
${CP} hdr.${COMPONENT} $@ ${CPFLAGS}
include StdTools
include AAsmModule
# Dynamic dependencies:
| Copyright 2001 Pace Micro Technology plc
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine export_hdrs
amu_machine export_libs
| Copyright 2001 Pace Micro Technology plc
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine resources
......@@ -8,11 +8,17 @@
GBLS Module_FullVersion
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
Module_MajorVersion SETS "0.22"
Module_Version SETA 22
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.23"
Module_Version SETA 23
Module_MinorVersion SETS ""
Module_Date SETS "04 Jul 2000"
Module_ApplicationDate2 SETS "04-Jul-00"
Module_ApplicationDate4 SETS "04-Jul-2000"
Module_FullVersion SETS "0.22"
Module_Date SETS "10 Apr 2001"
Module_ApplicationDate2 SETS "10-Apr-01"
Module_ApplicationDate4 SETS "10-Apr-2001"
Module_ComponentName SETS "ResourceFS"
Module_ComponentPath SETS "RiscOS/Sources/FileSys/ResourceFS/ResourceFS"
Module_FullVersion SETS "0.23"
Module_HelpVersion SETS "0.23 (10 Apr 2001)"
END
/* (0.22)
/* (0.23)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.22
#define Module_MajorVersion_CMHG 0.23
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Jul 2000
#define Module_Date_CMHG 10 Apr 2001
#define Module_MajorVersion "0.22"
#define Module_Version 22
#define Module_MajorVersion "0.23"
#define Module_Version 23
#define Module_MinorVersion ""
#define Module_Date "04 Jul 2000"
#define Module_Date "10 Apr 2001"
#define Module_ApplicationDate2 "04-Jul-00"
#define Module_ApplicationDate4 "04-Jul-2000"
#define Module_ApplicationDate2 "10-Apr-01"
#define Module_ApplicationDate4 "10-Apr-2001"
#define Module_FullVersion "0.22"
#define Module_ComponentName "ResourceFS"
#define Module_ComponentPath "RiscOS/Sources/FileSys/ResourceFS/ResourceFS"
#define Module_FullVersion "0.23"
#define Module_HelpVersion "0.23 (10 Apr 2001)"
......@@ -24,7 +24,7 @@
; Out: r0 -> Translated error block or another error (token no found etc.)
; All other registers preserved, V always set, other flags undefined
copy_error_one ENTRY "r2-r7"
copy_error_one Entry "r2-r7"
BL open_message_file ; Ensure file is open
EXIT VS ; Return the error
......@@ -47,7 +47,7 @@ message_filename
; OSS Open the messages file if it is closed.
open_message_file ENTRY "r0-r2"
open_message_file Entry "r0-r2"
LDR r1 , message_file_open
TEQ r1, #0 ; Check the open flag
EXIT NE ; Return - it is open
......
......@@ -47,6 +47,9 @@
; 25-Apr-00 0.21 KJB Made 32-bit compatible.
; 04-Jul-00 0.22 JRF Fixed !Test+ followed by !Test added bug.
;
AREA |ResourceFS$$Code|, CODE, READONLY, PIC
Module_BaseAddr
GET Hdr:ListOpts
......@@ -91,7 +94,6 @@ allowbooting SETL true
hostvdu SETL false
LEADR Module_LoadAddr
TAB * 9
LF * 10
......@@ -250,8 +252,7 @@ StartedCallback Entry "r0-r9"
; In R0 -> set of files to register
SWIROMFS_RegisterFiles ENTRY "R1"
SWIROMFS_RegisterFiles Entry "R1"
BL registerfiles
BLVC Issue_Service_ResourceFSStarted
EXIT
......@@ -261,8 +262,7 @@ SWIROMFS_RegisterFiles ENTRY "R1"
; In R0 -> set of files to be registered
; R3 -> workspace (called from Service_ResourceFSStarting)
SVCROMFS_RegisterFiles ENTRY "R12"
SVCROMFS_RegisterFiles Entry "R12"
MOV R12, R3 ; R3 = workspace pointer
BL registerfiles
......@@ -273,7 +273,7 @@ SVCROMFS_RegisterFiles ENTRY "R12"
; In R0 -> set of files to be registered
; R12 -> workspace
registerfiles ENTRY "R1-R3"
registerfiles Entry "R1-R3"
Debug rg,"ResourceFS_RegisterFiles:",R0
......@@ -308,7 +308,7 @@ registerfiles ENTRY "R1-R3"
; In R0 -> set of files to deregister
SWIROMFS_DeregisterFiles ENTRY "R1-R2"
SWIROMFS_DeregisterFiles Entry "R1-R2"
Debug rg,"ResourceFS_DeregisterFiles:",R0
......@@ -346,7 +346,7 @@ SWIROMFS_DeregisterFiles ENTRY "R1-R2"
; [R2, #link_data] = R0
; No match: R2 = 0
findlink_r0 ENTRY
findlink_r0 Entry
ADR R1, ROMFSFileData - link_next
......@@ -397,7 +397,7 @@ fsinfoword DCD fsnumber_resourcefs :OR: fsinfo_readonly
; ROMFS_Init - Initialisation entry
;
ROMFS_Init ENTRY
ROMFS_Init Entry
LDR R2, [R12] ; have we got workspace yet ?
TEQ R2, #0
......@@ -452,7 +452,7 @@ ROMFS_Init ENTRY
; Declare ResourceFS: to FileSwitch (called on Init and Service_FSRedeclare)
ROMFS_Declare ENTRY "R1-R3"
ROMFS_Declare Entry "R1-R3"
MOV R0, #FSControl_AddFS ; add this filing system
addr R1, Module_BaseAddr
......@@ -467,7 +467,7 @@ ROMFS_Declare ENTRY "R1-R3"
SVC_ReadUpperCaseTable
LDR R12,[R12]
ReadUpperCaseTable ENTRY
ReadUpperCaseTable Entry
MOV r0, #-1
SWI XTerritory_UpperCaseTable
MOVVS r0, #0
......@@ -481,7 +481,7 @@ ReadUpperCaseTable ENTRY
;
; Deallocate link blocks, issue Service_ResourceFSDying and FSControl_RemoveFS
ROMFS_Die ENTRY
ROMFS_Die Entry
LDR R12, [R12] ; R12 -> workspace
......@@ -798,7 +798,7 @@ QuickIndexFind Entry "r0,r2-r10"
; This causes all directories to be re-scanned!
; It's hard to work out which directories are being created / deleted
modifyingfiles ENTRY "R0-R10"
modifyingfiles Entry "R0-R10"
LDR R8, fsinfoword ; R8 = fs info word
MOV R9, R0 ; R9 = reason code
......@@ -822,7 +822,7 @@ null DCB 0
; out: R0-R6, R12 corrupted
;
ResourceFS_Code ENTRY
ResourceFS_Code Entry
MOV R0, #FSControl_SelectFS
addr R1, StringROM ; ADR or ADRL as appropriate
SWI XOS_FSControl ; select filing system
......@@ -862,7 +862,7 @@ ROMFS_UService
LDR R12, [R12]
svc_fsredeclare ENTRY "R0-R3"
svc_fsredeclare Entry "R0-R3"
BL ROMFS_Declare ; else redeclare myself
......@@ -876,7 +876,7 @@ svc_fsredeclare ENTRY "R0-R3"
; R1-R? parameters
;
ROMFS_OSFile ENTRY
ROMFS_OSFile Entry
Debug fs, "ResourceFS:OS_File"
TEQ R0, #fsfile_Load
BEQ %FT10 ; load file
......@@ -959,7 +959,7 @@ ReadOnlyError
; in: R0 = reason code
;
ROMFS_FSFunc ENTRY
ROMFS_FSFunc Entry
Debug fs,"FSFunc",R0
......@@ -1007,8 +1007,8 @@ ROMFS_FSFunc ENTRY
EXIT
runboot = "*Run &.!Boot", 0 ; OPT 4 2
ALIGN
]
30
; No disc name, no boot option
MOV r0, #0
......@@ -1125,7 +1125,7 @@ romfs_fsfunc_readdirentriesinfo ROUT
; R6 -> special field (irrelevant)
;
ROMFS_Open ENTRY
ROMFS_Open Entry
CMP R0, #fsopen_Update
BHI NotSupportedError
TEQ R0, #fsopen_ReadOnly
......@@ -1160,7 +1160,7 @@ ROMFS_Close ROUT
; FileSwitch will not call this with R4 > file length, but R4+R3 can be
;
ROMFS_MediaToBuffer ENTRY
ROMFS_MediaToBuffer Entry
LDR R14,[R1,#-4] ; R14 = file length + 4
SUB R14,R14,#4 ; R14 = file length
......@@ -1206,7 +1206,7 @@ ROMFS_MediaToBuffer ENTRY
; R6 -> actual filename
;
FindFile ENTRY
FindFile Entry
BL FindFileOrDirectory
TEQ R0, #2
......@@ -1214,7 +1214,7 @@ FindFile ENTRY
EXIT
FindFileOrDirectory ENTRY
FindFileOrDirectory Entry
LDRB r14, [r1]
TEQ r14, #"$"
......@@ -1344,7 +1344,7 @@ stk_R1 * 1 * 4 ; OSS Used to pick name up for errors
stk_R2 * 2 * 4 ; stack positions for return
stk_R4 * 3 * 4
FindDirEntry ENTRY "R0,R1,R2,R4,R9-R11"
FindDirEntry Entry "R0,R1,R2,R4,R9-R11"
MOV R0, R1 ; R0 -> file name
......@@ -1425,7 +1425,7 @@ returndirentry
; Out GT if R10 > R11, or (R10 or R11 is null)
; LE if R10 <= R11
compare_R10_R11 ENTRY "R1,R2"
compare_R10_R11 Entry "R1,R2"
Internat_UpperCaseLoad R2
......@@ -1470,13 +1470,13 @@ compare_R10_R11 ENTRY "R1,R2"
; in: R1 -> wildcarded pathname
; out: R1 -> pathname, with "$.", "@.", "%." or "\." removed
skipdollar ENTRY
skipdollar Entry
LDRB R14, [R1]
CMP R14, #"$"
CMPNE R14, #"@"
CMPNE R14, #"%"
CMPNE R14, #"\"
CMPNE R14, #"\\"
EXIT NE
LDRB R14, [R1, #1]
......@@ -1499,7 +1499,7 @@ skipdollar ENTRY
; NB: new version also matches names whose leading pathnames match the wildcard spec.
;
WildMatch ENTRY "R0-R3"
WildMatch Entry "R0-R3"
Internat_UpperCaseLoad R10
......
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