Commit 0bd39858 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

WimpSlot extension code failed on a 32-bit system.

Second attempt at getting 32-bit overlay manager to work.

Version 5.21. Tagged as 'RISC_OSLib-5_21'
parent 9076880f
......@@ -25,6 +25,7 @@
# lib.romastubs ROM RISC_OSStubs Apps_Only
# lib.ansilib
# lib.clib
# lib.OverMgr CLib:o.overmgr
# lib.riscoslibm
#---------------------------------------------------------------------------------------------
#
......
......@@ -9,12 +9,16 @@
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
GBLS Module_HelpVersion
Module_MajorVersion SETS "5.20"
Module_Version SETA 520
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.21"
Module_Version SETA 521
Module_MinorVersion SETS ""
Module_Date SETS "19 Oct 2000"
Module_ApplicationDate2 SETS "19-Oct-00"
Module_ApplicationDate4 SETS "19-Oct-2000"
Module_FullVersion SETS "5.20"
Module_HelpVersion SETS "5.20 (19 Oct 2000)"
Module_Date SETS "08 Nov 2000"
Module_ApplicationDate2 SETS "08-Nov-00"
Module_ApplicationDate4 SETS "08-Nov-2000"
Module_ComponentName SETS "RISC_OSLib"
Module_ComponentPath SETS "RiscOS/Sources/Lib/RISC_OSLib"
Module_FullVersion SETS "5.21"
Module_HelpVersion SETS "5.21 (08 Nov 2000)"
END
/* (5.20)
/* (5.21)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 5.20
#define Module_MajorVersion_CMHG 5.21
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Oct 2000
#define Module_Date_CMHG 08 Nov 2000
#define Module_MajorVersion "5.20"
#define Module_Version 520
#define Module_MajorVersion "5.21"
#define Module_Version 521
#define Module_MinorVersion ""
#define Module_Date "19 Oct 2000"
#define Module_Date "08 Nov 2000"
#define Module_ApplicationDate2 "19-Oct-00"
#define Module_ApplicationDate4 "19-Oct-2000"
#define Module_ApplicationDate2 "08-Nov-00"
#define Module_ApplicationDate4 "08-Nov-2000"
#define Module_FullVersion "5.20"
#define Module_HelpVersion "5.20 (19 Oct 2000)"
#define Module_ComponentName "RISC_OSLib"
#define Module_ComponentPath "RiscOS/Sources/Lib/RISC_OSLib"
#define Module_FullVersion "5.21"
#define Module_HelpVersion "5.21 (08 Nov 2000)"
......@@ -1281,23 +1281,29 @@ SetWimpSlot Keep
MOV r0, #Env_MemoryLimit
MOV r1, #0
SWI ChangeEnv
MOV r5, r1
MOV r5, r1 ; r5 = current memory limit
MOV r0, #Env_ApplicationSpace
MOV r1, #0
SWI ChangeEnv
CMP r1, r5
MOVNE r0, #Env_MemoryLimit
SWINE ChangeEnv
CMP r1, r5 ; is memory limit=application space?
BNE SetWimpSlot_DoFudge ; if not, make it so.
SUB r0, r4, #Application_Base
MOV r1, #-1
SWI XWimp_SlotSize
MOVNE r4, r0
MOVNE r0, #Env_MemoryLimit
MOVNE r1, r5
SWINE ChangeEnv
MOVNE r0, r4
SWI XWimp_SlotSize ; change slot size
Return ,LinkNotStacked
SetWimpSlot_DoFudge
MOV r0, #Env_MemoryLimit
SWI ChangeEnv
SUB r0, r4, #Application_Base
MOV r1, #-1
SWI XWimp_SlotSize ; change slot size
MOV r4, r0
MOV r0, #Env_MemoryLimit
MOV r1, r5
SWI ChangeEnv
MOV r0, r4
Return ,LinkNotStacked
; Our own exit handler, which restores our parent's environment then exits.
; Just in case a C program manages to (call something which) does a SWI Exit.
......
......@@ -158,8 +158,6 @@ WorkSpaceEnd DCD |Overlay$$Data$$Limit|
LDR IP, WorkSpace
ADD IP, IP, #Work_RSave
STMIA IP, {R0-R8,LR}
SUB LR, LR, PC ; remove PSR bits from LR (if there)
ADD LR, PC, LR ; (LR left +4)
; 1. Check workspace is big enough for me. Only check if debugging
; LDR R1, WorkSpace
......@@ -183,10 +181,12 @@ strip_tail
BNE strip_tail
strip_tail1
ADD R2, R2, #1
MOV R0, #0
MOVS R0, #0 ; set Z (for TEQ PC,PC below)
STRB R0, [R1, R2]
ADD PC, LR, #ZeroInitCodeOffset-4
TEQ PC, PC
ADDEQ PC, LR, #ZeroInitCodeOffset ; 32-bit version
ADDNES PC, LR, #ZeroInitCodeOffset ; 26-bit version
;NoMem DCD TopBit:OR:Error_OutOfMemory
; = "Overlay$$Data area too small", 0
......
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