Commit 1c2087e9 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

assert -> ASSERT.

Collapse old switches.
Remove 'Version' GBLA.
*COUNT summary now says "total 1234 bytes" not "1234 bytes" to match *COPY
Empty *COUNT syntax message corrected.
Binary identical to last version (messages different clearly).

Version 2.72. Tagged as 'FileSwitch-2_72'
parent 5a88813f
......@@ -71,7 +71,6 @@ Wipe_Help = "HFLSWIP",0
Wipe_Syntax = "SFLSWIP",0
]
[ Version >= 170
Back_Help = "HFLSBCK",0
Back_Syntax = "SFLSBCK",0
......@@ -86,7 +85,6 @@ NoURD_Syntax = "SFLSNUR",0
NoLib_Help = "HFLSNLB",0
NoLib_Syntax = "SFLSNLB",0
]
FileSystem_Help = "HFLSCFS",0
FileSystem_Syntax = "SFLSCFS",0
......@@ -396,7 +394,6 @@ Wipe_Syntax
= TokenEscapeChar,Token0
= " <file spec> [<options>]",0
]
[ Version >= 170
Back_Help
= "*"
= TokenEscapeChar,Token0
......@@ -442,17 +439,18 @@ NoLib_Help
= TokenEscapeChar,Token0
= " unsets the library directory on the temporary filing system."
= 13
NoLib_Syntax
= "Syntax: *"
= TokenEscapeChar,Token0
= 0
]
FileSystem_Help
= "*Configure "
= TokenEscapeChar,Token0
= " sets the default filing system."
= 13
FileSystem_Syntax
= "Syntax: *Configure "
= TokenEscapeChar,Token0
......
No preview for this file type
......@@ -57,8 +57,8 @@ Cc0:Count file %0
Cc1:Count directory %0
Cc2:File %0 counted, %2
Cc3:Directory %0 counted, %2
Cc4/Cc6/Cc7:%0 files counted, %1
Cc5:%0 file counted, %1
Cc4/Cc6/Cc7:%0 files counted, total %1
Cc5:%0 file counted, total %1
BadDisc:Disc not understood - has it been formatted?
Wild:'%0' contains wild cards
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "2.71"
Module_Version SETA 271
Module_MajorVersion SETS "2.72"
Module_Version SETA 272
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.71"
Module_HelpVersion SETS "2.71 (27 Nov 2011)"
Module_FullVersion SETS "2.72"
Module_HelpVersion SETS "2.72 (27 Nov 2011)"
END
/* (2.71)
/* (2.72)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.71
#define Module_MajorVersion_CMHG 2.72
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 27 Nov 2011
#define Module_MajorVersion "2.71"
#define Module_Version 271
#define Module_MajorVersion "2.72"
#define Module_Version 272
#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.71"
#define Module_HelpVersion "2.71 (27 Nov 2011)"
#define Module_LibraryVersionInfo "2:71"
#define Module_FullVersion "2.72"
#define Module_HelpVersion "2.72 (27 Nov 2011)"
#define Module_LibraryVersionInfo "2:72"
......@@ -175,8 +175,6 @@ OSFile_LoadNoPath * 16 ; No nonsense load
OSFile_ReadNoPath * 17 ; No nonsense read
OSFile_SetType * 18
OSFile_MakeError * 19
; OS_Files introduced in 1.70 FileSwitch
OSFile_ReadWithType * 20 ; Uses File$Path
OSFile_ReadWithTypePath * 21 ; Uses supplied path
OSFile_ReadWithTypePathVar * 22 ; Uses supplied path var
......@@ -354,8 +352,6 @@ OSGBPB_ReadCSDEntries # 1 ; 8
OSGBPB_ReadDirEntries # 1 ; 9
OSGBPB_ReadDirEntriesInfo # 1 ; 10
OSGBPB_ReadDirEntriesCatInfo # 1 ; 11
; These introduced in FileSwitch 1.70:
OSGBPB_ReadDirEntriesFileType # 1 ; 12
......
......@@ -101,7 +101,6 @@ Ex_Code ALTENTRY
MOV r4, #FSControl_Ex
B %BT50
[ Version >= 170
Back_Code ALTENTRY
MOV r4, #FSControl_Back
......@@ -126,7 +125,6 @@ NoLib_Code ALTENTRY
MOV r4, #FSControl_NoLib
B %BA50
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Construct a file consisting of name,CR ... out of the given dir
......
......@@ -566,13 +566,11 @@ SGetLinkedTransientArea ALTENTRY
SGetLinkedString Entry "r0, r2-r4"
[ Version >= 170
TEQ r1, #NULL
TEQNE r1, #Nowt
MOVEQ r14, #NULL
STREQ r14, [r0]
EXIT EQ
]
MOV r4, #space-1
......@@ -601,7 +599,6 @@ SGetLinkedString_excludingspaces ALTENTRY
MOV r4, #space
B %BT05
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; SNewLinkedString
......@@ -620,7 +617,6 @@ SNewLinkedString Entry
BL SFreeLinkedString
BLVC SGetLinkedString
EXIT
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -682,7 +678,6 @@ SFreeLinkedArea EntryS "r0, r2"
EXITS VC ; Restore caller V
EXIT ; VSet
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; SFreeLinkedString
......@@ -699,7 +694,6 @@ SFreeLinkedString EntryS
STRVC r14, [r0]
EXITS VC
EXIT
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -859,7 +853,6 @@ strlenTS ALTENTRY
B %BT05
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; strlen_accumulate, strlenTS_accumulate
......@@ -890,7 +883,6 @@ strlenTS_accumulate ALTENTRY
B %BT10
]
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -949,7 +941,6 @@ strcpyTS ALTENTRY ; Match with strcatTS !!!
B %BT10
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; strcat_advance, strcatTS_advance
......@@ -984,9 +975,9 @@ strcat_advance EntryS "r2, r4"
EXITS
[ False ; Not used
; ............................................................................
[ False
strcatTS_advance ALTENTRY
B %BT05
......@@ -1012,7 +1003,6 @@ strcpy_advance ALTENTRY
strcpyTS_advance ALTENTRY ; Match with strcatTS_advance !!!
B %BT10
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -1046,7 +1036,6 @@ strchr Entry
BICS pc, lr, #Z_bit ; NE
]
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; strcmp
......@@ -1090,7 +1079,6 @@ strcmp Entry "r1-r4"
BNE %BT10
MOVS r3, #0 ; EQ
EXIT
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......
......@@ -14,10 +14,6 @@
;
SUBT > Sources.FSControl
[ Version >= 176
; remove earlier condition-outs for ease of maintainability
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; + +
; + F S C O N T R O L S W I +
......@@ -476,7 +472,7 @@ Run_TransientFile
; Use a save area on the front of the code block for these.
; r10-r12 assumed to be preserved by the main SWI handler.
assert transient_savearea = 0
ASSERT transient_savearea = 0
[ SASTMhatbroken
STMIA r2!,{r6-r9}
STMIA r2, {r13,r14}^ ; Must preserve r13_usr and r14_usr
......
......@@ -115,13 +115,11 @@
; bit24 = 1 -> fsfunc_SetContexts supported
; bit24 = 0 -> fsfunc_SetContexts not supported
[ Version >= 170
; bit23 = 1 -> All extensions for MultiFS support are supported.
; These are (when I wrote this comment):
; fsfunc_CanonicaliseSpecialAndDisc
; fsfunc_ResolveWildcard
; bit23 = 0 -> They aren't
]
; bit16 = 1 -> This filing system is read only
; = 0 -> It isn't - it's read/write instead.
......@@ -287,7 +285,7 @@ AddFSEntry NewSwiEntry "r0-r8, fscb"
addr r7, Lowlevel_UnsupportedFSEntry
ADD r8, r7, #(Lowlevel_UnalignedFSEntry-Lowlevel_UnsupportedFSEntry)
assert FS_open = fscb_open ; Must be in the same order at the same offset !
ASSERT FS_open = fscb_open ; Must be in the same order at the same offset !
MOV r1, #FS_open ; First entry to copy
15 LDR r0, [r6, r1] ; Src = entry point offset
......@@ -316,11 +314,9 @@ AddFSEntry NewSwiEntry "r0-r8, fscb"
STRB r0, [r3], #1
BHI %BT20
[ Version >= 170
; Zero the MultiFS file list
MOV r0, #Nowt
STR r0, [r2, #fscb_FirstImagescb]
]
TEQ fscb, #Nowt ; New block to link to head of chain ?
LDREQ r14, fschain
......@@ -379,7 +375,6 @@ AddSecondaryFSEntry NewSwiEntry "r0, r1, r3, fscb"
50
SwiExit
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; AddImageFSEntry. Top level FSControl entry
......@@ -446,7 +441,7 @@ AddImageFSEntry NewSwiEntry "r0-r8, fscb"
addr r7, Lowlevel_UnsupportedFSEntry
ADD r8, r7, #(Lowlevel_UnalignedFSEntry-Lowlevel_UnsupportedFSEntry)
assert IFS_open = fscb_open ; Must be in the same order at the same offset !
ASSERT IFS_open = fscb_open ; Must be in the same order at the same offset !
MOV r1, #IFS_open ; First entry to copy
15 LDR r0, [r6, r1] ; Src = entry point offset
......@@ -487,7 +482,6 @@ AddImageFSEntry NewSwiEntry "r0-r8, fscb"
99
SwiExit
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
......@@ -676,7 +670,6 @@ IsFSNameTerm
MOV pc, lr
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; PoliceFSNameWithError
......@@ -702,7 +695,6 @@ PoliceFSNameWithError Entry "r0"
; Check terminator is valid
BL IsFSNameTerm
EXIT EQ
]
90 addr r0, ErrorBlock_BadFilingSystemName
BL CopyError
......@@ -737,15 +729,9 @@ SelectFSEntry NewSwiEntry "r0, r1, r2, r3, fscb"
BEQ %FA20 ; SwiExit ; No error if selecting by number
10
[ Version >= 170
MOV r2, fscb
BL SetCurrentFS
BLVC SetTempFS
|
STR fscb, currentfs ; Select it if so
STR fscb, tempfs
]
20
SwiExit
......@@ -779,10 +765,6 @@ PrintFilingSystemText Entry "r0-r5, r6, fscb" ; FSFunc only preserves r6 up
[ debugcontrol
DLINE "FS startup banner: ",cc
]
[ Version >= 170
|
LDR fscb, currentfs
]
CMP fscb, #Nowt ; No msg if no sel fs
EXIT EQ ; VClear
......@@ -821,13 +803,9 @@ PrintFilingSystemText Entry "r0-r5, r6, fscb" ; FSFunc only preserves r6 up
BootupFSEntry NewSwiEntry "r0-r5, r6, fscb" ; FSFunc only preserves r6 up
[ Version >= 170
BL ReadCurrentFS
SwiExit VS
MOV fscb, r0
|
LDR fscb, currentfs
]
CMP fscb, #Nowt ; VClear
[ debugcontrol
BEQ %FT01
......@@ -877,7 +855,6 @@ RemoveFSEntry NewSwiEntry "r0, r1, r3, fscb"
70
SwiExit
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; RemoveImageFSEntry. Top level FSControl entry
......@@ -907,8 +884,6 @@ RemoveImageFSEntry NewSwiEntry "r0, r1, r3, fscb"
70
SwiExit
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; RemoveFS
......@@ -929,10 +904,8 @@ RemoveFS Entry "r0, r2"
DSTRING r1,"Removing Filing System "
Pull r1
]
[ Version >= 170
; Close all open files on this filing system
BL CloseAllFilesOnThisFS
]
ADR r0, (fschain-fscb_link) ; Find your fscb first
......@@ -1166,11 +1139,7 @@ DecodeFileType Entry "r0-r2, r4" ; Result r2 poked into stack
ADR r0, dft_varname ; Point at string again
ADR r1, dft_result ; Lookup that variable please
MOV r2, #?dft_result ; Read into stack frame
[ Version >= 170
addr r3, anull
|
ADR r3, %FT66 ; Null string (shared)
]
BL SReadVariable ; VS -> exists, buffer overflow. Tough
BVS %FT99 ; Get out
BEQ %FT50 ; [null expansion -> Unknown file type]
......@@ -1389,13 +1358,11 @@ ShutDownEntry NewSwiEntry "r0-r5, r6, fscb" ; FSFunc only preserves r6 up
Pull r1
01
]
[ Version >= 170
; MultiFS filing systems don't understand shutting down as such
LDRB r14, [fscb, #fscb_info]
TEQ r14, #0
LDREQ fscb, [fscb, #fscb_link] ; Do next fs then
BEQ %BA10
]
MOV r0, #fsfunc_ShutDown
MOV r6, #0 ; Use current context
......@@ -1432,13 +1399,11 @@ LookForAGoodTerm Entry "r0, r2, r4"
20 LDRB r0, [r2], #1
CMP r0, #space+1 ; Need explicit end of name check
EXIT LO ; LO -> NE
[ Version >= 170
TEQ r0, #","
BNE %FT30
MOVS r0, #1 ; Set NE on encountering a ,
EXIT
30
]
CMP r0, r4
BNE %BT20
......@@ -1662,7 +1627,6 @@ PoliceNameWithError Entry
]
EXIT
[ Version >= 170
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;
; PoliceSpecial
......@@ -1686,7 +1650,6 @@ PoliceSpecial Entry "r0,r1"
10
CLRV
EXIT
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Returns EQ if not allowed in a filename component or device name, NE if ok
......
......@@ -13,8 +13,6 @@
; limitations under the License.
;
SUBT > Sources.FSPath
[ Version >= 170
; The entire contents of this file were introduced in version 1.70
; These routines are concerned with the management of resolving a path
;
......@@ -848,5 +846,5 @@ FSPath_CopyNextPrefix Entry "r0,r2"
BNE %BT20
B %BT10
]
END
......@@ -371,13 +371,6 @@ CopyEntry NewSwiEntry "r0-r10",copy ; CopyWildObject destroys all regs
BL Util_FreeFileStrings_R8 ; 'Cos it's nice to print verbose bits
BL Util_FreeFileStrings_R7 ; Catch errors from these on SwiExit
[ Version >= 170
; These strings were freed before we started
|
BL SFreePassedFilenameAndSpecial_delinked
BL SFreePassedFilename2AndSpecial2_delinked ; second string set
]
LDR r14, globalerror ; Give 'Not found' if no error below
CMP r14, #0 ; fp is valid, of course ...
LDREQ r14, util_ndir ; and no dirs or files copied
......@@ -395,7 +388,7 @@ CopyEntry NewSwiEntry "r0-r10",copy ; CopyWildObject destroys all regs
TST r14, #util_deletesrc
ADREQ r1, fsw_copied_total
ADRNE r1, fsw_moved_total
BL Util_FilesDone ; eg. '3 files copied, 123456 bytes'
BL Util_FilesDone ; eg. '3 files copied, total 1234 bytes'
90 BLVS CopyErrorExternal ; ep for below
......@@ -433,20 +426,10 @@ CopyEntry NewSwiEntry "r0-r10",copy ; CopyWildObject destroys all regs
85 BL Util_FreeFileStrings_R8 ; Early deallocation errors
86
[ Version >= 170
; These strings weren't kept around
|
BL SFreePassedFilenameAndSpecial_delinked ; normal string set
]
87
BL Util_FreeFileStrings_R7
[ Version >= 170
; These strings weren't kept around
|
BL SFreePassedFilename2AndSpecial2_delinked ; second string set
]
B %FA99 ; SwiExit
......@@ -515,12 +498,10 @@ CopyWildObject Entry
TEQEQ r0, #0
BNE %FA80
[ Version >= 170
; Check for source being wild - do unwildcard copy if non-wildcard
MOV r1, r9
BL Util_CheckWildName
BNE %FT90
]
MOV r14, #0
STR r14, util_direntry ; Start at the beginning of dir
......@@ -579,7 +560,6 @@ CopyWildObject Entry
; punter wants more than that
90
[ Version >= 170
; Use src leafname for dst if dst has a '*' leafname
LDRB r14, [r10]
TEQ r14, #"*"
......@@ -593,9 +573,7 @@ CopyWildObject Entry
]
MOVEQ r0, #0
MOVNE r0, #-1 ; Use dst leafname
|
MOV r0, #-1 ; Use both leafnames in fullname build
]
BL Copy_MakeFullnames
EXIT VS
......@@ -1004,7 +982,6 @@ CopyFile Entry
]
STR r2, copy_area
[ Version >= 170
; Get the load parameters
ASSERT copy_name = 0
LDMIA r7, {r1,r6,fscb}
......@@ -1023,12 +1000,6 @@ CopyFile Entry
; Don't need the nice name any more
MOV sp, r5
BVS %FT95 ; Deallocate block
|
; ***^ LDR r2, copy_area
MOV r0, #fsfile_Load
BL CallFSFile_Given_R7 ; Will load at r2
BVS %FT95 ; Deallocate block
]
LDR r14, util_bitset
TST r14, #util_peekdest
......@@ -1053,24 +1024,16 @@ CopyFile Entry
LDRVC r4, copy_area ; So that we can save a word here
ADDVC r5, r4, r5 ; r5 = end address in core (order)
; r4 = start address in core
[ Version >= 170
MOVVC r0, #object_nothing ; Fib, but we've already checked
BLVC AssessDestinationForPath
BLVC int_DoSaveFile
|
MOVVC r0, #fsfile_Save
BLVC CallFSFile_Given ; Must be on dest
]
BVS %FT95 ; Deallocate block
LDR r14, util_bitset ; Copying attributes ?
TST r14, #util_noattr
LDREQ r5, util_attr
[ Version >= 170
MOVEQ r0, #fsfile_WriteInfo ; Write correct attributes (with correct info)
|
MOVEQ r0, #fsfile_WriteAttr ; Write correct attributes
]
BLEQ CallFSFile_Given ; Still on dest
40 ; ................ Common end for both copy mechanisms .....................
......@@ -1305,7 +1268,6 @@ CopyFile Entry
88
[ Version >= 170
MOV r0, #fsfile_ReadInfo ; Pick up the old attributes
BL CallFSFile_Given
ADRVC lr, fileblock_length
......@@ -1313,13 +1275,6 @@ CopyFile Entry
LDRVC r2, util_load
LDRVC r3, util_exec
MOV r0, #fsfile_WriteInfo ; Write them back modified
|
MOV r0, #fsfile_WriteExec
LDR r3, util_exec ; Always copy over load,exec in reverse
BL CallFSFile_Given ; order so that load addr DeadMeat
MOVVC r0, #fsfile_WriteLoad ; until this final op -> file ok
LDRVC r2, util_load
]
89
BLVC CallFSFile_Given
......@@ -1397,16 +1352,9 @@ CopyDirectory Entry
BEQ %FT50 ; time and just looks plain silly
; Don't change access either. Dubious
[ Version >= 170
; Ensure we're set up for this object
BL Copy_PromptDest
BL EnsureCanonicalObject
|
MOV r0, #fsfile_ReadInfo ; Exists already ?
BL Copy_PromptDest
BLVC CallFSFile_Given
EXIT VS
]
CMP r0, #object_file
BHI %FT20 ; If a dir, don't ask to recreate
......@@ -1427,7 +1375,7 @@ CopyDirectory Entry
LDR r14, util_bitset ; Copying attributes ?
TST r14, #util_noattr
[ Version >= 170
BNE %FT50
LDR r2, util_load
LDR r3, util_exec
......@@ -1442,13 +1390,6 @@ CopyDirectory Entry
BL CallFSFile_Given
EXIT VS
|
LDREQ r5, util_attr
MOVEQ r0, #fsfile_WriteAttr ; Write correct attributes
BLEQ CallFSFile_Given ; Still on dest
EXIT VS
]
50 ; Copy contents of dir, saving info on stack
......@@ -1732,14 +1673,12 @@ fsw_already_exists_and_is_locked_confirm DCB "CC10", 0
; EQ -> do it
90 MOV r5, #(read_attribute+write_attribute)
[ Version >= 170
; Zap load and exec to deadmeat too
LDR r2, DeadMeat
MOV r3, r2
MOV r0, #fsfile_WriteInfo
|
MOV r0, #fsfile_WriteAttr
]
BL CallFSFile_Given ; Got to dest already
CMPVC r0, r0 ; EQ -> do it
EXIT
......
......@@ -58,11 +58,6 @@ WipeEntry NewSwiEntry "r0-r10",utils ; WipeWildObject may destroy all regs
BL Util_FreeFileStrings_R7 ; Catch errors from these on SwiExit
; 'Cos it's nice to print ...
[ Version >= 170
; Now freed in Util_CommonStart
|
BL SFreePassedFilenameAndSpecial ; Ditto
]
LDR r14, globalerror ; Give 'Not found' if no error below
CMP r14, #0 ; fp is valid, of course ...
......@@ -269,7 +264,7 @@ WipeFile Entry
LDR r5, util_attr
TST r5, #locked_attribute ; Is it locked ?
[ Version >= 170
MOVNE r0, #fsfile_WriteInfo ; Keep other attributes, except attr, unchanged
LDRNE r2, util_load
LDRNE r3, util_exec
......@@ -277,10 +272,6 @@ WipeFile Entry
;attributes, esp L (non-0 to get
; around some FSs taking no write to
; mean locked)
|
MOVNE r5, #0 ; Take out all attributes, esp L
MOVNE r0, #fsfile_WriteAttr ; attr := r5
]
BLNE CallFSFile_Given_R7 ; Only if neccessary
50 MOVVC r0, #fsfile_Delete
......
......@@ -57,18 +57,13 @@ CountEntry NewSwiEntry "r0-r1, r4-r10",utils
BL Util_FreeFileStrings_R7 ; Catch errors from these on SwiExit
; 'Cos it's nice to print ...
[ Version >= 170
; These are now freed in Util_CommonStart
|
BL SFreePassedFilenameAndSpecial ; Ditto
]
LDR r14, util_bitset
TST r14, #util_printok
BEQ %FT95 ; [skip printing]
ADR r1, fsw_files_counted
BL Util_FilesDone ; Say '65 files counted, 12345 bytes'
BL Util_FilesDone ; Say '65 files counted, total 1234 bytes'
BLVS CopyErrorExternal
......@@ -433,7 +428,6 @@ Util_CommonStart Entry
STR r14, util_nskipped
STR r14, util_totalsize
[ Version >= 170
BL Process_WildPathname
EXIT VS
[ debugutil
......@@ -468,34 +462,6 @@ Util_CommonStart Entry
EXIT
;90
; addr r0, MagicErrorBlock_PlainNotFound
; LDR r1, PassedFilename
; BL MagicCopyError
; BL JunkFileStrings
; EXIT
|
; Set up the first name in PassedFilename/SpecialField - common to all three
BL TransNameSetFSAndPolice ; Molest the string
EXIT VS ; Nothing allocated
BL Util_MakeFileStrings
BLVS SFreePassedFilenameAndSpecial ; Deallocate if error
[ debugutil
EXIT VS
DLINE "Setting up r7 util block"
]
ADRVC r7, util_block
STRVC r0, [r7, #copy_dirprefix]
STRVC r1, [r7, #copy_leafname]
STRVC r2, [r7, #copy_special]
STRVC r3, [r7, #copy_fscb]
EXIT
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Prints tagged string with %0=util_nfiles in decimal and %1=util_totalsize
; in convert-file-size. NewLine appended
......@@ -720,7 +686,6 @@ Util_AppendLeafToDir Entry "r1-r4"
LDR r1, [r0, #copy_leafname] ; Can't have null leafname
01
[ Version >= 170
Push "r1"
; Calculate the length
......@@ -758,58 +723,6 @@ Util_AppendLeafToDir Entry "r1-r4"
]
EXIT
|
MOV r4, r1 ; Remember for below
BL strlen
[ debugutil
DSTRING r1,"leafname ",cc
DREG r3,", nchars "
]
LDR r1, [r0, #copy_dirprefix] ; Can have null dirprefix
[ debugutil
DSTRING r1, "dirprefix ",cc
CMP r1, #0
BEQ %FT50
Push r3
BL strlen
DREG r3,", nchars "
Pull r3
]
CMP r1, #0
BEQ %FT50
ADD r2, r3, #2 ; '.' + \0
BL strlen
ADD r3, r3, r2 ; Allocate dir + leaf + sep + term
BL SMustGetArea
STRVC r2, [r0, #copy_name]
MOVVC r1, r2
LDRVC r2, [r0, #copy_dirprefix]
BLVC strcpy
ADRVC r2, %FT96
BLVC strcat
MOVVC r2, r4 ; fujj for *copy fred.jim bert.*
BLVC strcat
[ debugutil
DSTRING r1,"Dir+Name = "
]
EXIT
50 ; Null dirprefix, so just copy leafname as fullname
ADD r3, r3, #1 ; \0
BL SMustGetArea ; Allocate leaf + 1
STRVC r2, [r0, #copy_name]
MOVVC r1, r2
MOVVC r2, r4
BLVC strcpy
[ debugutil
DSTRING r1,"<NullDir>+Name = "
]
EXIT
]
96
DCB ".", 0
ALIGN
......@@ -1525,9 +1438,7 @@ Util_DecrementDirEntry EntryS
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Out r0 = result (if any)
[ Version >= 170
; assumes that the destination is already assessed
]
CallFSFile_Given_R7 Entry "r0-r6, fscb"
......
......@@ -75,17 +75,17 @@ ReportJumpTableError SETL {FALSE}
MACRO
$label ReadStreamInfo $bcb
assert :INDEX: scb_status = 0 ; For LDM
assert fileptr > status
assert scb_fileptr = scb_status + 4
assert extent > fileptr
assert scb_extent = scb_fileptr + 4
assert bufmask > extent
assert scb_bufmask = scb_extent + 4
ASSERT :INDEX: scb_status = 0 ; For LDM
ASSERT fileptr > status
ASSERT scb_fileptr = scb_status + 4
ASSERT extent > fileptr
ASSERT scb_extent = scb_fileptr + 4
ASSERT bufmask > extent
ASSERT scb_bufmask = scb_extent + 4
[ "$bcb" <> ""
assert bcb > bufmask
assert scb_bcb = scb_bufmask + 4
assert $bcb = bcb
ASSERT bcb > bufmask
ASSERT scb_bcb = scb_bufmask + 4
ASSERT $bcb = bcb
$label LDMIA scb, {status, fileptr, extent, bufmask, bcb}
|
$label LDMIA scb, {status, fileptr, extent, bufmask}
......@@ -163,12 +163,10 @@ space * " "
quote * """"
solidus * "|"
delete * &7F
CR * 13
NULL * 0
Nowt * &40000000 ; Such that CMP ptr, #Nowt gives VClear
; &80000000 is a very BAD choice !
[ Version >= 170
NULL * 0
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Register allocation
......@@ -191,7 +189,7 @@ fscb RN r10 ; Filing System cb^
; sp RN r13 ; FD SVC stack^
; lr RN r14
assert fp + 1 = wp ; For LDMIA rn, {fp, wp} in LowLevel
ASSERT fp + 1 = wp ; For LDMIA rn, {fp, wp} in LowLevel
; *****************************************************************************
; *** Enter a vectored SWI handler saving registers, fp but not lr (already ***
......@@ -232,7 +230,7 @@ Proc_LocalStack SETA $extra.localframesize
]
$label ROUT
|
assert (.-Module_BaseAddr :AND: 3) = 0
ASSERT (.-Module_BaseAddr :AND: 3) = 0
]
Push "$Proc_RegList"
[ "$savecode" = ""
......@@ -630,7 +628,7 @@ gbpb_fileptr # 4
! 1,"FileSwitch frame sizes out by ":CC:(:STR:(:INDEX:@)):CC:" bytes"
]
assert :INDEX: @ = 0 ; Local frames must all end here
ASSERT :INDEX: @ = 0 ; Local frames must all end here
; *****************************************************************************
; *** ***
......@@ -640,6 +638,9 @@ gbpb_fileptr # 4
; Header bits for gluing into Arthur ROM or running standalone in RAM
AREA |FileSwitch$$Code|, CODE, READONLY, PIC
ENTRY
Module_BaseAddr * .
DCD 0 ; Not an application
......@@ -661,12 +662,9 @@ Module_BaseAddr * .
]
GBLS FileSwitchMinor
[ Version = 154
FileSwitchMinor SETS "/01" ; for consistency with release version
]
FileSwitch_HelpText
DCB "FileSwitch", TAB, "$Module_MajorVersion.$FileSwitchMinor ($Module_Date)"
DCB "FileSwitch", 9, "$Module_MajorVersion.$FileSwitchMinor ($Module_Date)"
[ anyfiledebug
DCB " Debugging version"
]
......@@ -702,13 +700,11 @@ FileSwitch_HC_Table ; Name Max Min
[ haswipe
Command Wipe, &FF, 1, International_Help ; Interprets options on line
]
[ Version >= 170
Command Back, 0, 0, International_Help
Command URD, 1, 0, International_Help
Command NoDir, 0, 0, International_Help
Command NoURD, 0, 0, International_Help
Command NoLib, 0, 0, International_Help
]
; Configuration commands
......@@ -890,13 +886,13 @@ fsw_varcount SETA fsw_varcount + 4
BEQ %FT40
CMP r14, #CR ; End of variable name ?
BNE %BT25 ; r7 -> variable value
[ Version >= 164
LDRB r4, [r7] ; see if next char = var type
CMP r4, #CR
ADDLO r7, r7, #1 ; r7 -> variable value to set
MOVHS r4, #VarType_String ; default type
Push "r4" ; <== save for later
]
MOV r5, r7 ; Find start of next variable name
30 LDRB r14, [r5], #1
CMP r14, #CR ; End of variable value ?
......@@ -970,19 +966,6 @@ CountOptsVariableNameCR DCB "Count$Options", CR
CountOptsVariableDefault DCB "~C R ~V", CR
]
; ************************** Aliases for Print actions ************************
; (need space on end of ones without %*1 to get syntax error out of command
; line decoder; would just append to file arg otherwise)
[ Version >= 159 :LAND: Version < 165
DCB "Alias$@PrintType_AFF", CR
DCB "DeskFS:$.Apps.!Draw.!Run -Print %*0", CR
DCB "Alias$@PrintType_FF9", CR
DCB "DeskFS:$.Apps.!Paint.!Run -Print %*0", CR
]
; ************************** Aliases for Run actions **************************
; (need space on end of ones without %*1 to get syntax error out of command
......@@ -991,17 +974,10 @@ CountOptsVariableDefault DCB "~C R ~V", CR
; No run action for BBC BBC ROM
; FE0 DeskUtil
[ Version >= 159 :LAND: Version < 165
DCB "Alias$@RunType_AFF", CR
DCB "DeskFS:$.Apps.!Draw.!Run %*0", CR
]
; FE1..FE9 not yet allocated
[ Version >= 157
DCB "Alias$@RunType_FEA", CR ; Desktop
DCB "Desktop -file %*0", CR
]
DCB "Alias$@RunType_FEB", CR ; Obey
DCB "Obey %0 ", CR
......@@ -1016,11 +992,6 @@ CountOptsVariableDefault DCB "~C R ~V", CR
; FF0..FF1 not yet allocated
[ Version >= 159 :LAND: Version < 165
DCB "Alias$@RunType_FF2", CR
DCB "DeskFS:$.Apps.!Configure.!Run %*0", CR
]
; FF3 not yet allocated
; No run action for FF4 PrintOut
......@@ -1035,16 +1006,8 @@ CountOptsVariableDefault DCB "~C R ~V", CR
; No run action for FF8 Absolute (can't be aliased)
DCB "Alias$@RunType_FF9", CR
[ Version >= 164 :LAND: Version < 165
DCB VarType_Macro
DCB "If ""<Wimp$State>""=""commands"" Then ScreenLoad %*0 Else DeskFS:$.Apps.!Paint.!Run %*0", CR
|
[ Version >= 159 :LAND: Version < 165
DCB "DeskFS:$.Apps.!Paint.!Run %*0", CR
|
DCB "ScreenLoad %0 ", CR
]
]
DCB "Alias$@RunType_FFA", CR ; Module
DCB "RMRun %*0", CR
......@@ -1058,20 +1021,7 @@ CountOptsVariableDefault DCB "~C R ~V", CR
DCB "Exec %0 ", CR
DCB "Alias$@RunType_FFF", CR ; Text
[ Version >= 164 :LAND: Version < 165
DCB VarType_Macro
DCB "If ""<Wimp$State>""=""commands"" Then Type %*0 Else DeskFS:$.Apps.!Edit.!Run %*0", CR
|
[ Version >= 159 :LAND: Version < 165
DCB "DeskFS:$.Apps.!Edit %*0", CR
|
[ Version >= 155
DCB "Type %0 ", CR
|
DCB "Exec %0 ", CR
]
]
]
; *********************** Aliases for Load actions ****************************
......@@ -1121,24 +1071,19 @@ CountOptsVariableDefault DCB "~C R ~V", CR
DCB "File$Type_BBC", CR
DCB "BBC ROM", CR
[ Version >= 259
DCB "File$Type_F95", CR
DCB "Code", CR
]
[ Version >= 225
DCB "File$Type_FAE", CR ; AMcC 27-Feb-95: for Toolbox
DCB "Resource", CR
]
; FE0 DeskUtil deprecated
; FE1..FE9 not yet allocated
[ Version >= 157
DCB "File$Type_FEA", CR
DCB "Desktop", CR
]
DCB "File$Type_FEB", CR
DCB "Obey", CR
......@@ -1153,7 +1098,6 @@ CountOptsVariableDefault DCB "~C R ~V", CR
; FF0..FF1 not yet allocated
[ Version >= 159
DCB "File$Type_FF2", CR
DCB "Config", CR
......@@ -1161,7 +1105,6 @@ CountOptsVariableDefault DCB "~C R ~V", CR
DCB "File$Type_FF4", CR
DCB "Printout", CR
]
DCB "File$Type_FF5", CR
DCB "PoScript", CR
......@@ -1264,7 +1207,7 @@ ReadCaseTables EntryS
; I think I can survive RMTidy now !
FileSwitch_Die Entry "fp"
assert fp <> r10
ASSERT fp <> r10
MOV fp, #0 ; No frame, so don't set globalerror
LDR wp, [r12]
......
......@@ -90,9 +90,9 @@ hasutil SETL hascopy :LOR: haswipe :LOR: hascount
GET Hdr:UserIF.<UserIF>
GET Hdr:ImageSize.<ImageSize>
[ :LNOT: No26bitCode ; Get brutal with 32-bitness - use 26-bit code unless we really mustn't,
No32bitCode SETL {TRUE} ; as 32-bit is a performance drain. Can't softload FileSwitch really,
] ; anyway.
[ :LNOT: No26bitCode ; Get brutal with 32-bitness - use 26-bit code unless
No32bitCode SETL {TRUE} ; we really mustn't, as 32-bit is a performance drain.
] ; Can't really softload FileSwitch anyway.
GET Hdr:CMOS
GET Hdr:ModHand
......@@ -104,41 +104,18 @@ No32bitCode SETL {TRUE} ; as 32-bit is a performance drain. Can't
GET Hdr:Variables
GET Hdr:EnvNumbers
GET Hdr:Proc
GET Hdr:PublicWS ; Import ScratchSpace, DomainId
GET Hdr:PublicWS ; Import ScratchSpace
GET Hdr:Tokens
GET Hdr:FileTypes
GET Hdr:VduExt
GET Hdr:UpCall
GET Hdr:LowFSi
GET Hdr:LowFSI
GET Hdr:Wimp ; It happens to us all in the end ...
GET Hdr:MsgTrans
GET Hdr:Territory
GET Hdr:OSRSI6
GET Hdr:OSRSI6 ; Import DomainId
GET VersionASM
GBLA Version
Version SETA Module_Version
OPT OptList + OptPage
[ False
AREA FileSwitch, CODE, READONLY, RELOCATABLE
EXPORT BGetEntry
EXPORT BPutEntry
|
AREA |FileSwitch$$Code|, CODE, READONLY, PIC
]
ENTRY
TAB * 09
LF * 10
CR * 13
MACRO
assert $condition
[ :LNOT: ($condition)
! 1,"assert failed: $condition"
]
MEND
END
......@@ -911,10 +911,8 @@ CallFSFunc_Given Entry "r6-r12", 8 ; Never (ever) trust lower level routines
; &C0: open for update
; r1 -> filename, 0
; r3 = FileSwitch handle allocated to the embryo stream
[ Version >= 170
; r6 = Pointer to special field or file handle as appropriate
; fscb set for the file to open
]
; NB. r0 = 0 is NOT a valid parm for CallFSOpen ! Use CallFSClose instead
......@@ -1497,7 +1495,7 @@ CallFSCommon ROUT
MOVEQS pc, lr ; Skip op if no stream (VClear)
]
assert scb_fscb = scb_fshandle + 4
ASSERT scb_fscb = scb_fshandle + 4
ADR r1, scb_fshandle
LDMIA r1, {r1, fscb} ; Get real FS handle and fscb^
......
......@@ -234,7 +234,7 @@ FileArgs_ImageStampIs
MOVVC fileptr, extent
50 STMVCIA scb, {status, fileptr, extent} ; Update info exit
assert :INDEX: scb_status = 0
ASSERT :INDEX: scb_status = 0
[ appendhandle
......
......@@ -45,15 +45,15 @@ BGetEntry ROUT ; Make do without a frame in cache section
Proc_RegList SETS "scb, bcb, $streaminfo, fp"
Proc_LocalStack SETA localframesize
assert bcb = r8
assert scb > r8
ASSERT bcb = r8
ASSERT scb > r8
Push "r8, scb, fp" ; Note the nastiness
assert :INDEX: BGet_shiftedbase = 0
assert :INDEX: BGet_bufferdata = 4
assert :INDEX: BGet_scb = 8
assert :INDEX: BGet_shift = 12
assert :INDEX: BGet_handle = 16
ASSERT :INDEX: BGet_shiftedbase = 0
ASSERT :INDEX: BGet_bufferdata = 4
ASSERT :INDEX: BGet_scb = 8
ASSERT :INDEX: BGet_shift = 12
ASSERT :INDEX: BGet_handle = 16
LDMIA wp, {r0, r8, scb, fp, r14} ; Get cached data
[ No26bitCode
TEQ r14, r1 ; BGet on cached handle ?
......@@ -127,7 +127,7 @@ Proc_LocalStack SETA localframesize
BIC r14, fileptr, bufmask ; Cache if not now in end sector
BIC r4, extent, bufmask
CMP r4, r14
assert fileptr = r4 ; Not needed anymore
ASSERT fileptr = r4 ; Not needed anymore
[ debugosbgetcache
BEQ %FT66
DLINE "Setting up BGet cache"
......@@ -290,15 +290,15 @@ Proc_LocalStack SETA localframesize
]
; r7 used as temp anyway in BPut, so it's free to abuse here !
assert bcb = r8
assert scb > r8
ASSERT bcb = r8
ASSERT scb > r8
Push "r7, bcb, scb, fp" ; Note the nastiness
; BPut_shiftedbase ; r7
assert BPut_bufferdata = BPut_shiftedbase + 4 ; r8
assert BPut_scb = BPut_shiftedbase + 8 ; scb
assert BPut_shift = BPut_shiftedbase + 12 ; fp
assert BPut_handle = BPut_shiftedbase + 16 ; r14
ASSERT BPut_bufferdata = BPut_shiftedbase + 4 ; r8
ASSERT BPut_scb = BPut_shiftedbase + 8 ; scb
ASSERT BPut_shift = BPut_shiftedbase + 12 ; fp
ASSERT BPut_handle = BPut_shiftedbase + 16 ; r14
ADR r14, BPut_shiftedbase ; Can't be as nasty as BGet
LDMIA r14, {r7, r8, scb, fp, r14} ; Get cached data
TEQ r14, r1 ; BPut on cached handle ?
......@@ -509,7 +509,7 @@ InvalidateBGetCache ROUT
20 ADR r1, BGet_shiftedbase
assert :INDEX: BGet_shiftedbase = 0 ; Don't have to fart around with expr's
ASSERT :INDEX: BGet_shiftedbase = 0 ; Don't have to fart around with expr's
30 LDR r14, =DeadHandle
STR r14, [r1, #:INDEX: BGet_handle] ; Invalidate handle
......
......@@ -14,10 +14,6 @@
;
SUBT > Sources.OSFile - Whole file operations
[ Version >= 176
; remove earlier version conditionals to ease maintenance
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; + +
; + F I L E S W I +
......@@ -58,9 +54,7 @@
; 21 ReadWithTypePath
; 22 ReadWithTypePathVar
; 23 ReadWithTypeNoPath
[ Version >= 176
; 24 ReadBlockSize
]
; Out VC : r1 preserved
; Load and ReadInfo ops return
......@@ -136,9 +130,7 @@ FileEntry NewSwiEntry "r0-r5, r6-r10" ; Results poked into stack; was r0-r5, r6
JTE Read_UseGivenLoadPath, OSFile_ReadWithTypePath
JTE Read_UseGivenLoadPathVar, OSFile_ReadWithTypePathVar
JTE Read_UseNoLoadPath, OSFile_ReadWithTypeNoPath
[ Version >= 176
JTE Read_BlockSize, OSFile_ReadBlockSize
]
OSFile_BadOp
addr r0, ErrorBlock_BadOSFileReason
......@@ -204,7 +196,6 @@ DoneTheRead
STR r6, [fp, #6*4]
B UpdatingJunkStringsOSFileExit
[ Version >= 176
Read_BlockSize
ADR r0, PassedFilename
MOV r2, #NULL
......@@ -236,8 +227,6 @@ Read_BlockSize
STRVC r2, [fp, #2*4]
B JunkStringsOSFileExit
]
LoadActionPrefix DCB "Alias$@LoadType_", 0
ALIGN
......
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