Commit 2fb3c39b authored by Neil Turton's avatar Neil Turton
Browse files

Import from SrcFiler

parent be383d87
;>Version Version file for FileCore
GBLS version
version SETS "2.91"
version SETS "2.97"
GBLA Version
Version SETA 291
Version SETA 297
GBLS date
date SETS "31 Mar 1995"
date SETS "24 Aug 1995"
GBLL test_version
test_version SETL {FALSE}
......
......@@ -743,6 +743,13 @@ MountDiscOnDrive ROUT
ASSERT DiscId :MOD: 4 = 0
ASSERT DiscName = DiscId + 2
STR lr, [r5, #DiscId]
[ BigDisc
STR lr, [r5,#DiscSize2]
[ BigShare
STR lr, [r5,#ShareSize]
]
]
; Set up a sensible pre-guess at the RootDir
[ DebugL
......@@ -761,11 +768,6 @@ MountDiscOnDrive ROUT
; as a hack to try to get floppies to mount - set DiscSize2 to 0
[ BigDisc
MOV lr, #0
STR lr, [r5,#DiscSize2]
]
; Mount the disc
Push "r2,r4"
MOVS r2, r1, ASL #(32-3)
......
......@@ -893,9 +893,10 @@ FindErrBlock ROUT
LDRVCB lr, FS_Id
ORRVC r1, r1, lr, ASL #8
BICVC r1, r1, #&ff000000
LDRVC lr, [sp, #20]
ANDVC lr, lr, #MaxDiscErr :SHL: 24
ORRVC r1, r1, lr
LDRVC lr, [sp, #40]
; ANDVC lr, lr, #MaxDiscErr :SHL: 24
LDRB lr, [lr, #0]
ORRVC r1, r1, lr, LSL #24
ADDVC r4, sp, #4
MOVVC r5, sp
ADDVC r6, sp, #8
......
......@@ -1033,6 +1033,51 @@ DiscAddToMapPtr ROUT
]
Pull "R0,R1,R3,PC"
; ===================
; ByteDiscAddToMapPtr
; ===================
;entry
; R0 disc address
; R10 ->map start
;exit
; R11 offset in map
; LR zone number
ByteDiscAddToMapPtr ROUT
Push "R0,R1,R3,LR"
[ DebugE
DREG R0, "ByteDiscAddToMapPtr(disc add:",cc
DREG R10, ", map:",cc
DLINE ")"
]
MOV R3, R0
BIC R0, R0, #DiscBits
LDRB R1, [R10,#ZoneHead+BitSize] ;scale from bytes to map bits
MOV R0, R0, LSR R1
ADD R0, R0, #Zone0Bits ;adjust for zone 0
LDRB R1, [R10,#ZoneHead+SectorSize]
MOV R3, #8
MOV R1, R3, LSL R1 ;total bits in a zone map
LDR R3, [R10,#ZoneHead+ZoneSpare-2]
MOV R3, R3, LSR #16
SUB R1, R1, R3 ;map bits actually used in a zone map
MOV R11,R0
BL Divide ;(R0,R1->R0,R1)
MOV LR, R0 ;zone
MLA R11,R3, R0, R11 ;add zone*spare, for non map bits
ADD R11,R11,#ZoneHead*8
[ DebugE
Push "R0"
DREG R11, "<-ByteDiscAddToMapPtr(map ptr:",cc
MOV R0, LR
DREG R0, "zone:",cc
DLINE ")"
Pull "R0"
]
Pull "R0,R1,R3,PC"
; =================
; CritInitReadNewFs
......
......@@ -44,7 +44,7 @@ EnsureFSLock ROUT
01
MOV r2, r2, LSR #29 ; get drive number
CMP r2, #4
CLRV
MOV r0,r0
Pull "r1,r2,pc",LO ; not hard disc - ignore
SWI &44781+(1:SHL:17) ; get the lock status
......@@ -691,10 +691,10 @@ DoSwiFloppyStructure ROUT
Push "R0-R11,LR"
[ Debug2
wrhex R0
wrhex R1
wrhex R2
mess ,">DoSwiFloppyStructure",NL
DREG R0, "", cc
DREG R1, ", ", cc
DREG R2, " ", cc
DLINE ">DoSwiFloppyStructure"
]
LDMIA SP, {R3,R4,R8,R9}
CMPS R8, #OldMapFlag
......@@ -707,7 +707,7 @@ DoSwiFloppyStructure ROUT
;BUILD OLD MAP
[ Debug2
mess ,"build old map",NL
DLINE "build old map"
]
ADDEQ LR, R1, #NewDirSize
ADDHI LR, R1, #OldDirSize
......@@ -772,7 +772,7 @@ DoSwiFloppyStructure ROUT
;BUILD NEW MAP
40
[ Debug2
mess ,"build new map",NL
DLINE "build new map"
]
ADD LR, R1, #NewDirSize
STR LR, [SP, #3*4] ;exit R3
......@@ -809,21 +809,18 @@ DoSwiFloppyStructure ROUT
BL WrLenBits ;(R0,R1,R10)
MOV R3, R11 ;init free start
[ BigDisc
LDR R0, [R4, #DiscSize]
Push "R1"
LDRB R1, [R10, #ZoneHead+SectorSize]
MOV R0, R0, LSR R1
RSB R1, R1, #32
LDR LR, [R4, #DiscSize2]
ORR R0, R0, LR, LSL R1
Pull "R1"
|
LDR R0, [R4, #DiscSize]
]
SUB R0, R0, #1
[ BigDisc
BL ByteDiscAddToMapPtr ;(R0,R10->R11,LR) (to fix RAMFS discs coming out truncated)
|
BL DiscAddToMapPtr ;(R0,R10->R11,LR)
]
ADD R2, R11,#1 ;disc end map ptr
BL AllocBitWidth ;(R10->LR)
SUB R5, LR, #1
BIC R2, R2, R5
......@@ -899,7 +896,7 @@ DoSwiFloppyStructure ROUT
;BUILD ROOT DIRECTORY
60
[ Debug2
mess ,"build $",NL
DLINE "build $"
]
LDR R2, [R4, #RootDir]
TSTS R8, #OldMapFlag
......
; Copyright 1996 Acorn Computers Ltd
;
; 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.
;
TTL ==> s.TokenHelp
;>HelpText
[ Version < 209
HelpBack
;= "*"
= "*",TokenEscapeChar,Token0," swaps ",TokenEscapeChar,Token5
= TokenEscapeChar,Token16,"previous ",TokenEscapeChar,Token3,"i"
= "es.", 13
;= TokenEscapeChar,Token0
;= " swaps current and previous directories.",13
SynBack
;= "Syntax: "
= TokenEscapeChar,Token1, 0
;= "*"
;= TokenEscapeChar,Token0
;= 0
]
[ International_Help=0
HelpBackup
;= "*"
= "*",TokenEscapeChar,Token0," copies one whole floppy "
= TokenEscapeChar,Token39,", (except ",TokenEscapeChar,Token33
= ")",TokenEscapeChar,Token40,"another.", 13
;= TokenEscapeChar,Token0
;= " copies one whole floppy disc, (except free space) to another.",13
SynBackup
;= "Syntax: "
= TokenEscapeChar,Token14,"source drive> <dest. drive> [Q]", 0
;= "*"
;= TokenEscapeChar,Token0
;= " <source drive> <dest. drive> [Q]"
;= 0
HelpBye
;= "*"
= "*",TokenEscapeChar,Token0," closes",TokenEscapeChar,Token38
= TokenEscapeChar,Token7,"s, unsets",TokenEscapeChar,Token38
= TokenEscapeChar,Token3,"ies,",TokenEscapeChar,Token16,"park"
= "s hard ",TokenEscapeChar,Token39,"s.", 13
;= TokenEscapeChar,Token0
;= " closes all files, unsets all directories, and parks hard discs.",13
SynBye
;= "Syntax: "
= TokenEscapeChar,Token1, 0
;= "*"
;= TokenEscapeChar,Token0
;= 0
HelpCheckMap
;= "*"
= "*",TokenEscapeChar,Token0," checks that",TokenEscapeChar,Token2
= "map of a new map ",TokenEscapeChar,Token39," has"
= TokenEscapeChar,Token2,"correct checksums,"
= TokenEscapeChar,Token16,"is consistent with"
= TokenEscapeChar,Token2,TokenEscapeChar,Token3,"y tree. If"
= " only one copy",TokenEscapeChar,Token41,"good it allows you"
= TokenEscapeChar,Token40,"rewrite",TokenEscapeChar,Token2,"o"
= "ther.", 13
;= TokenEscapeChar,Token0
;= " checks that the map of a new map disc has the correct checksums, and is consistent with the directory tree. If only one copy is good it allows you to rewrite the other.",13
SynCheckMap
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
HelpCompact
;= "*"
= "*",TokenEscapeChar,Token0," tries",TokenEscapeChar,Token40,"c"
= "ollect ",TokenEscapeChar,Token33,"s together by moving "
= TokenEscapeChar,Token7,"s.", 13
;= TokenEscapeChar,Token0
;= " tries to collect free spaces together by moving files.",13
SynCompact
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
HelpDefect
;= "*"
= "*",TokenEscapeChar,Token0," maps out a defect from a new map"
= " ",TokenEscapeChar,Token39," if it lies in an unallocated par"
= "t of",TokenEscapeChar,Token2,TokenEscapeChar,Token39,". Ot"
= "herwise it searches for",TokenEscapeChar,Token2
= TokenEscapeChar,Token37," containing",TokenEscapeChar,Token2
= "defect.", 13
;= TokenEscapeChar,Token0
;= " maps out a defect from a new map disc if it lies in an unallocated part of the disc. Otherwise it searches for the object containing the defect.",13
SynDefect
;= "Syntax: "
= TokenEscapeChar,Token14,TokenEscapeChar,Token39," spec.> <"
= TokenEscapeChar,Token39," add.>", 0
;= "*"
;= TokenEscapeChar,Token0
;= " <disc spec.> <disc add.>"
;= 0
HelpDismount
;= "*"
= "*",TokenEscapeChar,Token0," closes ",TokenEscapeChar,Token7
= "s, unsets ",TokenEscapeChar,Token3,"ies",TokenEscapeChar,Token16
= "parks",TokenEscapeChar,Token2,"given ",TokenEscapeChar,Token39
= ".", 13
;= TokenEscapeChar,Token0
;= " closes files, unsets directories and parks the given disc.",13
SynDismount
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
HelpDrive
;= "*"
= "*",TokenEscapeChar,Token0," ",TokenEscapeChar,Token19
= TokenEscapeChar,Token8,"drive",TokenEscapeChar,Token40,"use"
= " if",TokenEscapeChar,Token2,TokenEscapeChar,Token3,"y"
= TokenEscapeChar,Token41,"unset.", 13
;= TokenEscapeChar,Token0
;= " sets the default drive to use if the directory is unset.",13
SynDrive
;= "Syntax: "
= TokenEscapeChar,Token14,"drive>", 0
;= "*"
;= TokenEscapeChar,Token0
;= " <drive>"
;= 0
HelpFree
;= "*"
= "*",TokenEscapeChar,Token0,TokenEscapeChar,Token32
= TokenEscapeChar,Token2,"total ",TokenEscapeChar,Token33," o"
= "n a ",TokenEscapeChar,Token39,".", 13
;= TokenEscapeChar,Token0
;= " displays the total free space on a disc.",13
SynFree
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
HelpMap
;= "*"
= "*",TokenEscapeChar,Token0,TokenEscapeChar,Token32," a "
= TokenEscapeChar,Token39,"'s ",TokenEscapeChar,Token33," map."
= 13
;= TokenEscapeChar,Token0
;= " displays a disc's free space map.",13
SynMap
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
HelpMount
;= "*"
= "*",TokenEscapeChar,Token0," ",TokenEscapeChar,Token19
= TokenEscapeChar,Token3,"y",TokenEscapeChar,Token40,"the roo"
= "t ",TokenEscapeChar,Token3,"y of",TokenEscapeChar,Token2
= TokenEscapeChar,Token39,", ",TokenEscapeChar,Token19
= TokenEscapeChar,Token35," if unset",TokenEscapeChar,Token40,"$"
= ".Library if it exists,",TokenEscapeChar,Token16,"un"
= TokenEscapeChar,Token19,"URD.", 13,"The ",TokenEscapeChar,Token8
= "is",TokenEscapeChar,Token2,TokenEscapeChar,Token8,"drive."
= 13
;= TokenEscapeChar,Token0
;= " sets the directory to the root directory of the disc, sets the library if unset to $.Library if it exists, and unsets the URD.",13
;= "The default is the default drive.",13
SynMount
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
HelpNameDisc
HelpNameDisk
;= "*"
= "*",TokenEscapeChar,Token0," alters a ",TokenEscapeChar,Token39
= "'s ",TokenEscapeChar,Token11,".", 13
;= TokenEscapeChar,Token0
;= " alters a disc's name.",13
SynNameDisc
SynNameDisk
;= "Syntax: "
= TokenEscapeChar,Token14,TokenEscapeChar,Token39," spec.> <"
= TokenEscapeChar,Token39," ",TokenEscapeChar,Token11,">", 0
;= "*"
;= TokenEscapeChar,Token0
;= " <disc spec.> <disc name>"
;= 0
HelpVerify
;= "*"
= "*",TokenEscapeChar,Token0," checks",TokenEscapeChar,Token2
= "whole ",TokenEscapeChar,Token39,TokenEscapeChar,Token41,"re"
= "adable.", 13,"The ",TokenEscapeChar,Token8,"is"
= TokenEscapeChar,Token2,TokenEscapeChar,Token5," "
= TokenEscapeChar,Token39,".", 13
;= TokenEscapeChar,Token0
;= " checks the whole disc is readable.",13
;= "The default is the current disc.",13
SynVerify
;= "Syntax: "
= TokenEscapeChar,Token20, 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<disc spec.>]"
;= 0
|
HelpBackup DCB "HFLCBKU", 0
SynBackup DCB "SFLCBKU", 0
HelpBye DCB "HFLCBYE", 0
SynBye DCB "SFLCBYE", 0
HelpCheckMap DCB "HFLCCKM", 0
SynCheckMap DCB "SFLCCKM", 0
HelpCompact DCB "HFLCCOM", 0
SynCompact DCB "SFLCCOM", 0
HelpDefect DCB "HFLCDEF", 0
SynDefect DCB "SFLCDEF", 0
HelpDismount DCB "HFLCDIS", 0
SynDismount DCB "SFLCDIS", 0
HelpDrive DCB "HFLCDRV", 0
SynDrive DCB "SFLCDRV", 0
HelpFree DCB "HFLCFRE", 0
SynFree DCB "SFLCFRE", 0
HelpMap DCB "HFLCMAP", 0
SynMap DCB "SFLCMAP", 0
HelpMount DCB "HFLCMNT", 0
SynMount DCB "SFLCMNT", 0
HelpNameDisc
HelpNameDisk DCB "HFLCNDS", 0
SynNameDisc
SynNameDisk DCB "SFLCNDS", 0
HelpVerify DCB "HFLCVER", 0
SynVerify DCB "SFLCVER", 0
]
[ Version < 209
HelpNoDir
;= "*"
= "*",TokenEscapeChar,Token0," un",TokenEscapeChar,Token19
= TokenEscapeChar,Token5," ",TokenEscapeChar,Token3,"y.", 13
;= TokenEscapeChar,Token0
;= " unsets the current directory.",13
SynNoDir
;= "Syntax: "
= TokenEscapeChar,Token1, 0
;= "*"
;= TokenEscapeChar,Token0
;= 0
HelpNoLib
;= "*"
= "*",TokenEscapeChar,Token0," un",TokenEscapeChar,Token19
= TokenEscapeChar,Token35,".", 13
;= TokenEscapeChar,Token0
;= " unsets the library.",13
SynNoLib
;= "Syntax: "
= TokenEscapeChar,Token1, 0
;= "*"
;= TokenEscapeChar,Token0
;= 0
HelpNoURD
;= "*"
= "*",TokenEscapeChar,Token0," un",TokenEscapeChar,Token19,"UR"
= "D.", 13
;= TokenEscapeChar,Token0
;= " unsets the URD.",13
SynNoURD
;= "Syntax: "
= TokenEscapeChar,Token1, 0
;= "*"
;= TokenEscapeChar,Token0
;= 0
HelpTitle
;= "*"
= "*",TokenEscapeChar,Token0," ",TokenEscapeChar,Token19,"titl"
= "e of",TokenEscapeChar,Token2,TokenEscapeChar,Token5," "
= TokenEscapeChar,Token3,"y.", 13
;= TokenEscapeChar,Token0
;= " sets the title of the current directory.",13
SynTitle
;= "Syntax: "
= TokenEscapeChar,Token30,"<text>]", 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<text>]"
;= 0
HelpURD
;= "*"
= "*",TokenEscapeChar,Token0," ",TokenEscapeChar,Token19,"user"
= " root ",TokenEscapeChar,Token3,"y.", 13
;= TokenEscapeChar,Token0
;= " sets the user root directory.",13
SynURD
;= "Syntax: "
= TokenEscapeChar,Token30,"<",TokenEscapeChar,Token3,"y>]", 0
;= "*"
;= TokenEscapeChar,Token0
;= " [<directory>]"
;= 0
]
ALIGN
END
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