Commit 92303eae authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Treat memory sizes as unsigned

Detail:
  s/Switcher - Treat memory sizes as unsigned values. We don't deal with negative sizes, so there's no reason to be using signed arithmetic.
Admin:
  Tested on BB-xM


Version 1.42. Tagged as 'Switcher-1_42'
parent 7c360ff6
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.41"
Module_Version SETA 141
Module_MajorVersion SETS "1.42"
Module_Version SETA 142
Module_MinorVersion SETS ""
Module_Date SETS "17 Nov 2012"
Module_ApplicationDate SETS "17-Nov-12"
Module_Date SETS "23 Jul 2014"
Module_ApplicationDate SETS "23-Jul-14"
Module_ComponentName SETS "Switcher"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Switcher"
Module_FullVersion SETS "1.41"
Module_HelpVersion SETS "1.41 (17 Nov 2012)"
Module_FullVersion SETS "1.42"
Module_HelpVersion SETS "1.42 (23 Jul 2014)"
END
/* (1.41)
/* (1.42)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.41
#define Module_MajorVersion_CMHG 1.42
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Nov 2012
#define Module_Date_CMHG 23 Jul 2014
#define Module_MajorVersion "1.41"
#define Module_Version 141
#define Module_MajorVersion "1.42"
#define Module_Version 142
#define Module_MinorVersion ""
#define Module_Date "17 Nov 2012"
#define Module_Date "23 Jul 2014"
#define Module_ApplicationDate "17-Nov-12"
#define Module_ApplicationDate "23-Jul-14"
#define Module_ComponentName "Switcher"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Switcher"
#define Module_FullVersion "1.41"
#define Module_HelpVersion "1.41 (17 Nov 2012)"
#define Module_LibraryVersionInfo "1:41"
#define Module_FullVersion "1.42"
#define Module_HelpVersion "1.42 (23 Jul 2014)"
#define Module_LibraryVersionInfo "1:42"
......@@ -3089,10 +3089,10 @@ setmemstring
Push "R0-R2,LR"
;
LDR R0,[userblk,#icb_memsize]
MOV R0,R0,ASR #10 ; R0 = memory size in K
MOV R0,R0,LSR #10 ; R0 = memory size in K
ADD R1,R1,#i_data ; R1 --> buffer
MOV R2,#11 ; R2 = buffer size-1 (for "K")
SWI XOS_ConvertInteger4
SWI XOS_ConvertCardinal4
MOVVS R14,#"?" ; use "?" to report errors!
MOVVC R14,#"K"
STRB R14,[R1],#1
......@@ -3139,13 +3139,13 @@ setmembar
MOV R2,#512*1024
03
CMP R1,R2
ADDLT R14,R3,R1, LSR R0
BLT %FT05
ADDLO R14,R3,R1, LSR R0
BLO %FT05
ADD R3,R3,#512*1024
SUB R1,R1,R2
ADD R0,R0,#1
MOV R2,R2, LSL #1
B %BT03
MOVS R2,R2, LSL #1
BNE %BT03
05
Pull "R0-R3"
]
......@@ -3178,13 +3178,13 @@ calcbarcoords
MOV cy1,#512*1024
03
CMP R1,cy1
ADDLT R1,R14,R1, LSR R0
BLT %FT05
ADDLO R1,R14,R1, LSR R0
BLO %FT05
ADD R14,R14,#512*1024
SUB R1,R1,cy1
ADD R0,R0,#1
MOV cy1,cy1, LSL #1
B %BT03
MOVS cy1,cy1, LSL #1
BNE %BT03
05
07
]
......@@ -4719,13 +4719,13 @@ null_event ROUT
MOV R1,R0
03
CMP R1,R4
ADDLT R0,R14,R1, LSL R3 ; want result in R0
BLT %FT05
ADDLO R0,R14,R1, LSL R3 ; want result in R0
BLO %FT05
ADD R14,R14,R2
SUB R1,R1,R4
ADD R3,R3,#1
MOV R2,R2, LSL #1
B %BT03
MOVS R2,R2, LSL #1
BNE %BT03
05
Pull "R2-R4"
]
......@@ -6501,7 +6501,7 @@ setmemcommand
BL writestr ; output prefix
SUB sp,sp,#8
MOVVC R0,R1,ASR #10 ; R0 = size in K
MOVVC R0,R1,LSR #10 ; R0 = size in K
MOVVC R1,sp
MOVVC R2,#8 ; allows for up to 9999999K
SWIVC XOS_ConvertCardinal4
......
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