diff --git a/Makefile b/Makefile index d82ff37b4461b8ab5a96494d1a473f62a17ead1b..53c5dad15bcafb6ee9c934c78071ef545852fbf5 100644 --- a/Makefile +++ b/Makefile @@ -132,12 +132,11 @@ ${GPADBG}: ${AIFDBG} s.TMOSHelp: ${TOKENS} HelpStrs ${TOKENISE} ${TOKENS} HelpStrs $@ -s.Time+Date: - @echo |IGBLS Builddate|JBuilddate SETS "<Sys$Date> <Sys$Year>.<Sys$Time>" |J|IEND { > s.Time+Date } - settype s.Time+Date FFF +#s.Time+Date: +# @echo |IGBLS Builddate|JBuilddate SETS "<Sys$Date> <Sys$Year>.<Sys$Time>" |J|IEND { > s.Time+Date } +# settype s.Time+Date FFF -o.GetAll: s.TMOSHelp \ - s.Time+Date +o.GetAll: s.TMOSHelp # # Exported interface headers diff --git a/Version b/Version index 21cb71af3a5c8d414c94b5210915c2083488cb44..7fc672001fe52ffca11c752108579c92fa2cc50f 100644 --- a/Version +++ b/Version @@ -16,12 +16,17 @@ Date SETS Module_Date ; version for STB/NC OS | Version SETA 517 VString SETS "5.17" + [ (Version :AND: 1) = 1 +Date SETS Module_Date ; Odd-numbered (i.e. development) build, use + ; date of last source checkin + | Date SETS "19 Jan 2010" ; version for RISC OS on desktop computers ; you may also wish to update the welcome ; and OS information dialogue box templates ; in the sources for Desktop and Switcher ; (especially for year change) + ] ] END diff --git a/VersionASM b/VersionASM index ee06e7c33b7844cf1ac0d797e12dab612e31c43d..f829e19c8d6c2ea8a21b7fc60dd9657497ad3ffb 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.114" -Module_Date SETS "18 Jul 2011" -Module_ApplicationDate SETS "18-Jul-11" +Module_MinorVersion SETS "4.79.2.115" +Module_Date SETS "31 Jul 2011" +Module_ApplicationDate SETS "31-Jul-11" Module_ComponentName SETS "Kernel" Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel" -Module_FullVersion SETS "5.35 (4.79.2.114)" -Module_HelpVersion SETS "5.35 (18 Jul 2011) 4.79.2.114" +Module_FullVersion SETS "5.35 (4.79.2.115)" +Module_HelpVersion SETS "5.35 (31 Jul 2011) 4.79.2.115" END diff --git a/VersionNum b/VersionNum index f6f5ee160aa88028c7bc765c4daa12c7890f38fd..76a238a06634b69a1164acfecd92f7ccad5c0b6c 100644 --- a/VersionNum +++ b/VersionNum @@ -5,19 +5,19 @@ * */ #define Module_MajorVersion_CMHG 5.35 -#define Module_MinorVersion_CMHG 4.79.2.114 -#define Module_Date_CMHG 18 Jul 2011 +#define Module_MinorVersion_CMHG 4.79.2.115 +#define Module_Date_CMHG 31 Jul 2011 #define Module_MajorVersion "5.35" #define Module_Version 535 -#define Module_MinorVersion "4.79.2.114" -#define Module_Date "18 Jul 2011" +#define Module_MinorVersion "4.79.2.115" +#define Module_Date "31 Jul 2011" -#define Module_ApplicationDate "18-Jul-11" +#define Module_ApplicationDate "31-Jul-11" #define Module_ComponentName "Kernel" #define Module_ComponentPath "castle/RiscOS/Sources/Kernel" -#define Module_FullVersion "5.35 (4.79.2.114)" -#define Module_HelpVersion "5.35 (18 Jul 2011) 4.79.2.114" +#define Module_FullVersion "5.35 (4.79.2.115)" +#define Module_HelpVersion "5.35 (31 Jul 2011) 4.79.2.115" #define Module_LibraryVersionInfo "5:35" diff --git a/hdr/KernelWS b/hdr/KernelWS index 14fff4d5457558a3586609447333089ee85e45b6..d1fc748511dac6fb04874ffef5a05424fb2e56a1 100644 --- a/hdr/KernelWS +++ b/hdr/KernelWS @@ -1305,6 +1305,8 @@ AplWorkSize * AppSpaceDANode + DANode_Size EnvString # 256 ] +ExtendedROMFooter # 4 ; Pointer to the extended ROM footer structure. 0 if not initialised, -1 if not found. + [ :DEF: ShowWS ! 0, "Free space after EnvString = ":CC::STR:(&500-@) ] @@ -1927,6 +1929,11 @@ GSVarWSpace # GSVarWSpace_Size SysVarWorkSpace # 40 ; used by the sys$* variables for reading the current time into ] +ROMBuildDate # 128 + [ UseNewFX0Error +NewFX0Error # 64 + ] + KbuffsEnd # 0 KbuffsSize * KbuffsEnd - KbuffsBaseAddress ;size of Kernel buffers area diff --git a/hdr/Options b/hdr/Options index c2b19db983b2dd9b1bbd09d1b8e617da275bf241..98614ac13585868c7d813720f3a5c43afb2e2f06 100644 --- a/hdr/Options +++ b/hdr/Options @@ -390,6 +390,9 @@ PollMouse SETL {FALSE} ; Poll mouse. GBLL ProcessorVectors ProcessorVectors SETL {TRUE} ; Processor vectors indirected through 0 page. + GBLL UseNewFX0Error +UseNewFX0Error SETL (:LNOT: Embedded_UI) :LAND: ((Version :AND: 1) = 1) ; Whether *FX 0 should show the ROM link date instead of the UtilityModule date + GBLS GetUnsqueeze [ SqueezeMods GetUnsqueeze SETS "GET s.Unsqueeze" diff --git a/s/Middle b/s/Middle index ac067d216f22dfd679ba0d12473b73a4ee55c341..6a03988bf309f8338826bc56817e78b08530c270 100644 --- a/s/Middle +++ b/s/Middle @@ -1957,15 +1957,112 @@ osri6_maxvalue * (.-4-osri6_table) :SHR: 2 CMP R1, #0 ADREQ R0, RSI9_OSname ; The OS name BEQ %FT95 - CMP R1, #2 - ADREQ R0, RSI9_Builddate ; The build date (dynamically generated) + CMP R1, #2 ; The build date (dynamically generated) MOVNE R0, #0 ; Other ones are unimplemented + BNE %FT95 + LDR R0, =ROMBuildDate + LDRB R1, [R0] + CMP R1, #0 + BNE %FT94 + ; Build date string hasn't been generated yet. Generate it. + Push "r0,r2-r3,lr" + MOV R0, #0 + BL ExtendedROMFooter_FindTag + CMP R0, #0 ; Found it? + STREQ R0, [R13] + BEQ %FT93 + ; For compatability, make this string match the same format as the old + ; string. Conveniently, this matches the format string used by OS_Word + ; 14 + LDR R1, [R13] + MOV R2, #?ROMBuildDate + ADRL R3, TimeFormat + SWI XOS_ConvertDateAndTime + MOVVS R0, #0 + STRVS R0, [R13] +93 + Pull "r0,r2-r3,lr" +94 + MOV R1, #2 95 ExitSWIHandler - GET s.Time+Date +; +; Extended ROM footer functions +; +; These operate on a new tag-based structure located at the end of the ROM +; image. Each entry consists of a one-byte ID, a one-byte length, and then N +; bytes of data. The length byte doesn't count the two initial header bytes. +; +; The end of the list is implicity terminated by a footer word; the footer word +; contains the length of the structure in the low two bytes (minus the length of +; the footer word), and a 16-bit CRC in the top two bytes (again, minus the +; footer word). The footer word will be word-aligned, but everything else is +; assumed to be byte aligned. +; +; Current tags: +; +; 0 ROM build date, stored as 5-byte time (length = 5) +; + +ExtendedROMFooter_Find ROUT + ; Find the header word for the extended ROM footer. Returns -1 if not found. + Push "r1-r4,lr" + LDR r4, =ZeroPage + LDR r0, [r4, #ExtendedROMFooter] + CMP r0, #0 + BNE %FT10 + ; Examine the end of the ROM image + ; Footer should be located just before the standard 20 byte footer + LDR r2, =ROM+OSROM_ImageSize*1024-24 + LDR r1, [r2] + CMP r1, #-1 + MOVEQ r0, r1 + BEQ %FT09 + ; Check CRC + MOV r1, r1, LSL #16 + SUB r1, r2, r1, LSR #16 + MOV r3, #1 + SWI XOS_CRC + MOVVS r0, #-1 + BVS %FT09 + LDR r1, [r2] + CMP r0, r1, LSR #16 + MOVNE r0, #-1 + MOVEQ r0, r2 +09 + STR r0, [r4, #ExtendedROMFooter] +10 + Pull "r1-r4,pc" + +ExtendedROMFooter_FindTag ROUT + ; Find the tag number given in R0. + ; Returns data pointer in R0 & length in R1 on success. + ; Returns 0 in R0 (and corrupt R1) for failure. + Push "r2-r3,lr" + MOV r2, r0 + BL ExtendedROMFooter_Find + CMP r0, #-1 + BEQ %FT09 + MOV r3, r0 + LDR r0, [r0] + MOV r0, r0, LSL #16 + SUB r0, r3, r0, LSR #16 +05 + CMP r0, r3 + BEQ %FT09 + LDRB lr, [r0], #1 + LDRB r1, [r0], #1 + CMP lr, r2 + BEQ %FT10 + ADD r0, r0, r1 + B %BT05 +09 + MOV r0, #0 +10 + Pull "r2-r3,pc" + RSI9_OSname = "$SystemName $VString",0 -RSI9_Builddate = "$Builddate",0 ALIGN LTORG diff --git a/s/NewReset b/s/NewReset index 241c5d3b948ead2b8abd867af5752ab671c369fd..dc7a0656325d35403b94c705741c5c6667be8be4 100644 --- a/s/NewReset +++ b/s/NewReset @@ -1899,6 +1899,22 @@ ResetPart1Done ; R0 is reset type MOV R0, #FSControl_SelectFS ; set configured filing system SWI XOS_FSControl + ; OS_ReadSysInfo 9,2 now relies on the Territory module, which may + ; enable IRQs. But the PRMs say OS_ReadSysInfo shouldn't alter the IRQ + ; state. So call it once here just to initialise the string which it + ; uses the Territory module to generate. + ; This won't account for any modules using it during ModuleInit, but + ; that should be pretty rare (or at least rare from within IRQ-sensitive + ; code) + MOV R0, #9 + MOV R1, #2 + SWI XOS_ReadSysInfo + + [ UseNewFX0Error + ; Also, *FX 0 + BL InitNewFX0Error + ] + [ DebugROMInit SWI XOS_WriteS = "Service_PostInit",0 diff --git a/s/PMF/osbyte b/s/PMF/osbyte index f598f6904f2cdb1db2d60ae6f0d1b76b40307184..c8d1627a31e4b449bffaa2b4eca6190e0e001b34 100644 --- a/s/PMF/osbyte +++ b/s/PMF/osbyte @@ -231,13 +231,45 @@ Osbyte00 ROUT TEQ R1, #0 MOVNE R1, #MosVer MyOsbyte NE + [ UseNewFX0Error + LDR R0, =NewFX0Error + LDR LR, [R0] + CMP LR, #0 + ADREQ R0, FX0Error ; Fall back to hardcoded string if new one isn't ready yet + | ADR R0, FX0Error + ] SWI XOS_GenerateError ByteReturnV + [ UseNewFX0Error +InitNewFX0Error ROUT + Push "r0-r4,lr" + MOV r0, #0 + BL ExtendedROMFooter_FindTag + CMP r0, #0 + BEQ %FT10 + MOV r1, r0 + MOV r0, #-1 + LDR r2, =NewFX0Error+4 + MOV r3, #?NewFX0Error - 4 + ADR r4, NewFX0ErrorFormat + SWI XTerritory_ConvertDateAndTime + ; Fill in error number on success + LDRVC r2, =NewFX0Error + MOVVC r3, #&7F + STRVC r3, [r2] +10 + Pull "r0-r4,pc" + ] + FX0Error & &F7 = "$MosTitle",0 + [ UseNewFX0Error +NewFX0ErrorFormat + = "$SystemName $VString (%dy %m3 %ce%yr)",0 + ] ALIGN ; *****************************************************************************