Commit c57300a1 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Refactor unaligned LDM in old style error return

Would only trigger if ADFS was being run on an ARMv7 but using an old style FileCore that didn't support the new error scheme, hence mostly for completeness.
Spotted by Jon Abbott, ref https://www.riscosopen.org/forum/forums/4/topics/3682

Typo in error string corrected in passing.

Version 3.49. Tagged as 'ADFS-3_49'
parent 26c40bae
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.48"
Module_Version SETA 348
Module_MajorVersion SETS "3.49"
Module_Version SETA 349
Module_MinorVersion SETS ""
Module_Date SETS "27 Jan 2013"
Module_ApplicationDate SETS "27-Jan-13"
Module_Date SETS "28 Oct 2015"
Module_ApplicationDate SETS "28-Oct-15"
Module_ComponentName SETS "ADFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
Module_FullVersion SETS "3.48"
Module_HelpVersion SETS "3.48 (27 Jan 2013)"
Module_FullVersion SETS "3.49"
Module_HelpVersion SETS "3.49 (28 Oct 2015)"
END
/* (3.48)
/* (3.49)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.48
#define Module_MajorVersion_CMHG 3.49
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 27 Jan 2013
#define Module_Date_CMHG 28 Oct 2015
#define Module_MajorVersion "3.48"
#define Module_Version 348
#define Module_MajorVersion "3.49"
#define Module_Version 349
#define Module_MinorVersion ""
#define Module_Date "27 Jan 2013"
#define Module_Date "28 Oct 2015"
#define Module_ApplicationDate "27-Jan-13"
#define Module_ApplicationDate "28-Oct-15"
#define Module_ComponentName "ADFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
#define Module_FullVersion "3.48"
#define Module_HelpVersion "3.48 (27 Jan 2013)"
#define Module_LibraryVersionInfo "3:48"
#define Module_FullVersion "3.49"
#define Module_HelpVersion "3.49 (28 Oct 2015)"
#define Module_LibraryVersionInfo "3:49"
......@@ -27,7 +27,7 @@ $num FSErr $name, $str
11 FSErr FormatEsc, Escape whilst formatting (disc structure invalid)
70 FSErr FormatNotSupportedOnWinnie, Format not available for Winnies
71 FSErr DensityNotSupported, Density not supported
72 FSErr SectorSizeNotSupported, Sectors size not supported
72 FSErr SectorSizeNotSupported, Sector size not supported
73 FSErr TooManySectors, Too many sectors on a track
74 FSErr BadFormat, Bad format
75 FSErr TooManyDefects2, Too many defects
......
......@@ -305,10 +305,8 @@ ConvertErrorForParent ROUT
ORREQ R0, R0, #ExternalErrorBit
Pull "PC", EQ ; then set external error bit, and return
Push "R1,R2"
ASSERT NewDiscErrorBit < bit2 ; LDM ignores bits 0 and 1
LDMIA R0, {R1,R2,R3}
; MOV LR, #&80
; STMIA LR, {R0-R3}
BIC R3, R0, #3 ; Knock out the 2 flags
LDMIA R3, {R1,R2,R3}
[ BigDisc
TSTS R2, #DiscBits
TEQEQS R3, #0 ; return old-style error if address is small
......@@ -324,8 +322,6 @@ ConvertErrorForParent ROUT
ADR R0, WinIDEErrorNo
STMIA R0, {R1,R2}
ORR R0, R0, #DiscErrorBit+ExternalErrorBit
; MOV LR,#&A0
; STMIA LR, {R0,R1,R2}
B %FT90
05
]
......@@ -336,8 +332,6 @@ ConvertErrorForParent ROUT
AND LR, R1, #MaxDiscErr:SHL:8
ORR R0, R0, LR, LSL #(24-8)
ORR R0, R0, #DiscErrorBit
; MOV LR,#&A0
; STMIA LR, {R0}
90
Pull "R1,R2,PC"
]
......
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