diff --git a/VersionASM b/VersionASM index facea337e571020d41d9b438a4eb10c4ce5edcc8..2b8666c6c36e2dbcb396b834e74a900848b9320a 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.184" +Module_MinorVersion SETS "4.79.2.185" Module_Date SETS "24 Mar 2013" Module_ApplicationDate SETS "24-Mar-13" Module_ComponentName SETS "Kernel" Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel" -Module_FullVersion SETS "5.35 (4.79.2.184)" -Module_HelpVersion SETS "5.35 (24 Mar 2013) 4.79.2.184" +Module_FullVersion SETS "5.35 (4.79.2.185)" +Module_HelpVersion SETS "5.35 (24 Mar 2013) 4.79.2.185" END diff --git a/VersionNum b/VersionNum index 687679905c81a1df7cb71293dbfb3867277d95ec..4aa1cd5da9938af902bb6c8e6579f026cdf306e5 100644 --- a/VersionNum +++ b/VersionNum @@ -5,12 +5,12 @@ * */ #define Module_MajorVersion_CMHG 5.35 -#define Module_MinorVersion_CMHG 4.79.2.184 +#define Module_MinorVersion_CMHG 4.79.2.185 #define Module_Date_CMHG 24 Mar 2013 #define Module_MajorVersion "5.35" #define Module_Version 535 -#define Module_MinorVersion "4.79.2.184" +#define Module_MinorVersion "4.79.2.185" #define Module_Date "24 Mar 2013" #define Module_ApplicationDate "24-Mar-13" @@ -18,6 +18,6 @@ #define Module_ComponentName "Kernel" #define Module_ComponentPath "castle/RiscOS/Sources/Kernel" -#define Module_FullVersion "5.35 (4.79.2.184)" -#define Module_HelpVersion "5.35 (24 Mar 2013) 4.79.2.184" +#define Module_FullVersion "5.35 (4.79.2.185)" +#define Module_HelpVersion "5.35 (24 Mar 2013) 4.79.2.185" #define Module_LibraryVersionInfo "5:35" diff --git a/s/PMF/osword b/s/PMF/osword index a24940a28164aad9969217ab9c3e61cd54ba8a7d..3b6b7b9231ae354d08de4645b472dfd98f5f649f 100644 --- a/s/PMF/osword +++ b/s/PMF/osword @@ -544,21 +544,10 @@ OsWord0F ROUT MOVEQ R9, #3 TEQ R9, #0 - Pull "R5-R10, PC", EQ ; unknown call, pass it on - -; first set up data in registers as follows :- -; R0 = hours -; R1 = minutes -; R2 = days -; R3 = months -; (R4 -> block) -; R5 = year(lo) -; R6 = year(hi) -; R7 = seconds -; R8 = centiseconds + Pull "R5-R10, PC", EQ ; unknown call, pass it on TST R9, #2 - BEQ %FT01 + BEQ %FT01 ; no date parsing ; KJB 980908 - can't assume length of date, as %w3, %dy and %m3 may be any length. Unfortunately, ; the string may not be terminated. Best we can do is plop a terminator at the maximum length position, @@ -612,27 +601,30 @@ OsWord0F ROUT ADDVS sp, sp, r10 ; and junk variable length string on stack BVS Bad0F - CMP r9, #2 ; if just writing the date, write it ! - BEQ %FT10 - BGT %FT05 ; if writing everything just get UTC time + CMP r9, #2 ; if writing everything just go to UTC conversion step + BHI %FT05 -; We only have the time from the string, we now need the date -; because changing the time may change it. +; We have the time but no date, or have the date but no time. Get the missing fields +; because changing the one can roll the other across a timezone. + + ADDLO r7, sp, #0*4 + ADDEQ r7, sp, #4*4 + LDMIA r7, {r3-r6} ; preserve the values we have converted ADR r0, RealTime LDMIA r0, {r0,r1} ; LDM is atomic wrt interrupts Push "r0,r1" ; put value on stack MOV r0,#-1 ; use configured territory. - ADD r2, sp, #8 - LDMIA r2, {r3-r6} ; preserve time values from entry string MOV r1, sp + ADD r2, sp, #8 SWI XTerritory_ConvertTimeToOrdinals ; get ordinals for current time - ADDVS sp, sp, #44 ; 36 From above + 8 for 5 byte time + ADDVS sp, sp, #36+8 ; 36 from above + 8 for stacked 5 byte time ADDVS sp, sp, r10 ; and junk string as well BVS Bad0F ADD sp, sp, #8 ; dump 5 byte time on TOS - STMIA r2, {r3-r6} ; restore the time we read from the string. + + STMIA r7, {r3-r6} ; restore the values we have converted 05 ; Now [SP] -> ordinals in local time, but we want time in UTC @@ -643,7 +635,7 @@ OsWord0F ROUT SUB sp, sp, #8 ; two more words to contain 5 byte time MOV r1, sp SWI XTerritory_ConvertOrdinalsToTime - ADDVS sp, sp, #44 ; 36 From above + 8 for 5 byte time. + ADDVS sp, sp, #36+8 ; 36 from above + 8 for 5 byte time ADDVS sp, sp, r10 ; and junk string as well BVS Bad0F @@ -652,7 +644,7 @@ OsWord0F ROUT MOV r1, sp ; our 5 byte time ADD r2, sp, #8 ; place to put ordinals SWI XTerritory_ConvertTimeToUTCOrdinals - ADDVS sp, sp, #44 ; 36 bytes ordinals + 8 for 5 byte time. + ADDVS sp, sp, #36+8 ; 36 bytes ordinals + 8 for 5 byte time ADDVS sp, sp, r10 ; and junk string as well BVS Bad0F @@ -664,7 +656,7 @@ OsWord0F ROUT LDR r8, [sp], #4 ; centiseconds LDR r7, [sp], #4 ; seconds LDR r1, [sp], #4 ; minutes - Pull "r0,r2,r3,r5" ; hours, day of month, month, year + Pull "r0,r2,r3,r5" ; hours, day of month, month, year ADD sp, sp, #8 ; junk day of week, day of year ADD sp, sp, r10 ; and string on stack MOV r4, #100