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

Fix to work on pre-HAL machines

The attempt to call OS_IICOp first corrupts r14, which is carefully stacked only to cause a prefetch abort on return. Stack r10 instead.
Tested on RISC OS 4.02.

Version 0.18, 4.5.2.11. Tagged as 'IIC-0_18-4_5_2_11'
parent ef1b0b1e
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.18"
Module_Version SETA 18
Module_MinorVersion SETS "4.5.2.10"
Module_MinorVersion SETS "4.5.2.11"
Module_Date SETS "19 Oct 2016"
Module_ApplicationDate SETS "19-Oct-16"
Module_ComponentName SETS "IIC"
Module_ComponentPath SETS "castle/RiscOS/Sources/HWSupport/IIC"
Module_FullVersion SETS "0.18 (4.5.2.10)"
Module_HelpVersion SETS "0.18 (19 Oct 2016) 4.5.2.10"
Module_FullVersion SETS "0.18 (4.5.2.11)"
Module_HelpVersion SETS "0.18 (19 Oct 2016) 4.5.2.11"
END
......@@ -5,12 +5,12 @@
*
*/
#define Module_MajorVersion_CMHG 0.18
#define Module_MinorVersion_CMHG 4.5.2.10
#define Module_MinorVersion_CMHG 4.5.2.11
#define Module_Date_CMHG 19 Oct 2016
#define Module_MajorVersion "0.18"
#define Module_Version 18
#define Module_MinorVersion "4.5.2.10"
#define Module_MinorVersion "4.5.2.11"
#define Module_Date "19 Oct 2016"
#define Module_ApplicationDate "19-Oct-16"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "IIC"
#define Module_ComponentPath "castle/RiscOS/Sources/HWSupport/IIC"
#define Module_FullVersion "0.18 (4.5.2.10)"
#define Module_HelpVersion "0.18 (19 Oct 2016) 4.5.2.10"
#define Module_FullVersion "0.18 (4.5.2.11)"
#define Module_HelpVersion "0.18 (19 Oct 2016) 4.5.2.11"
#define Module_LibraryVersionInfo "0:18"
......@@ -375,7 +375,7 @@ iis_end
STR R11, IICSWIThreaded
]
Push R14
Push R10
BL Start
BL TXCheckAck ; transmit device address
......@@ -407,10 +407,10 @@ iis_end
MOV R11, #0
STR R11, IICSWIThreaded
]
Pull R14
Pull R10
CMP PC, PC ; also clears V in 32-bit modes
MOVEQ PC, R14 ; 32-bit exit: NZC corrupted
BICS PC, R14, #V_bit ; 26-bit exit: NZC preserved
MOVEQ PC, R10 ; 32-bit exit: NZC corrupted
BICS PC, R10, #V_bit ; 26-bit exit: NZC preserved
TXCheckAck ROUT
Push R14
......
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