From 23e2c1e036125cf8f28b9a26068b6b26a3f54a09 Mon Sep 17 00:00:00 2001 From: John Ballance <jballance@gitlab.riscosopen.org> Date: Mon, 18 Jan 2010 19:07:41 +0000 Subject: [PATCH] modified s.PMF.osword to cope with the iyonix RTC operating in BCD Also upissued to RISC OS 5.16 to release this in ROM Detail: (list files and functions that have changed) Admin: tested at Castle (JB) (highlight level of testing that has taken place) (bugfix number if appropriate) Version 5.35, 4.79.2.107. Tagged as 'Kernel-5_35-4_79_2_107' --- Version | 6 +++--- VersionASM | 10 +++++----- VersionNum | 14 +++++++------- s/PMF/osword | 35 ++++++++++++++++++++--------------- 4 files changed, 35 insertions(+), 30 deletions(-) diff --git a/Version b/Version index 5a12cd6..a1b30b0 100644 --- a/Version +++ b/Version @@ -14,9 +14,9 @@ Version SETA Module_Version VString SETS Module_MajorVersion Date SETS Module_Date ; version for STB/NC OS | -Version SETA 515 -VString SETS "5.15" -Date SETS "24 Apr 2009" ; version for RISC OS on desktop computers +Version SETA 516 +VString SETS "5.16" +Date SETS "18 Jan 2010" ; version for RISC OS on desktop computers ; you may also wish to update the welcome ; and OS information dialogue box templates diff --git a/VersionASM b/VersionASM index c4980d4..56a59f6 100644 --- a/VersionASM +++ b/VersionASM @@ -13,11 +13,11 @@ GBLS Module_ComponentPath Module_MajorVersion SETS "5.35" Module_Version SETA 535 -Module_MinorVersion SETS "4.79.2.106" -Module_Date SETS "06 Nov 2009" -Module_ApplicationDate SETS "06-Nov-09" +Module_MinorVersion SETS "4.79.2.107" +Module_Date SETS "18 Jan 2010" +Module_ApplicationDate SETS "18-Jan-10" Module_ComponentName SETS "Kernel" Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel" -Module_FullVersion SETS "5.35 (4.79.2.106)" -Module_HelpVersion SETS "5.35 (06 Nov 2009) 4.79.2.106" +Module_FullVersion SETS "5.35 (4.79.2.107)" +Module_HelpVersion SETS "5.35 (18 Jan 2010) 4.79.2.107" END diff --git a/VersionNum b/VersionNum index d09414d..8bc23f0 100644 --- a/VersionNum +++ b/VersionNum @@ -5,19 +5,19 @@ * */ #define Module_MajorVersion_CMHG 5.35 -#define Module_MinorVersion_CMHG 4.79.2.106 -#define Module_Date_CMHG 06 Nov 2009 +#define Module_MinorVersion_CMHG 4.79.2.107 +#define Module_Date_CMHG 18 Jan 2010 #define Module_MajorVersion "5.35" #define Module_Version 535 -#define Module_MinorVersion "4.79.2.106" -#define Module_Date "06 Nov 2009" +#define Module_MinorVersion "4.79.2.107" +#define Module_Date "18 Jan 2010" -#define Module_ApplicationDate "06-Nov-09" +#define Module_ApplicationDate "18-Jan-10" #define Module_ComponentName "Kernel" #define Module_ComponentPath "castle/RiscOS/Sources/Kernel" -#define Module_FullVersion "5.35 (4.79.2.106)" -#define Module_HelpVersion "5.35 (06 Nov 2009) 4.79.2.106" +#define Module_FullVersion "5.35 (4.79.2.107)" +#define Module_HelpVersion "5.35 (18 Jan 2010) 4.79.2.107" #define Module_LibraryVersionInfo "5:35" diff --git a/s/PMF/osword b/s/PMF/osword index 92e513e..e4407cb 100644 --- a/s/PMF/osword +++ b/s/PMF/osword @@ -695,27 +695,32 @@ CheckYear ROUT TEQ R0, #RTCAddressPHI MOVEQ R1, #5 MOVNE R1, #6 ; year address (dependant on RTC) - SUB R13, R13, #4 - STRB R1, [R13] - MOV R1, R13 - ORR R0, R0, #1:SHL:29 - MOV R2, #1 + STRB R1, [R13, #-4]! + MOV R1, R13 + ORR R0, R0, #1:SHL:29 + MOV R2, #1 BL IIC_Op - ORR R0, R0, #1 - BL IIC_Op - AND R1, R0, #&FF - LDRB R0, [R13] - ADD R13, R13, #4 + ORR R0, R0, #1 + BL IIC_Op + AND R1, R0, #&FF + LDRB R0, [R13], #4 TEQ R1, #RTCAddressPHI+1 - MOVEQ R1, R0, LSR #6 - ANDNE R1, R0, #3 ; R1= year MOD 4 + MOVEQ R0, R0, LSR #6 ; R1= year MOD 4 + BLNE BCDToHex + MOV R2, R0 ; remember RTC value MOV R0, #YearCMOS BL Read - AND R2, R0, #3 - SUBS R2, R1, R2 ; same year ? + + TEQ R1, #RTCAddressPHI+1 + ANDEQ R1, R0, #3 + MOVNE R1, R0 + MOVEQ R14,#4 + MOVNE R14,#100 + + SUBS R2, R2, R1 ; same year ? Pull "R0,R1,R2,PC", EQ ; [yes, so no bother] - ADDCC R2, R2, #4 ; if lower, then must be carry + ADDCC R2, R2, R14 ; if lower, then must be carry ADD R2, R0, R2 ; new year value CMP R2, #100 BCC %FT10 ; no carry thru to next century -- GitLab