Commit 58496303 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Third time lucky.

Admin:
  Tested - and it doesn't result in FileCore in use errors any more.


Version 2.63. Tagged as 'FileSwitch-2_63'
parent 701872a3
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "2.62"
Module_Version SETA 262
Module_MajorVersion SETS "2.63"
Module_Version SETA 263
Module_MinorVersion SETS ""
Module_Date SETS "02 Jun 2001"
Module_ApplicationDate2 SETS "02-Jun-01"
Module_ApplicationDate4 SETS "02-Jun-2001"
Module_Date SETS "04 Jun 2001"
Module_ApplicationDate2 SETS "04-Jun-01"
Module_ApplicationDate4 SETS "04-Jun-2001"
Module_ComponentName SETS "FileSwitch"
Module_ComponentPath SETS "RiscOS/Sources/FileSys/FileSwitch"
Module_FullVersion SETS "2.62"
Module_HelpVersion SETS "2.62 (02 Jun 2001)"
Module_FullVersion SETS "2.63"
Module_HelpVersion SETS "2.63 (04 Jun 2001)"
END
/* (2.62)
/* (2.63)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.62
#define Module_MajorVersion_CMHG 2.63
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Jun 2001
#define Module_Date_CMHG 04 Jun 2001
#define Module_MajorVersion "2.62"
#define Module_Version 262
#define Module_MajorVersion "2.63"
#define Module_Version 263
#define Module_MinorVersion ""
#define Module_Date "02 Jun 2001"
#define Module_Date "04 Jun 2001"
#define Module_ApplicationDate2 "02-Jun-01"
#define Module_ApplicationDate4 "02-Jun-2001"
#define Module_ApplicationDate2 "04-Jun-01"
#define Module_ApplicationDate4 "04-Jun-2001"
#define Module_ComponentName "FileSwitch"
#define Module_ComponentPath "RiscOS/Sources/FileSys/FileSwitch"
#define Module_FullVersion "2.62"
#define Module_HelpVersion "2.62 (02 Jun 2001)"
#define Module_FullVersion "2.63"
#define Module_HelpVersion "2.63 (04 Jun 2001)"
......@@ -343,35 +343,12 @@ Run_UndatedFile
MOV r1, r0 ; NB. Our strings are all dead now
BL SkipOverNameAndSpaces ; r1 -> copy of command tail
;Check absolute AIF image memory limits
CMP r2, #&8000
BNE %FT71
LDR lr, [r2, #&0C]
AND lr, lr, #&FF000000
TEQ lr, #&EB000000 ; is this instruction a branch
BNE %FT71 ; nope - not executable AIF then
LDR lr, [r2, #&10]! ; should be SWI OS_Exit (&EF000011 for AIF), R2 := R2 + 16
SUB lr, lr, #&EF000000
TEQ lr, #&00000011 ; OS_Exit check worked?
LDMEQIB r2, {r0,r1,r2,lr} ; load RO size, RW size, Debug size, ZI size
ADDEQ lr, lr, r2 ; lr := debug + zero init
MOV r2, #&8000 ; R2 := &8000 like it was before
BNE %FT71 ; not AIF then
ADD r0, r0, r1 ; R0 := read only + read write
ADD r0, r0, lr ; R0 := read only + read write + debug + zero init
ADD r5, r2, r0 ; R5 := base address + size required
BL ValidateR2R5_WriteToCoreCodeLoad
BVS RunExit_FF
71
[ StrongARM
;Check whether it's a squeezed app.
CMP r2, #&8000
BNE %FT77 ;Not an 'APP' (type FF8)
[ StrongARM
LDR lr, [r2]
;To save unnecessary hassle, weed out the uncompressed cases...
......@@ -426,11 +403,40 @@ Run_UndatedFile
;to sync with the finally unsqueezed and patched up code
MOV r0, #0
SWI XOS_SynchroniseCodeAreas
]
[ {TRUE}
;Check absolute AIF image memory limits
LDR lr, [r2, #&0C]
AND lr, lr, #&FF000000
TEQ lr, #&EB000000 ; is this instruction a branch
BNE %FT71 ; nope - not executable AIF then
LDR lr, [r2, #&10]! ; should be SWI OS_Exit (&EF000011 for AIF), R2 := R2 + 16
SUB lr, lr, #&EF000000
TEQ lr, #&00000011 ; OS_Exit check worked?
LDMEQIB r2, {r0,r1,r12,lr} ; load RO size, RW size, Debug size, ZI size
MOV r2, #&8000 ; R2 := &8000 like it was before
BNE %FT71 ; not AIF then
ADD lr, lr, r12 ; lr := debug + zero init
ADD r0, r0, r1 ; R0 := read only + read write
ADD r0, r0, lr ; R0 := read only + read write + debug + zero init
ADD r5, r2, r0 ; R5 := base address + size required
BL ValidateR2R5_WriteToCoreCodeLoad
BVC %FT71
; /* dead here - need to generate an error */
addr r0, ErrorBlock_CoreNotWriteable
MOV r1, #0
SWI XMessageTrans_ErrorLookup
SWI OS_GenerateError
71
]
[ StrongARM
;Finally, prepare to run the thing!
MOV r2, r4 ; We're gonna jump in where we're told!.
77
]
77
LDR sp, =SVCSTK ; Flatten superstack, we don't return
WritePSRc 0, r12 ; USR mode, all ints on
......
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