Commit bd8a7284 authored by Robert Sprowson's avatar Robert Sprowson

Swap out some more constants for symbolic names

* OsBytes
* Application start &8000
* Fixed disc density
* Unused a4 macro deleted
* Redundant 'todo', 'Help, 'Syntax' removed

Version 3.53. Not tagged
parent 66f1eef3
Todo for BigMaps:
Lots and lots and lots.
Backup:*Backup copies one whole floppy disc, (except free space) to another.|MSyntax: *Backup <source drive> <dest. drive> [Q]
Bye:*Bye closes all files, unsets all directories, and parks hard discs.|MSyntax: *Bye
CheckMap:*CheckMap 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.|MSyntax: *CheckMap [<disc spec.>]
Compact:*Compact tries to collect free spaces together by moving files.|MSyntax: *Compact [<disc spec.>]
Defect:*Defect 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.|MSyntax: *Defect <disc spec.> <disc add.>
Dismount:*Dismount closes files, unsets directories and parks the given disc.|MSyntax: *Dismount [<disc spec.>]
Drive:*Drive sets the default drive to use if the directory is unset.|MSyntax: *Drive <drive>
Free:*Free displays the total free space on a disc.|MSyntax: *Free [<disc spec.>]
Map:*Map displays a disc's free space map.|MSyntax: *Map [<disc spec.>]
Mount:*Mount sets the directory to the root directory of the disc, sets the library if unset to $.Library if it exists, and unsets the URD.|MThe default is the default drive.|MSyntax: *Mount [<disc spec.>]
NameDisk:*NameDisk alters a disc's name.|MSyntax: *NameDisk <disc spec.> <disc name>
NameDisc:*NameDisk alters a disc's name.|MSyntax: *NameDisc <disc spec.> <disc name>
Verify:*Verify checks the whole disc is readable.|MThe default is the current disc.|MSyntax: *Verify [<disc spec.>]
Backup:Syntax: *Backup <source drive> <dest. drive> [Q]
Bye:Syntax: *Bye
CheckMap:Syntax: *CheckMap [<disc spec.>]
Compact:Syntax: *Compact [<disc spec.>]
Defect:Syntax: *Defect <disc spec.> <disc add.>
Dismount:Syntax: *Dismount [<disc spec.>]
Drive:Syntax: *Drive <drive>
Free:Syntax: *Free [<disc spec.>]
Map:Syntax: *Map [<disc spec.>]
Mount:Syntax: *Mount [<disc spec.>]
NameDisk:Syntax: *NameDisk <disc spec.> <disc name>
NameDisc:Syntax: *NameDisc <disc spec.> <disc name>
Verify:Syntax: *Verify [<disc spec.>]
......@@ -14,10 +14,10 @@
Module_MajorVersion SETS "3.53"
Module_Version SETA 353
Module_MinorVersion SETS ""
Module_Date SETS "21 Oct 2012"
Module_ApplicationDate SETS "21-Oct-12"
Module_Date SETS "28 Oct 2012"
Module_ApplicationDate SETS "28-Oct-12"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.53"
Module_HelpVersion SETS "3.53 (21 Oct 2012)"
Module_HelpVersion SETS "3.53 (28 Oct 2012)"
END
......@@ -6,18 +6,18 @@
*/
#define Module_MajorVersion_CMHG 3.53
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 21 Oct 2012
#define Module_Date_CMHG 28 Oct 2012
#define Module_MajorVersion "3.53"
#define Module_Version 353
#define Module_MinorVersion ""
#define Module_Date "21 Oct 2012"
#define Module_Date "28 Oct 2012"
#define Module_ApplicationDate "21-Oct-12"
#define Module_ApplicationDate "28-Oct-12"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.53"
#define Module_HelpVersion "3.53 (21 Oct 2012)"
#define Module_HelpVersion "3.53 (28 Oct 2012)"
#define Module_LibraryVersionInfo "3:53"
......@@ -2631,7 +2631,7 @@ DismountDisc
BEQ %FT04 ; no parking needed
DiscRecPtr LR, R6 ; get disc record ptr
LDRB R0, [LR, #DiscRecord_Density] ; is it a hard disc
TEQ R0, #0
TEQ R0, #DensityFixedDisc
BNE %FT04 ; if not, don't park it
MOV R1, #DiscOp_Seek :OR: DiscOp_Op_IgnoreEscape_Flag;if winnie seek to park address given
......@@ -2710,7 +2710,7 @@ Confirm ;entry V don't care
ADR r0, ConfirmText
BL message_gswrite0
10
MOVVC r0, #15
MOVVC r0, #OsByte_FlushInputBuffer
MOVVC r1, #1
SWIVC XOS_Byte
SWIVC XOS_Confirm
......@@ -2735,7 +2735,7 @@ Confirm ;entry V don't care
;Out: r0 = char read or VS and r0=error (includes escapes)
FlushAndReadChar ROUT
Push "R1,R2,LR"
MOV R0, #15
MOV R0, #OsByte_FlushInputBuffer
MOV R1, #1
BL OnlyXOS_Byte
BLVC DoXOS_ReadC
......@@ -2754,7 +2754,7 @@ ConvertEscapeToError ROUT
Push "r1,r2,lr"
; Acknowledge the escape
MOV r0, #OsbyteAckEscape
MOV r0, #OsByte_AcknowledgeEscape
BL OnlyXOS_Byte
; Convert to error
......
......@@ -64,13 +64,6 @@ VerifyRetries * 5
EscapeBit bit 6 ; escape if this bit set in ESC_Status
; osbyte numbers
OsbyteAckEscape * &7E
OsbyteReadVdu * &A0
OsbyteReadResetType * &FD
OsbyteBreakAction * &F7
; load/exec file types
FirstUnknown_fsfile * fsfile_ReadBlockSize+1 ;load mapped internally to this
......@@ -90,22 +83,12 @@ RandomAccessCreate * FirstUnknown_fsfile+3
RandomAccessExtend * FirstUnknown_fsfile+4
ASSERT RandomAccessExtend <= fsfile_Load
; VDU workspace
[ {TRUE}
WindowWidth * &100
|
LeftColumn * 8
RightColumn * &A
]
; reason codes for SWI ClaimScreenMemory
^ 0
ReleaseSpareScreen # 1
ClaimSpareScreen # 1
ApplicStart * 32*K
; definition of size of maximum free link
MaxFreeLinkBits * 15
......
......@@ -33,12 +33,14 @@ GetHAL SETS ""
GET Hdr:Tokens
GET Hdr:Wimp
GET Hdr:UpCall
GET Hdr:VduExt
GET Hdr:LowFSI
GET Hdr:Heap
GET Hdr:FileCore
GET Hdr:MsgTrans
GET Hdr:FileTypes
GET Hdr:OsWords
GET Hdr:OsBytes
GET Hdr:MultiFS
GET Hdr:NewErrors
GET Hdr:Territory
......
......@@ -97,7 +97,7 @@ PHEXIT1
SpoolOff
Push "R0-R3,LR"
SavePSR R3
MOV R0, #3
MOV R0, #OsByte_SpecifyOutputStream
MOV R1, #&10
MOV R2, #&EF
SWI OS_Byte
......@@ -107,7 +107,7 @@ SpoolOff
SpoolOn
Push "R0-R3,LR"
SavePSR R3
MOV R0, #3
MOV R0, #OsByte_SpecifyOutputStream
MOV R1, #0
MOV R2, #&EF
SWI OS_Byte
......
......@@ -336,7 +336,7 @@ FindBuffer ROUT
TSTS R4, #1 :SHL: UseApplicArea
BLNE OnlyXOS_GetEnv
MOVNE R0, #UseApplicArea
SUBNE R2, R1, #ApplicStart
SUBNE R2, R1, #AppSpaceStart
BLNE %FT90
TSTS R4, #1 :SHL: UseDirSpace
......@@ -451,7 +451,7 @@ Sink
LDR R2, ParentBase ; CAO pointer
LDR R3, [R2, #Module_Title] ; command name
BL OnlyXOS_FSControl
MOV R1, #ApplicStart
MOV R1, #AppSpaceStart
BIC R4, R4, #1 :SHL: UseApplicArea
70
......@@ -762,7 +762,7 @@ FindErrBlock ROUT
AND LR, R0, #&FF
TEQS LR, #IntEscapeErr
BNE %FT05
MOV R0, #OsbyteAckEscape ;If error was escape then acknowledge
MOV R0, #OsByte_AcknowledgeEscape ;If error was escape then acknowledge
BL DoXOS_Byte ;(R0-R2->R0-R2,V)
MOV LR, #ExtEscapeErr ;ignore any secondary error
05
......@@ -1582,7 +1582,7 @@ OnlyXOS_GetEnv
SavePSR R10
BL OnlyExternal
SWI XOS_GetEnv
MOVVS R2,#ApplicStart
MOVVS R2,#AppSpaceStart
B InternalCommonHat
......
......@@ -821,7 +821,7 @@ DisableBreak
[ Debugb
DREG lr, "Break off from ",cc
]
MOV R0, #OsbyteBreakAction
MOV R0, #OsByte_RW_BreakAction
MOV R1, #4_2222
MOV R2, #0
BL OnlyXOS_Byte
......@@ -840,7 +840,7 @@ DisableBreak
RestoreBreak
Push "R0-R3,LR"
SavePSR R3
MOV R0, #OsbyteBreakAction
MOV R0, #OsByte_RW_BreakAction
LDRB R1, BreakAction
[ Debugb
DREG lr, "Break on from ",cc
......
......@@ -306,7 +306,7 @@ PutSpace
ScreenFormat ROUT
Push "R0-R1,LR" ;calculate screen width
MOV R0, #WindowWidth
MOV R0, #VduExt_WindowWidth
MOV R1, #-1
Push "R0,R1"
MOV R0, SP
......@@ -688,7 +688,7 @@ DoOsFunBootup ROUT
Pull "R1-R7,SB,PC"
90
MOV R0,#126
MOV R0,#OsByte_AcknowledgeEscape
SWI XOS_Byte ; ack the escape
MOV R0, #IntEscapeErr
......
......@@ -601,7 +601,7 @@ LayoutFreeSpaceMap ROUT
; If density == 0 (hard disc) then there's a boot block to leave space for
LDRB lr, [r5, #DiscRecord_Density]
TEQ lr, #0
TEQ lr, #DensityFixedDisc
ADDEQ r2, r2, #SzDefectList
15
......
......@@ -57,7 +57,7 @@ EnsureFSLock
04 CMP r2, #4
Pull "r1,r2,pc",LO ; not hard disc - ignore
SWI &44781+(1:SHL:17) ; get the lock status
SWI Auto_Error_SWI_bit :OR: &44781 ; get the lock status
BVC %FT02
[ :LNOT:NewErrors
ORR R0, R0, #ExternalErrorBit
......@@ -1130,7 +1130,7 @@ DoSwiMiscOp ROUT
DoSwiMiscOp_Mount
Push "r0,r6,lr"
MOV r0, #0
MOV r0, #DensityFixedDisc
STRB r0, [r5, #DiscRecord_Density]
TST r1, #4
LDREQ r0, WinnieProcessBlk
......
......@@ -557,7 +557,7 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
STR R3, DefectSpace
; Read the Truncate CMOS bit and toggle its sense when we store it
MOV r0, #ReadCMOS
MOV r0, #OsByte_ReadCMOS
MOV r1, #FileSwitchCMOS
SWI XOS_Byte
BVS %FT85
......
......@@ -105,13 +105,6 @@ $lab # $size
MEND
MACRO
$lab a4 $size ;allocate word aligned
ASSERT (:INDEX: {VAR}) :MOD: 4=0
$lab # $size
MEND
MACRO
$lab bit $bitnum
$lab * 1 :SHL: ($bitnum)
......
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