Commit 9ae2d7ca authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Revise exports in "hdr.FileCore".

Now, for each SWI call there is a definition of any pertinent structures it asks for and definitions of any bitfields within those flags. This avoids the need for clients to endlessly redefine these locally (in practice it looks like sections of FileCore were simply copy and pasted into clients RAMFS/SCSIFS/ADFS). Delete private definitions.
This binary was carefully checked to be identical since so many locations were changed.
Then, the following additional changes:
* InitDieSvc line 74, the floppy config is extracted using a mask and shift rather than reaching up the stack
* Identify lin 1254, the superfluous instruction marked as such deleted
* FileCore15 line 762 recoded the check for background op to not need the bit number defined any more
* FileCore00 moved the label 'anull' to be word aligned guaranteed
The duff pointer marker ('nowt' = &40000000) is no longer used to mark territory translation tables as invalid as that address is now quite reasonable. -1 is used ...
parent 99a68099
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.44"
Module_Version SETA 344
Module_MajorVersion SETS "3.45"
Module_Version SETA 345
Module_MinorVersion SETS ""
Module_Date SETS "12 Oct 2011"
Module_ApplicationDate SETS "12-Oct-11"
Module_Date SETS "14 Oct 2011"
Module_ApplicationDate SETS "14-Oct-11"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.44"
Module_HelpVersion SETS "3.44 (12 Oct 2011)"
Module_FullVersion SETS "3.45"
Module_HelpVersion SETS "3.45 (14 Oct 2011)"
END
/* (3.44)
/* (3.45)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.44
#define Module_MajorVersion_CMHG 3.45
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 12 Oct 2011
#define Module_Date_CMHG 14 Oct 2011
#define Module_MajorVersion "3.44"
#define Module_Version 344
#define Module_MajorVersion "3.45"
#define Module_Version 345
#define Module_MinorVersion ""
#define Module_Date "12 Oct 2011"
#define Module_Date "14 Oct 2011"
#define Module_ApplicationDate "12-Oct-11"
#define Module_ApplicationDate "14-Oct-11"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.44"
#define Module_HelpVersion "3.44 (12 Oct 2011)"
#define Module_LibraryVersionInfo "3:44"
#define Module_FullVersion "3.45"
#define Module_HelpVersion "3.45 (14 Oct 2011)"
#define Module_LibraryVersionInfo "3:45"
......@@ -48,97 +48,202 @@ SWIClass SETS FileCoreSWI_Name
AddSWI DiscFormat
AddSWI LayoutStructure
AddSWI MiscOp
AddSWI SectorDiscOp
AddSWI FreeSpace64
AddSWI SectorDiscOp
AddSWI FreeSpace64
AddSWI DiscOp64
AddSWI Features
;Layout of create FileCore incarnation descriptor block
^ 0
Create_Flags # 3
WinnieNeedsFiq * 1 :SHL: 0
FloppyNeedsFiq * 1 :SHL: 1
BackGroundTransfer * 1 :SHL: 2 ; background transfer supported (seems to be deprecated but now defined to avoid embarassment)
NoBigBuf * 1 :SHL: 3 ;set by RAM filing system, small data move buffer size
WinnieMounts * 1 :SHL: 4 ;Winnies mount like floppies
WinniePollChanges * 1 :SHL: 5 ; Winnies support poll change calls and lock calls
FloppyEjects * 1 :SHL: 6 ; Floppies support MiscOp_Eject
WinnieEjects * 1 :SHL: 7 ; Winnies support MiscOp_Eject
DriveStatusWorks * 1 :SHL: 8 ; Drive status supported
BigDiscSupport * 1 :SHL: 9
NewErrorSupport * 1 :SHL: 10
Create_Id # 1
Create_Title # 4
Create_BootText # 4
Create_LowLevel # 4
Create_Misc # 4
Create_Size # 0
; reason codes for DiscOp call
Param4Op * 0
VerifyOp * 0
ReadSecsOp * 1
WriteSecsOp * 2
Param3Op * 3
ReadTrkOp * 3
WriteTrkOp * 4
Param2Op * 5
FirstHeadMoveOp * 5
SeekOp * 5
Param1Op * 6
RestoreOp * 6
StepInOp * 7 ;floppy only
StepOutOp * 8 ;floppy only
CachedReadSecsOp * 9
SpecifyOp * 15 ;winnie only
; reason codes for misc call
^ 0
Misc_Mount # 1
Misc_PollChanged # 1
Misc_LockDrive # 1
Misc_UnlockDrive # 1
Misc_PollPeriod # 1
Misc_Eject # 1
Misc_ReadInfo # 1
Misc_DriveStatus # 1 ; for checking status of a drive
Misc_Unused # 0
; Poll changed status
Drv_NotChanged * 1 :SHL: 0
Drv_MaybeChanged * 1 :SHL: 1
Drv_Changed * 1 :SHL: 2
Drv_Empty * 1 :SHL: 3
Drv_Ready * 1 :SHL: 4
Drv_40Track * 1 :SHL: 5
Drv_EmptyWorks * 1 :SHL: 6
Drv_ChangedWorks * 1 :SHL: 7
Drv_HiDensity * 1 :SHL: 8
Drv_DensityWorks * 1 :SHL: 9
Drv_ReadyWorks * 1 :SHL: 10
NoDirBit * 1 :SHL: 6 ; If set *configure NoDir
; DiscFormat and LayoutStructure parameters
Format_L * 0
Format_D * 1
Format_E * 2
Format_F * 3
Format_G * 4
Format_Floppy * 1 :SHL: 7
; drive status bits
DriveReserved * 1 :SHL: 0
; features bits
Feature_NewErrors * 1 :SHL: 0
;
; FileCore_Create layout of incarnation descriptor block
^ 0
Create_Flags # 3
CreateFlag_FixedDiscNeedsFIQ * 1:SHL:0
CreateFlag_FloppyNeedsFIQ * 1:SHL:1
CreateFlag_Reserved * 1:SHL:2 ; Was background transfer supported in RO2
CreateFlag_NoBigBuf * 1:SHL:3 ; Use scratch space for small data moves
CreateFlag_FixedDiscsMountLikeFloppy * 1:SHL:4 ; And fill the geometry in the disc record
CreateFlag_FixedDiscPollChangeSupport * 1:SHL:5 ; Support poll change calls and lock calls
CreateFlag_FloppyEjects * 1:SHL:6 ; Floppies support MiscOp_Eject
CreateFlag_FixedDiscEjects * 1:SHL:7 ; Fixed discs support MiscOp_Eject
CreateFlag_DriveStatusWorks * 1:SHL:8 ; Drive status supported MiscOp_DriveStatus
CreateFlag_BigDiscSupport * 1:SHL:9 ; Uses sector addresses not byte addresses
CreateFlag_NewErrorSupport * 1:SHL:10 ; Errors in top bit set addresses
Create_Id # 1
Create_Title # 4
Create_BootText # 4
Create_LowLevel # 4
Create_Misc # 4
SzCreateDesc # 0
;
; FileCore_Create drive configuration register R3
DriveConfig_FloppyCount_Mask * &FF
DriveConfig_FloppyCount_Shift * 0
DriveConfig_FixedDiscCount_Mask * &FF
DriveConfig_FixedDiscCount_Shift * 8
DriveConfig_DefaultDrive_Mask * &FF
DriveConfig_DefaultDrive_Shift * 16
DriveConfig_StartupOpt_Mask * &FF
DriveConfig_StartupOpt_Shift * 24
DriveConfig_StartupOpt_NoDir * 1:SHL:30 ; Start with no directory
;
; FileCore_Create map size guesses in register R6 (unused with big discs)
MapSizeEstimate_Drive4_Mask * &FF
MapSizeEstimate_Drive4_Shift * 0
MapSizeEstimate_Drive5_Mask * &FF
MapSizeEstimate_Drive5_Shift * 8
MapSizeEstimate_Drive6_Mask * &FF
MapSizeEstimate_Drive6_Shift * 16
MapSizeEstimate_Drive7_Mask * &FF
MapSizeEstimate_Drive7_Shift * 24
;
; FileCore_DiscFormat format densities
DensityFixedDisc * 0
DensitySingle * 1
DensityDouble * 2 ; 250kbps
DensityDoublePlus * 3 ; 300kbps
DensityQuad * 4
DensityOctal * 8
;
; FileCore_DiscFormat format specifiers
Format_L * 0
Format_D * 1
Format_E * 2
Format_F * 3
Format_G * 4
Format_Floppy * 1:SHL:7
;
; FileCore_FloppyStructure flags in R2
FloppyStructure_Force_OldMap * 1:SHL:6
FloppyStructure_Force_OldDir * 1:SHL:7
;
; Defect list end markers
DefectList_End * &20000000
DefectList_BigMap_End * &40000000
;
; FileCore_Features bits
Feature_NewErrors * 1:SHL:0
;
; FileCore_DiscOp and FileCore_SectorOp legacy disc addresses
LegacyDiscAddress_DriveNumber_Mask * 2_111
LegacyDiscAddress_DriveNumber_Shift * (32 - 3)
LegacyDiscAddress_SectorOffset_Mask * &1FFFFFFF
LegacyDiscAddress_SectorOffset_Shift * 0
LegacyDiscAddress_ByteOffset_Mask * &1FFFFFFF
LegacyDiscAddress_ByteOffset_Shift * 0
;
; FileCore_DiscOp64 extended address block
^ 0
ExtendedDiscAddress_DriveNumber # 1
ExtendedDiscAddress_Reserved # 3 ; Must be zero
ExtendedDiscAddress_LowWord # 4
ExtendedDiscAddress_HighWord # 4
SzExtendedDiscAddress # 0
;
; FileCore disc record
^ 0
DiscRecord_Log2SectorSize # 1 ; log2 sector size
DiscRecord_SecsPerTrk # 1
DiscRecord_Heads # 1 ; n-1 for old adfs floppy format
DiscRecord_Density # 1 ; 0/1/2/3/4/8 fixed/single/double/double+/quad/octal
DiscRecord_IdLen # 1 ; Length in bits of id field in the map
DiscRecord_Log2bpmb # 1 ; log2 bytes for each bit in map, 0 for old format
DiscRecord_Skew # 1 ; track to track sector skew for random access
DiscRecord_BootOpt # 1 ; boot option for *OPT4
DiscRecord_LowSector # 1 ; Lowest sector number on a track and flags:
DiscRecord_LowSector_Shift * 0
DiscRecord_LowSector_Mask * &3F ; 0-5 Lowest numbered sector on a track
DiscRecord_SequenceSides_Flag * 1:SHL:6 ; 6 Tracks are numbered 0..s-1 on side 0, then s..2s-1 on side 1, etc
DiscRecord_DoubleStep_Flag * 1:SHL:7 ; 7 Double step
DiscRecord_NZones # 1 ; # zones in map
DiscRecord_ZoneSpare # 2 ; # bits in zones after 0 which are not map bits
DiscRecord_Root # 4 ; Disc address of the root directory
DiscRecord_DiscSize # 4 ; in bytes
DiscRecord_DiscId # 2 ; Cycle number
DiscRecord_DiscName # 10
SzDiscRecSig # 0
DiscRecord_DiscType # 4 ; FileType of disc: FileType_Data indicates
; that the disc is, as yet, unidentified.
; This may occur as a result of the identification
; process failing, or the identification process
; not yet happening. FileType_Data discs have no
; concept of a unique identifier so drive independance
; when accessing them is not possible.
DiscRecord_BigMap_DiscSize2 # 4 ; top 32bits of the disc size. This combines with
; DiscSize to give the full size of the disc.
DiscRecord_BigMap_ShareSize # 1 ; sharing granularity, in sectors
DiscRecord_BigMap_Log2ShareSize_Mask * &F
DiscRecord_BigMap_Log2ShareSize_Shift * 0
DiscRecord_BigMap_Flags # 1 ; flags
DiscRecord_BigMap_BigFlag * 1 ; 0 for small disc, 1 for big
DiscRecord_BigMap_NZones2 # 1 ; high byte of number of zones
DiscRecord_BigMap_Reserved # 1
DiscRecord_BigDir_DiscVersion # 4 ; version number of disc format
DiscRecord_BigDir_RootDirSize # 4 ; size of root dir
SzDiscRecSig2 # 0
DiscRecord_BigDir_Reserved # 8
SzDiscRegSigSpace # 0
ASSERT (DiscRecord_ZoneSpare :MOD: 4)=2
;
; FileCore_DiscOp reason codes
^ 0
DiscOp_Verify # 1
DiscOp_ReadSecs # 1
DiscOp_WriteSecs # 1
DiscOp_ReadTrk # 1
DiscOp_WriteTrk # 1
DiscOp_Seek # 1
DiscOp_Restore # 1
DiscOp_StepIn # 1 ; floppy only
DiscOp_StepOut # 1 ; floppy only
DiscOp_CachedReadSecs # 1
DiscOp_Reserved0 # 1
DiscOp_Reserved1 # 1
DiscOp_Reserved2 # 1
DiscOp_Reserved3 # 1
DiscOp_Reserved4 # 1
DiscOp_Specify # 1 ; fixed disc only
DiscOp_Op_Mask * &F
DiscOp_Op_AltDefectList_Flag * 1:SHL:4
DiscOp_Op_ScatterList_Flag * 1:SHL:5
DiscOp_Op_IgnoreEscape_Flag * 1:SHL:6
DiscOp_Op_IgnoreTimeout_Flag * 1:SHL:7
DiscOp_Op_Atomic_Flag * 3:SHL:6 ; ignore both escape and timeout
;
; FileCore_MiscOp reason codes
^ 0
MiscOp_Mount # 1
MiscOp_PollChanged # 1
MiscOp_PollChanged_NotChanged_Flag * 1:SHL:0
MiscOp_PollChanged_MaybeChanged_Flag * 1:SHL:1
MiscOp_PollChanged_Changed_Flag * 1:SHL:2
MiscOp_PollChanged_Empty_Flag * 1:SHL:3
MiscOp_PollChanged_Ready_Flag * 1:SHL:4
MiscOp_PollChanged_40Track_Flag * 1:SHL:5
MiscOp_PollChanged_EmptyWorks_Flag * 1:SHL:6
MiscOp_PollChanged_ChangedWorks_Flag * 1:SHL:7
MiscOp_PollChanged_HiDensity_Flag * 1:SHL:8
MiscOp_PollChanged_DensityWorks_Flag * 1:SHL:9
MiscOp_PollChanged_ReadyWorks_Flag * 1:SHL:10
MiscOp_LockDrive # 1
MiscOp_UnlockDrive # 1
MiscOp_PollPeriod # 1
MiscOp_Eject # 1
MiscOp_ReadInfo # 1
MiscOp_DriveStatus # 1 ; for checking status of a drive
MiscOp_DriveLocked_Flag * 1:SHL:0
MiscOp_FirstUnknown # 0
OPT OldOpt
END
......@@ -33,87 +33,66 @@ OldOpt SETA {OPT}
; 31-Jul-91 JSR Add flags field to enumformats block
; 16-Jan-92 JSR Add "Here's the *Format parameter" flag to enumformats
MACRO
$FName AFormat $TName
GBLS FormatName_$FName
FormatName_$FName SETS "$TName"
MEND
; Formats
;
; It is best if this list is kept in alphabetical order of
; the textual name, these being the ones we wish to keep unique.
;
DOSFS_A AFormat "A" ; Atari, 720K, DS
DOSFS_B AFormat "B" ; Atari, 360K, SS
ADFS_D AFormat "D" ; ADFS, 640K, Old map, Old dirs, floppy flavour
ADFS_E AFormat "E" ; ADFS, 800K, New map, New Dirs, floppy flavour
ADFS_F AFormat "F" ; ADFS, 1600K, New map, New Dirs, winnie flavour
ADFS_L AFormat "L" ; ADFS, 800K, Old map, New Dirs, floppy flavour
DOSFS_M AFormat "M" ; MS-DOS 3.20+, 720K, DS
DOSFS_N AFormat "N" ; MS-DOS 3.20+, 360K, SS
; An EnumFormatsBlock
;
; These blocks are generated during a Service_EnumerateFormats operation.
^ 0
EnumFormats_Link # 4
EnumFormats_MenuString # 4
EnumFormats_MenuHelp # 4
EnumFormats_DiscFormatSWI # 4
EnumFormats_DiscFormatParam # 4
EnumFormats_LayoutStructureSWI # 4
EnumFormats_LayoutStructureParam # 4
EnumFormats_Flags # 4
EnumFormats_IsNative * 1 :SHL: 0
EnumFormats_HasFormatParam * 1 :SHL: 1
EnumFormats_FormatParam # 4
SzEnumFormatsBlock # 0
^ 0
EnumFormats_Link # 4
EnumFormats_MenuString # 4
EnumFormats_MenuHelp # 4
EnumFormats_DiscFormatSWI # 4
EnumFormats_DiscFormatParam # 4
EnumFormats_LayoutStructureSWI # 4
EnumFormats_LayoutStructureParam # 4
EnumFormats_Flags # 4
EnumFormats_IsNative * 1:SHL:0
EnumFormats_HasFormatParam * 1:SHL:1
EnumFormats_FormatParam # 4
SzEnumFormatsBlock # 0
;
; This block is the format description of the hard part of a format
^ 0
FormatSectorSize # 4
FormatGap1Side0 # 4
FormatGap1Side1 # 4
FormatGap3 # 4
FormatSectorsPerTrk # 1
FormatDensity # 1
FormatOptions # 1
FormatIndexMark * 1:SHL:0
FormatDoubleStep * 1:SHL:1
FormatInterleaveSides * 0:SHL:2
FormatSide0Only * 1:SHL:2
FormatSide1Only * 2:SHL:2
FormatSequenceSides * 3:SHL:2
FormatLowSector # 1
FormatInterleave # 1
FormatSideSideSkew # 1 ; Signed
FormatTrackTrackSkew # 1 ; Signed
FormatFillValue # 1
TracksToFormat # 4
FormatReserved # 36
SzFormatBlock # 0
; This block is the format description for FS_DiscFormat
^ 0
FormatSectorSize # 4
FormatGap1Side0 # 4
FormatGap1Side1 # 4
FormatGap3 # 4
FormatSectorsPerTrk # 1
FormatDensity # 1 ; 1/2/3/4/8, see disc record defines
FormatOptions # 1
FormatOptIndexMark * 1:SHL:0
FormatOptDoubleStep * 1:SHL:1
FormatOptInterleaveSides * 0:SHL:2
FormatOptSide0Only * 1:SHL:2
FormatOptSide1Only * 2:SHL:2
FormatOptSequenceSides * 3:SHL:2
FormatOptSidesMask * 3:SHL:2
FormatLowSector # 1
FormatInterleave # 1
FormatSideSideSkew # 1 ; Signed
FormatTrackTrackSkew # 1 ; Signed
FormatFillValue # 1
FormatTracksToFormat # 4
FormatReserved # 36
SzFormatBlock # 0
ASSERT SzFormatBlock = 64
;
; This block is what's passed to _DiscOp format track
^ 0
DoFormatSectorSize # 4
DoFormatGap1 # 4
# 4 ; Reserved
DoFormatGap3 # 4
DoFormatSectorsPerTrk # 1
DoFormatDensity # 1
DoFormatOptions # 1
DoFormatFillValue # 1
DoFormatCylindersPerDrive # 4
DoFormatReserved0 # 4
DoFormatReserved1 # 4
DoFormatReserved2 # 4
DoFormatSectorList # 0
; This block is what's passed to FS_DiscOp format track
^ 0
DoFormatSectorSize # 4
DoFormatGap1 # 4
# 4 ; Reserved & must be zero
DoFormatGap3 # 4
DoFormatSectorsPerTrk # 1
DoFormatDensity # 1 ; 1/2/3/4/8, see disc record defines
DoFormatOptions # 1 ; As per FormatOptions above
DoFormatFillValue # 1
DoFormatCylindersPerDrive # 4
DoFormatReserved0 # 4
DoFormatReserved1 # 4
DoFormatReserved2 # 4
DoFormatSectorList # 0 ; List follows, one word per sector
OPT OldOpt
END
This diff is collapsed.
This diff is collapsed.
......@@ -14,27 +14,7 @@
;
; >Defns
TTL "Definition of constants"
; change log:
; 15 May 1997: SBP: Added MaxFreeLinkBits (15)
EscapeBit bit 6 ;escape if this bit set in ESC_Status
MaxWinnies * 2
Single * 1
Double * 2
Quad * 4
Octal * 8
K * 1024
M * K*K
;Register allocation
SB RN 12
TTL "Definition of internal structures and constants"
bit0 bit 0
bit1 bit 1
......@@ -73,22 +53,19 @@ LF * 10
CR * 13
DeleteChar * 127
K * 1024
M * K*K
SzOldFs * &200
SzNewFloppyFs * &400
ASSERT EscapeBit=&40
AltDefectBit bit 4 ;use alternative defect map, winnies only
ScatterBit bit 5
NoEscape bit 6
NoTimeOut bit 7
BackgroundBitNo * 8
BackgroundOp bit BackgroundBitNo ;internal use only
Atomic * NoEscape :OR: NoTimeOut
OpMask * 2_1111 ;ops 0-15
DiscOp_Op_BackgroundOp_Flag * 1:SHL:8 ;internal use only
DiscBits * 2_111 :SHL: (32-3) ;In all disc addresses
VerifyRetries * 5
EscapeBit bit 6 ; escape if this bit set in ESC_Status
; osbyte numbers
OsbyteAckEscape * &7E
......@@ -133,11 +110,524 @@ ApplicStart * 32*K
; definition of size of maximum free link
MaxFreeLinkBits * 15
MaxFreeLinkBits * 15
; bad pointer indicator bits (used for list ends etc)
BadPtr * &FFFFFFFF
BadPtrBits * &00000003
;
; FileCore disc record
^ 0
DiscRecordExternal # SzDiscRecSig2 ; Per public header file
DiscFlags # 1
FloppyFlag bit 0
NeedNewIdFlag bit 1 ; Indicates that when this disc is next updated a new Id ought to be given it too
DiscNotFileCore bit 2 ; Indicates this isn't a FileCore disc (yet)
DiscNotIdentified bit 3 ; Indicates this Data disc hasn't been identified as something else yet.
AltMapFlag bit 5
OldMapFlag bit 6
OldDirFlag bit 7 ;set <=> old small dirs
ASSERT FloppyStructure_Force_OldDir = OldDirFlag
ASSERT FloppyStructure_Force_OldMap = OldMapFlag
;entries below must be valid even when disc rec is not in use
Priority # 1 ;0 DISC REC UNUSED
;1 to # floppies -> floppy priority level
;&FF good winnie
DiscsDrv # 1 ;0-7 => drive in, 8 => not in drive, OR DISC REC UNUSED
DiscUsage # 1 ;tasks using this disc, if >0 disc cant be forgotten
SzDiscRec # 0
DefDiscRecEnd * &00080000 ;default last word of disc record
; Preamble to disc rec for FORMAT
SzFormHdr * 8
^ -SzFormHdr
FormSig # 1 ;signature
FormChar # 1
HalfSide0Gap1 # 1
HalfSide1Gap1 # 1
Gap3 # 1
Skew # 1
# 2 ;unused
ASSERT @=0
SzFormDiscRec * SzDiscRec+SzFormHdr
L_Root * &200
D_Root * &400
L_Size * 640*K
D_Size * 800*K
NewMapRoot * &203 ;indirect disc add
NewFloppyRootDiscAdd * &800 ;physical disc add
; Drive Record
^ 0
DrvsDisc # 1
Uncertain bit 7 ; Contents of disc in drive uncertain - may have a disc record attached, but not certain it's the right one or that it's type is correct
Unknown bit 6 ; Contents of disc in drive not known (no attached disc record)
Empty bit 5 ; Disc definitely not in drive
Full bit 4 ; Disc definitely in drive, but no disc record attached to drive
DrvFlags # 1 ; Flags about drive
HasDefectList bit 0 ; Set if drive has a defect list
LastDiscOpWasFormat bit 1 ; Set if the last DiscOp was a format track operation
LockCount # 1 ; How many times the drive's been locked
PrevFormSectorSize # 1 ; SectorSize in previous format operation
PrevFormSecsPerTrk # 1 ; SecsPerTrk in previous format operation
PrevFormHeads # 1 ; Heads in previous format operation
PrevFormDensity # 1 ; Density in previous format operation
PrevFormLowSector # 1 ; LowSector in previous format operation
PrevFormDiscSize aw 4 ; DiscSize in previous format operation
[ BigDisc
PrevFormDiscSize2 aw 4 ; 2nd part of DiscSize in previous format operation
]
ChangedSeqNum aw 4
[ DynamicMaps
DrvsFsMapAddr aw 4 ;ptr to free space map
DrvsFsMapArea aw 4 ;dynamic area number
DrvsFsMapSize aw 4 ;size of the map
DrvsFsMapFlags aw 4 ;flags for the map
|
DrvsFsMap aw 4 ;ptr to free space maps
]
BadFs bit 31 ;set if corrupt on disc
EmptyFs bit 30 ;set if FS map buffer empty for old maps
FsMapMaxSize * 4*1024*1024
[ DynamicMaps
MemErrorFs bit 29 ;set if failed to load FSmap due to errors with dynamic areas
NewHiFsBits * BadFs :OR: EmptyFs
|
HiFsBits * BadFs :OR: EmptyFs
]
SzDrvRec # 0
; structure of dir cache obj
^ 0
CacheNext aw 4 ;->next obj, -1 marks end of cache
CachePriority aw 4 ;0 for free space, -1 marks end of cache
CacheMin # 0 ;min size for free space
; rest dont apply to free spaces
CacheRootStart # 0
CacheYounger aw 4 ;-> next youngest dir
CacheOlder aw 4 ;-> next oldest dir
CacheRootEnd # 0
CacheDir aw 4 ;disc address of dir
CacheBody # 0
; structure of a sector cache entry
^ 0
SectorCache_Next aw 4 ; Link to next cached sector, or 0
SectorCache_Address aw 4 ; disc address of this cached sector
SectorCache_Error aw 4 ; error encountered when reading this sector
SectorCache_Usage aw 4 ; Number of times this block's been used
SectorCache_HeaderSize # 0
SectorCache_Contents # 0
; DEFECT LIST
; The list consists of words containing the disc address ( in bytes ) of bad
; sectors, the end is marked by a value &200000xx, where &xx forms a check
; byte on the earlier list. The last 64 bytes describe the disc to FileCore.
; Any other bytes may be used as params for the low level drivers
DefectListDiscAdd * &400+&800
SzDefectList * &200
DefectEndMark bit 29
MaxStruc * 64
ASSERT SzDiscRec<=MaxStruc
^ 0
# SzDefectList-MaxStruc-4
ParkDiscAdd # 4
DefectStruc # MaxStruc-1
;DefectCheck
# 1
ASSERT @=SzDefectList
; OLD FS MAP
^ 0
FreeStart # 82*3 ;table of free space start sectors
EndSpaceList # 0
# 1 ;reserved
OldName0 # 5 ; RETRO DEFINITION
OldSize # 3 ;size in sectors
Check0 # 1 ;checksum on sector 0
FreeLen # 82*3 ;table of free space lengths
OldName1 # 5 ; RETRO DEFINITION
OldId # 2 ;disc id
OldBoot # 1 ;boot option
FreeEnd # 1 ;ptr to end of free space list
Check1 # 1 ;checksum on sector 1
ASSERT {VAR}=&200
; New map
^ 0
ZoneCheck # 1
FreeLink # 2 ;15 bit free space start link
CrossCheck # 1 ;EORing this byte for all zones should yield &FF
DummyLenBit bit 31 ;always set
ZoneDiscRecSz * 60 ;reserve additional bytes
ASSERT ZoneDiscRecSz>=SzDiscRec
ZoneHead # ZoneDiscRecSz
Zone0Bits * ZoneDiscRecSz*8
;zones are followed in RAM by table of one byte of flags per zone
ZoneValid bit 0
ZoneCompacted bit 1
; Dir entry
^ 0
NameLen * 10
DirObName # NameLen
DirLoad # 4
DirExec # 4
DirLen # 4
DirIndDiscAdd # 3
OldDirObSeq # 1
OldDirEntrySz * {VAR}
ASSERT OldDirEntrySz=26
NewDirAtts * OldDirObSeq
ReadBit bit 0
WriteBit bit 1
IntLockedBit bit 2 ;the locked bit is held in bit 2 internally
ExtLockedBit bit 3 ;but is returned in bit 3 externally
DirBit bit 3
EBit bit 4 ;6502 ADFS E files are treated as if R
[ FullAtts ;extended attributes only for new dirs
Att4 bit 4
PublicReadBit * Att4
Att5 bit 5
PublicWriteBit * Att5
Att6 bit 6
Att7 bit 7
NewAtts * Att4 :OR: Att5 :OR: Att6 :OR: Att7
|
NewAtts * 0
]
IntDirAttMask * IntLockedBit :OR: DirBit :OR: NewAtts
IntAttMask * IntDirAttMask :OR: ReadBit :OR: WriteBit
ExtAttMask * ReadBit :OR: WriteBit :OR: ExtLockedBit :OR: NewAtts
NewDirEntrySz * {VAR}
; Directory Start
^ 0
StartMasSeq # 1
StartName # 4
DirFirstEntry # 0
; Old Directory End
^ 0
# -1
DirCheckByte # 0 ;RETRO DEFINITION was reserved
# -4
EndName # 0
# -1
EndMasSeq # 0
# -14 ;reserved
DirTitleSz * 19
# -DirTitleSz
OldDirTitle # 0
# -3
OldDirParent # 0
# -NameLen
OldDirName # 0
# -1
OldDirLastMark # 0 ;dummy last entry marker
; New Directory End
^ 0
# -1
ASSERT DirCheckByte=@
# -4
ASSERT EndName=@
# -1
ASSERT EndMasSeq=@
# -NameLen
NewDirName # 0
# -DirTitleSz
NewDirTitle # 0
# -3
NewDirParent # 0
# -1 ;reserved
# -1 ;reserved
# -1
NewDirLastMark # 0 ;dummy last entry marker
OldDirSize * &500
NewDirSize * &800
OldDirTabSz * (OldDirSize-DirFirstEntry+OldDirLastMark)
NewDirTabSz * (NewDirSize-DirFirstEntry+NewDirLastMark)
ASSERT OldDirTabSz :MOD: OldDirEntrySz = 0
ASSERT NewDirTabSz :MOD: NewDirEntrySz = 0
OldDirEntries * OldDirTabSz / OldDirEntrySz
NewDirEntries * NewDirTabSz / NewDirEntrySz
ASSERT OldDirEntries=47
ASSERT NewDirEntries=77
[ BigDir
; SBP: 28 Aug 1997: Added new directory type, known as 'big'
; Big directory header
^ 0
BigDirStartMasSeq # 1 ; master sequence number
BigDirVersion # 3 ; directory version number
BigDirStartName # 4 ; 'SBPr'
BigDirNameLen # 4 ; Length of the directory's name
BigDirSize # 4 ; Length of the directory
BigDirEntries # 4 ; Number of entries in a directory
BigDirNamesSize # 4 ; number of bytes allocated for names
BigDirParent # 4 ; indirect disc address of parent directory
BigDirName # 0 ; start of the dir name
BigDirHeaderSize # 0 ; size of the header
; Big directory entry
^ 0
[ {FALSE}
BigDirEntryName # 4 ; 'DirE'
]
BigDirLoad # 4 ; load address of object
BigDirExec # 4 ; exec address of object
BigDirLen # 4 ; length of object
BigDirIndDiscAdd # 4 ; indirect disc address of object
BigDirAtts # 4 ; attributes of object
BigDirObNameLen # 4 ; length of object name
BigDirObNamePtr # 4 ; offset into name heap for name
BigDirEntrySize # 0 ; size of entry
[ {FALSE}
; Big directory name heap entry
^ 0
BigDirHeapName # 4 ; 'Name'
BigDirHeapIndDiscAdd # 4 ; copy of indirect disc address
BigDirHeapObName # 0 ; name of file (padded with nulls to word boundary)
BigDirHeapHeaderSize # 0 ; size of the header for a name heap entry
]
; Big directory tail
^ 0
# -1
BigDirCheckByte # 0
# -2 ; reserved
# -1
BigDirEndMasSeq # 0
# -4
BigDirEndName # 0 ; 'oven'
BigDirTailSize * -@
[ Dev
! 0, "BigDirTailSize = " :CC: :STR: BigDirTailSize
]
; other useful definitions for big directories
BigDirMaxNameLen * 255 ; maximum name length is 255 chars
BigDirMinSize * 2048
BigDirMaxSize * 4*1024*1024
]
BufSz RN 4
FileOff RN 5
DiscAdjust RN 6
TransferEnd RN 7
FragEnd RN 8
Fcb RN 9
BufOff RN 10
BufPtr RN 11
;FILE CACHE BUFFER
^ 0
BufFlags # 4 ;these 4 are in common with extended FCB
NextInFile # 4
PrevInFile # 4
BufFileOff # 4
BufFcb # 4
OlderBuf # 4
YoungerBuf # 4
BufPriority # 1
# 3
BufferData # 1*K ;data itself
BufScale * 5
ASSERT BufferData :SHL: BufScale = 1*K
^ 0 ;priority levels for buffers
EmptyChain # 1
MonotonicChain # 1
NormalChain # 1
AwaitsSeqChain # 1
ReadAheadChain # 1
WriteBehindChain # 1
EmptyBuf bit EmptyChain+2 ;priority level flags
UsedMonotonic bit MonotonicChain+2
NormalBuf bit NormalChain+2
AwaitsSeqRead bit AwaitsSeqChain+2
ReadAhead bit ReadAheadChain+2
WriteBehind bit WriteBehindChain+2
AllocFlags * EmptyBuf :OR: UsedMonotonic :OR: NormalBuf :OR:AwaitsSeqRead :OR: ReadAhead :OR: WriteBehind
ASSERT AllocFlags=2_11111100
; File Control Block
^ 0 ;FCB has header in common with file cache buffer
ASSERT BufFlags=@
# 4
ASSERT NextInFile=@
# 4
ASSERT PrevInFile=@
# 4
ASSERT BufFileOff=@
# 4
FcbNext aw 4 ;link to next FCB
FcbFlags # 1
FcbBufSz # 1
[ BigDir
ASSERT BigDirMaxNameLen<=255
FcbName # 258 ; make sure aligned
|
FcbName # 10
]
FcbLength aw 4 ;ASSUME LOWEST BYTE ZERO TO USE AS NAME TERMINATOR
FcbDir aw 4 ;dir containing file
FcbIndDiscAdd aw 4
FcbExtent aw 4
FcbExtHandle # 4 ;0 => Fcb kept around although file closed
NotHandle * 32*K ;1-NotHandle-1 => external handle and access<>R
;>=NotHandle => ptr to chain of external handles
LastReadEnd # 4
AccessHWM # 4
ReadAheadBufs # 1
DataLostFlag # 1
# 1
# 1
FcbSize # 0
; Flags
; b0 set <=> file has read access
; b1 set <=> file has write access
; b2 Indicates which controller
FcbFloppyBitNo * 2
FcbFloppyFlag bit FcbFloppyBitNo
; b3 set <=> dir
; b4 set <=> EXT needs ensuring
ASSERT ReadBit = bit0
ASSERT WriteBit = bit1
ASSERT DirBit = bit3
ExtFlag bit 4
Monotonic bit 5 ;set <=> all read access above HWM
SequentialBitNo * 6
Sequential bit SequentialBitNo ;set <=> reading sequentially
FcbDiscImage bit 7 ; set <=> Fcb is disc image
;object in handle chain if can be multiply open
^ 0
NextHandleBlk # 4
HandleBlkFcb # 4
ExtHandle # 4
HandleBlkSize # 0
HandleBlkBit bit 31 ;bit that marks internal handle as ptr to handle block
;Background process control block
;Both floppies and winnies have values of following
^ 0
Process # 1 ;AMENDED FROM INACTIVE BY RETRYDRIVEOP
Inactive bit 0
ASSERT ReadAhead = bit6
ASSERT WriteBehind = bit7
ProcessDirect # 1 ;0/&FF if process includes a direct transfer
ProcessDrive # 1 ;FILLED IN BY RETRYDRIVEOP
# 1
ShortProcessBlk # 0 ;when file cache not in use
ProcessEndPtr # 4
OldLength # 4
ProcessWriteBehindDrive # 1 ;Must be in same word for atomic write
ProcessWriteBehindDisc # 1
# 2 ;Not free for other use
ProcessWriteBehindLeft # 4
ProcessStartPtr # 4 ;DO NOT REORDER THESE
ProcessRamAdjust # 4
ProcessStartOff # 4
ProcessEndOff # 4
ProcessFragEnd # 4
ProcessFcb # 4
ProcessError # 4
ProcessStatus # 4
Active bit 31
CanExtend bit 30
ProcessPairs # 0
ExtraPairs * 2
END
......@@ -51,6 +51,7 @@ GetHAL SETS ""
GET MyMacros.s
GET Defns.s
GET FileCore00.s
GET Errors.s
GET FileCore05.s
GET FileCore15.s
GET FileCore20.s
......
This diff is collapsed.
......@@ -551,9 +551,9 @@ NewRandomId
DLINE ")"
]
BL GetRandomId
STRB lr, [r0, #ZoneHead+DiscId]
STRB lr, [r0, #ZoneHead+DiscRecord_DiscId+0]
MOV lr, lr, LSR #8
STRB lr, [r0, #ZoneHead+DiscId+1]
STRB lr, [r0, #ZoneHead+DiscRecord_DiscId+1]
MOV r1, #SzNewFloppyFs
BL SetNewCheck ;(r0,r1)
Pull "r1,pc"
......@@ -632,34 +632,34 @@ SortPair
Push "R2-R9,LR" ;SHELL SORT TABLE
[ DebugX
DLINE "Input to SortPair:"
Push "R0,R1,R2,R3"
DLINE "Input to SortPair:"
Push "R0,R1,R2,R3"
01
CMP R0, R1
BHS %FT02
CMP R0, R1
BHS %FT02
LDMIA R0!, {R2, R3}
DREG R3, "",cc
DREG R2, ""
B %BT01
LDMIA R0!, {R2, R3}
DREG R3, "",cc
DREG R2, ""
B %BT01
02
Pull "R0,R1,R2,R3"
Pull "R0,R1,R2,R3"
]
SUB R3,R1,R0 ;table length
CMPS R3,#2*8
BLO %FT30 ;only sort if 2 or more entries
MOV R2, #1*8 ;value in use
MOV R8, #4*8
MOV R2, #1*8 ;value in use
MOV R8, #4*8
05
ADD LR, R8, R8, LSL #1
ADD LR, LR, #8
CMPS R3, LR
MOVHI R2, R8
MOVHI R8, LR
BHI %BT05
ADD LR, R8, R8, LSL #1
ADD LR, LR, #8
CMPS R3, LR
MOVHI R2, R8
MOVHI R8, LR
BHI %BT05
15
......@@ -667,55 +667,55 @@ SortPair
MOV R6,R3
20
MOV R4,R3
LDMIA R3!, {R5, R7}
LDMIA R3!, {R5, R7}
25
SUB LR, R4, R2
LDMIA LR, {R8, R9}
SUB LR, R4, R2
LDMIA LR, {R8, R9}
CMPS R9,R7
CMPEQS R8,R5
STMHSIA R4, {R8, R9}
MOVHS R4, LR
CMPEQS R8,R5
STMHSIA R4, {R8, R9}
MOVHS R4, LR
CMPHSS R4,R6
BHS %BT25
STMIA R4, {R5, R7}
STMIA R4, {R5, R7}
CMPS R3,R1
BLO %BT20
MOV LR, #&2200 ; 1093*8
ADD LR, LR, #&28
CMPS R2, LR
MOVHI R2, LR
BHI %BT15
CMPS R2,#364*8
MOVHI R2,#364*8
BHI %BT15
CMPS R2,#121*8
MOVHI R2,#121*8
BHI %BT15
CMPS R2,#40*8
MOVHI R2,#40*8
BHI %BT15
CMPS R2,#13*8
MOVHI R2,#13*8
BHI %BT15
MOV LR, #&2200 ; 1093*8
ADD LR, LR, #&28
CMPS R2, LR
MOVHI R2, LR
BHI %BT15
CMPS R2,#364*8
MOVHI R2,#364*8
BHI %BT15
CMPS R2,#121*8
MOVHI R2,#121*8
BHI %BT15
CMPS R2,#40*8
MOVHI R2,#40*8
BHI %BT15
CMPS R2,#13*8
MOVHI R2,#13*8
BHI %BT15
CMPS R2,#4*8
MOVEQ R2,#1*8
MOVHI R2,#4*8
BHS %BT15
30
[ DebugX
DLINE "Output from SortPair:"
Push "R0,R1,R2,R3"
DLINE "Output from SortPair:"
Push "R0,R1,R2,R3"
01
CMP R0, R1
BHS %FT02
CMP R0, R1
BHS %FT02
LDMIA R0!, {R2, R3}
DREG R3, "",cc
DREG R2, ""
B %BT01
LDMIA R0!, {R2, R3}
DREG R3, "",cc
DREG R2, ""
B %BT01
02
Pull "R0,R1,R2,R3"
Pull "R0,R1,R2,R3"
]
Pull "R2-R9,PC"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -29,7 +29,7 @@ UseWimpFree * 2
UseRmaHeap * 3
UseSysHeap * 4
ASSERT ScatterBit=1 :SHL: 5
ASSERT DiscOp_Op_ScatterList_Flag=1 :SHL: 5
UseApplicArea * 6
......@@ -46,7 +46,7 @@ UseDirSpace * 8
; MoveData using all possible RAM, and indirect disc addresses, from start
DefaultMoveData
MOV R0, #(1:SHL:UseScratchSpace) :OR: (1:SHL:UseSpareScreen) :OR: (1:SHL:UseWimpFree) :OR: (1:SHL:UseRmaHeap) :OR: (1:SHL:UseSysHeap) :OR: (1:SHL:UseIndOp) :OR: ScatterBit
MOV R0, #(1:SHL:UseScratchSpace) :OR: (1:SHL:UseSpareScreen) :OR: (1:SHL:UseWimpFree) :OR: (1:SHL:UseRmaHeap) :OR: (1:SHL:UseSysHeap) :OR: (1:SHL:UseIndOp) :OR: DiscOp_Op_ScatterList_Flag
MOV R4, #0 ;fall into MoveData
; ========
......@@ -80,10 +80,10 @@ MoveData
]
[ BigDisc
[ Debug
DLINE "********** MoveData **************"
DLINE "********** MoveData **************"
]
;01
; B %BT01
; B %BT01
]
LDMIA SP, {R6-R10}
......@@ -113,7 +113,7 @@ MoveData
TSTS R6, #1 :SHL: UseIndOp
MOVNE R5, R10
Push "R3-R5"
MOV R1, #ReadSecsOp :OR: ScatterBit :OR: NoEscape
MOV R1, #DiscOp_ReadSecs :OR: DiscOp_Op_ScatterList_Flag :OR: DiscOp_Op_IgnoreEscape_Flag
MOV R2, R7
BL InitScatter
BLNE GenIndDiscOp ;(R1-R5->R0,R3-R5,V)
......@@ -122,7 +122,7 @@ MoveData
BVS %FT90
TSTS R6, #1 :SHL: UseIndOp
MOV R1, #WriteSecsOp :OR: ScatterBit :OR: NoEscape
MOV R1, #DiscOp_WriteSecs :OR: DiscOp_Op_ScatterList_Flag :OR: DiscOp_Op_IgnoreEscape_Flag
MOV R2, R8
BL InitScatter
BLNE GenIndDiscOp ;(R1-R5->R0,R3-R5,V)
......@@ -130,8 +130,8 @@ MoveData
SUB R11,R11,R4 ;amount transferred
[ BigDisc
MOVEQ R3, R7 ; for ReadSectorSize
BLEQ ReadSectorSize ; get sector size
MOVEQ R3, R7 ; for ReadSectorSize
BLEQ ReadSectorSize ; get sector size
ADDEQ R7, R7, R11, LSR LR
ADDEQ R8, R8, R11, LSR LR
SUB R9, R9, R11
......@@ -203,41 +203,41 @@ InitScatter
; appropriate information.
ReadHex64 ROUT
Push "R3,R4,LR"
MOV R1, #0
MOV R2, #0
MOV R4, #0
Push "R3,R4,LR"
MOV R1, #0
MOV R2, #0
MOV R4, #0
10
LDRB R3,[R0],#1
CMP R3,#'a'
SUBHS R3, R3, #32
LDRB R3,[R0],#1
CMP R3,#'a'
SUBHS R3, R3, #32
CMP R3,#'0'
RSBHSS LR,R3,#'F'
BLT %FT90 ; not any sort of digit
CMP R3,#'0'
RSBHSS LR,R3,#'F'
BLT %FT90 ; not any sort of digit
CMP R3,#'9'
SUBLE R3, R3, #'0'
BLE %FT30 ; a number
CMP R3,#'9'
SUBLE R3, R3, #'0'
BLE %FT30 ; a number
SUBS R3,R3,#'A'
RSBHSS LR,R3,#'F'-'A'
ADD R3,R3,#10
BLT %FT90 ; not A-F
SUBS R3,R3,#'A'
RSBHSS LR,R3,#'F'-'A'
ADD R3,R3,#10
BLT %FT90 ; not A-F
30
MOV R2, R2, LSL #4
ADD R2, R2, R1, LSR #28
ADD R1, R3, R1, LSL #4
B %BT10
MOV R2, R2, LSL #4
ADD R2, R2, R1, LSR #28
ADD R1, R3, R1, LSL #4
B %BT10
90
[ Debug
DREG R1, "L.S. word"
DREG R2, "M.S. word"
DREG R1, "L.S. word"
DREG R2, "M.S. word"
]
Pull "R3,R4,PC"
Pull "R3,R4,PC"
; ==========
; FindBuffer
......@@ -273,8 +273,8 @@ FindBuffer ROUT
Pull "R4-R7"
LDR LR, FS_Flags
TSTS LR, #NoBigBuf
ANDNE R4, R4, #ScatterBit :OR: (1 :SHL: UseScratchSpace)
TSTS LR, #CreateFlag_NoBigBuf
ANDNE R4, R4, #DiscOp_Op_ScatterList_Flag :OR: (1 :SHL: UseScratchSpace)
SUBS R7, R7, #1
TSTS R6, R7
......@@ -345,13 +345,13 @@ FindBuffer ROUT
SUBNE R2, R2, SB
[ BigDir
SUBNE R2, R2, #(:INDEX:DirCache) :AND: :NOT: 255
SUBNE R2, R2, #(:INDEX:DirCache) :AND: 255
SUBNE R2, R2, #(:INDEX:DirCache) :AND: 255
|
SUBNE R2, R2, #:INDEX:DirBuffer
SUBNE R2, R2, #:INDEX:DirBuffer
]
BLNE %FT90
TSTS R4, #ScatterBit
TSTS R4, #DiscOp_Op_ScatterList_Flag
BEQ %FT20
TEQS R11,#0 ;scatter case, claim any
BEQ %FT18
......@@ -596,7 +596,7 @@ UpCall
DLINE ")"
]
SUB sp, sp, #UpCall_FrameSize
MOV r0, #Misc_PollPeriod
MOV r0, #MiscOp_PollPeriod
BL Parent_Misc ;(R0->R5,R6)
[ DebugU
DREG r5, "PollPeriod = "
......@@ -636,10 +636,10 @@ UpCall
; if expelling is sensible)
LDR lr, FS_Flags
TST lr, #(WinnieEjects :OR: FloppyEjects)
TST lr, #CreateFlag_FloppyEjects :OR: CreateFlag_FixedDiscEjects
BEQ %FT50
MOV r0, #Misc_Eject
MOV r0, #MiscOp_Eject
MOV r1, #((1 :SHL: 31) :EOR: 4)
BL Parent_Misc
50
......@@ -751,13 +751,13 @@ FindErrBlock ROUT
[ BigDisc
BNE %FT45
|
BNE %FT50
BNE %FT50
]
TSTS R0, #DiscErrorBit
BNE %FT40
]
[ Debug3
DLINE "FindErrBlock: In error table bit"
DLINE "FindErrBlock: In error table bit"
]
AND LR, R0, #&FF
TEQS LR, #IntEscapeErr
......@@ -793,7 +793,7 @@ FindErrBlock ROUT
40 ;Form disc err string
Push "r0,r4-r6"
[ Debug3
DLINE "FindErrBlock: 40"
DLINE "FindErrBlock: 40"
]
SUB sp, sp, #20
......@@ -843,21 +843,21 @@ FindErrBlock ROUT
] ; :LNOT:NewErrors
[ BigDisc
B %FT50
B %FT50
45
[ Debug3
DLINE "FindErrBlock: 45"
DLINE "FindErrBlock: 45"
]
[ NewErrors
TSTS R0,#NewDiscErrorBit
|
TSTS R0,#DiscErrorBit
TSTS R0,#DiscErrorBit
]
BEQ %FT50
BEQ %FT50
[ NewErrors
BIC R0,R0,#NewDiscErrorBit
BIC R0,R0,#NewDiscErrorBit
|
BIC R0,R0,#DiscErrorBit
BIC R0,R0,#DiscErrorBit
]
; here if using an extended process error block
Push "r0,r4-r6"
......@@ -869,7 +869,7 @@ FindErrBlock ROUT
[ NewErrors
LDRB r0, [r0,#0]
|
LDR r0, [r0,#4]
LDR r0, [r0,#4]
MOV r0, r0, LSR #(32-3) ; drive number (external)
]
MOV r1, sp
......@@ -881,13 +881,13 @@ FindErrBlock ROUT
[ NewErrors
LDRVCB r0, [r0, #1]
|
LDRVC r0, [r0]
LDRVC r0, [r0]
]
ANDVC r0, r0, #MaxDiscErr
ADDVC r1, sp, #4
MOVVC r2, #4
BLVC OnlyXOS_ConvertHex2
BVS %FT47
BVS %FT47
; Address
LDR r0, [sp, #40]
......@@ -895,35 +895,35 @@ FindErrBlock ROUT
LDR r5, [r0, #4]
LDR r0, [r0, #8]
|
LDR r1, [r0, #4]
MOV r0, r1, LSR #29 ; drive bits
LDR r1, [r0, #4]
MOV r0, r1, LSR #29 ; drive bits
EOR r0,r0,#4
DrvRecPtr lr,r0
LDRB lr, [lr,#DrvsDisc]
AND lr, lr, #7
EOR r0,r0,#4
DrvRecPtr lr,r0
LDRB lr, [lr,#DrvsDisc]
AND lr, lr, #7
DiscRecPtr lr, lr
LDRB r4, [lr, #SectorSize]
RSB r6, r4, #32
BIC r5, r1, #DiscBits
MOV r0, r5, LSR r6
LDRB r4, [lr, #DiscRecord_Log2SectorSize]
RSB r6, r4, #32
BIC r5, r1, #DiscBits
MOV r0, r5, LSR r6
]
MOV r6, r0 ; remember upper word
ADD r1, sp, #8
MOV r2, #12
BL OnlyXOS_ConvertHex8
BVS %FT47
BVS %FT47
[ NewErrors
MOV r0, r5
|
MOV r0, r5, LSL r4
MOV r0, r5, LSL r4
]
ADD r1, sp, #16
MOV r2, #12
BL OnlyXOS_ConvertHex8
ADD r1, sp, #16
MOV r2, #12
BL OnlyXOS_ConvertHex8
BVS %FT47
; Stitch it all together
......@@ -1283,7 +1283,7 @@ InternalFromParent
Pull "R1,PC",VC
; Error occurred - let's convert (if necessary) from old scheme to new.
LDR LR, FS_Flags
TSTS LR, #NewErrorSupport
TSTS LR, #CreateFlag_NewErrorSupport
BNE %FT95
Pull "R1,PC",NE
TSTS R0, #DiscErrorBit
......@@ -1316,7 +1316,7 @@ InternalFromParent
LDRB LR, [LR, #DrvsDisc]
AND LR, LR, #7
DiscRecPtr LR, LR
LDRB R3, [LR, #SectorSize]
LDRB R3, [LR, #DiscRecord_Log2SectorSize]
RSB R0, R3, #32
MOV LR, R4, LSR R0
MOV R4, R4, LSL R3
......@@ -1666,16 +1666,16 @@ OnlyXWimp_ClaimFreeMemory
[ BigDir
OnlyXOS_DynamicArea
Push "LR"
BL OnlyExternal
SWI XOS_DynamicArea
B InternalCommon
Push "LR"
BL OnlyExternal
SWI XOS_DynamicArea
B InternalCommon
OnlyXOS_ChangeDynamicArea
Push "LR"
BL OnlyExternal
SWI XOS_ChangeDynamicArea
B InternalCommon
Push "LR"
BL OnlyExternal
SWI XOS_ChangeDynamicArea
B InternalCommon
]
LTORG
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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