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

Adoption of *CONFIGURE/STATUS CACHE commands

The kernel already looks after all other aspects of the ARM CPU, so can look after the cache control command too.
 HelpStrs.s:New tokens for help and syntax
 CmdHelp.s:UK help and syntax
 Arthur3.s:Tables updates for *CONFIGURE/STATUS, lined some stuff up, default error text sync'd with Hdr:NewErrors
 MoreComms.s:Parsing and doing of *CACHE
 Utility.s:Hashing table updated for *CACHE
Other minor changes
 hdr/Options:Bring 'MosVer' into the private header
 hdr/RISCOS:aasm aliases for SP removed, MainVars and MosVer made private, added definition of the start of application space
 HeapMan.s:Use of GRAB changed to Pull
 Offset of TutuCMOS changed for more informative PrintSoundCMOS
 PMF/osbyte.s:Use OsBytes header file in place of MainVars

Version 5.35, 4.79.2.151. Tagged as 'Kernel-5_35-4_79_2_151'
parent 9b1056a7
......@@ -252,6 +252,13 @@ Build_Syntax
= "Syntax: *",TokenEscapeChar,Token0
= " <filename>", 0
Cache_Help
= "*",TokenEscapeChar,Token0
= " turns the cache on or off, or gives the cache state.",13
Cache_Syntax
= "Syntax: *",TokenEscapeChar,Token0
= " [On|Off]", 0
Close_Help
= "*",TokenEscapeChar,Token0
= " closes all files on the current filing system.",13
......@@ -494,6 +501,8 @@ Append_Help DCB "HUTMAPP", 0
Append_Syntax DCB "SUTMAPP", 0
Build_Help DCB "HUTMBUI", 0
Build_Syntax DCB "SUTMBUI", 0
Cache_Help DCB "HUTMCAC", 0
Cache_Syntax DCB "SUTMCAC", 0
Close_Help DCB "HUTMCLO", 0
Close_Syntax DCB "SUTMCLO", 0
Create_Help DCB "HUTMCRE", 0
......
No preview for this file type
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.150"
Module_Date SETS "21 May 2012"
Module_ApplicationDate SETS "21-May-12"
Module_MinorVersion SETS "4.79.2.151"
Module_Date SETS "26 May 2012"
Module_ApplicationDate SETS "26-May-12"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.150)"
Module_HelpVersion SETS "5.35 (21 May 2012) 4.79.2.150"
Module_FullVersion SETS "5.35 (4.79.2.151)"
Module_HelpVersion SETS "5.35 (26 May 2012) 4.79.2.151"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.150
#define Module_Date_CMHG 21 May 2012
#define Module_MinorVersion_CMHG 4.79.2.151
#define Module_Date_CMHG 26 May 2012
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.150"
#define Module_Date "21 May 2012"
#define Module_MinorVersion "4.79.2.151"
#define Module_Date "26 May 2012"
#define Module_ApplicationDate "21-May-12"
#define Module_ApplicationDate "26-May-12"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.150)"
#define Module_HelpVersion "5.35 (21 May 2012) 4.79.2.150"
#define Module_FullVersion "5.35 (4.79.2.151)"
#define Module_HelpVersion "5.35 (26 May 2012) 4.79.2.151"
#define Module_LibraryVersionInfo "5:35"
......@@ -32,10 +32,7 @@ VersionNo SETS "$VString ($Date)"
VersionNo SETS "$VString ($Date) $Module_MinorVersion"
]
; SystemName moved to Machine.* header files.
GBLS MosTitle
MosTitle SETS "$SystemName $VersionNo"
MosVer * 6 ; As returned by OS_Byte 0
GBLL AddTubeBashers
AddTubeBashers SETL {FALSE}
......
......@@ -218,11 +218,9 @@ wp RN r12 ; Workspace Pointer
WP RN r12
WsPtr RN r12
sp RN r13 ; Stack Pointer
SP RN r13
sp_irq RN r13_irq ; Note there is no definition
sp_svc RN r13_svc ; for sp_usr or sp_fiq.
stack RN r13
stack RN r13 ; Stack Pointer
Stack RN r13
STACK RN r13
......@@ -359,15 +357,12 @@ KBStat_ShiftEnable * &80
KBStat_NoCapsLockBitNo * 4
MainVars * &A6 ; Start of OS_Byte readable variables
MosVer * 6 ; As returned by OS_Byte 0
NIL * &80000000 ; An interesting value
AppSpaceStart * &8000 ; Start of the user's world
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; From here on, due for retirement
NIL * &80000000 ; An interesting value
MaxLengthDateLo * &33EA0000 ; Wednesday, 28th September 1988
MaxLengthDateHi * &00000041 ; 11:34:36.80 am
......
......@@ -200,37 +200,37 @@ op_UnaryMinus * 67 ; unary minus
; so 40-67 inclusive is filled.
MACRO
$label ePush $reglist
LCLS temps
LCLL onereg
temps SETS "$reglist"
onereg SETL {TRUE}
WHILE onereg :LAND: :LEN: temps > 0
$label ePush $reglist
LCLS temps
LCLL onereg
temps SETS "$reglist"
onereg SETL {TRUE}
WHILE onereg :LAND: :LEN: temps > 0
[ temps :LEFT: 1 = "," :LOR: temps :LEFT: 1 = "-"
onereg SETL {FALSE}
onereg SETL {FALSE}
]
temps SETS temps :RIGHT: (:LEN: temps - 1)
temps SETS temps :RIGHT: (:LEN: temps - 1)
WEND
[ onereg
$label STR $reglist, [R11, #-4]!
$label STR $reglist, [R11, #-4]!
|
$label STMFD R11!, {$reglist}
$label STMFD R11!, {$reglist}
]
CMP R11, R10
BLE StackOFloErr
CMP R11, R10
BLE StackOFloErr
MEND
MACRO
$label ePull $reglist, $writeback, $cc
LCLS temps
LCLL onereg
temps SETS "$reglist"
onereg SETL {TRUE}
WHILE onereg :LAND: :LEN: temps > 0
$label ePull $reglist, $writeback, $cc
LCLS temps
LCLL onereg
temps SETS "$reglist"
onereg SETL {TRUE}
WHILE onereg :LAND: :LEN: temps > 0
[ temps :LEFT: 1 = "," :LOR: temps :LEFT: 1 = "-"
onereg SETL {FALSE}
onereg SETL {FALSE}
]
temps SETS temps :RIGHT: (:LEN: temps - 1)
temps SETS temps :RIGHT: (:LEN: temps - 1)
WEND
[ onereg
[ "$writeback" = ""
......@@ -1228,6 +1228,7 @@ AlternateBoot
Config_NoParm Boot, 4, 0, DBTBCMOS, 1
AlternateNoBoot
Config_NoParm NoBoot, 4, 0, DBTBCMOS, 0
Config_Special Cache
AlternateCaps
Config_NoParm Caps, 3, 2, StartCMOS, 4
AlternateNoCaps
......@@ -1237,11 +1238,7 @@ ExpandShCaps
EndListCapsFrig
Config_Field Data, 5, 2, DBTBCMOS
Config_Field Delay, 0, 7, KeyDelCMOS
;ExpandDir
; Config_NoParm Dir, 6, 0, StartCMOS, 0
;ExpandNoDir
; Config_NoParm NoDir, 6, 0, StartCMOS, 1
Config_Field DumpFormat, 0, 4, TutuCMOS
Config_Field DumpFormat, 0, 4, PrintSoundCMOS
Config_Size FontSize, 0, 7, FontCMOS
FontSizeFrig
Config_Special Ignore
......@@ -1275,18 +1272,12 @@ AlternateNoScroll
Config_Special WimpMode
= 0
;NoDirString = "No"
;DirString = "Directory", 0
ShCapsString = "ShiftCaps", 0
ALIGN
ExpandFrig * 8 ; see code that shows NoParm options.
ExpandTab
; & ExpandDir - ExpandFrig-.
; & DirString - .-1 ; another printing fudge!
; & ExpandNoDir - ExpandFrig-.
; & NoDirString - .-1
& ExpandShCaps - ExpandFrig-.
& ShCapsString - .-1
& 0
......@@ -1304,6 +1295,7 @@ Config_$name._table
ALIGN
Config_Special_Table Baud, "<D>"
Config_Special_Table Cache, "On|Off"
Config_Special_Table TV, "[<D> [[,] <D>]]"
Config_Special_Table Mode, "<D> | Auto"
Config_Special_Table Ignore, "[<D>]"
......@@ -1498,7 +1490,7 @@ BadConOpt
B ConfigGenErr
BadConOptError
& ErrorNumber_Syntax
= "BadConOpt:Bad configure option", 0
= "BadConOpt:Configure option not recognised", 0
ALIGN
ReadNumParm Entry "r1"
......@@ -1567,7 +1559,7 @@ ReadSizeParm ROUT
BLE %FT01
CMP r1, #"k"
CMPNE r1, #"K"
Pull "r1, r8", NE
Pull "r1, r8", NE
BNE BadConParm
ADRL r14, PrinterBufferFrig-4
TEQ r8, r14 ; if printer buffer size
......@@ -1977,10 +1969,6 @@ AlternateTab
& %FT92 -.
& ExpandShCaps - ExpandFrig-.
& %FT92 -.
; & ExpandDir - ExpandFrig-.
; & %FT93 -.
; & ExpandNoDir - ExpandFrig-.
; & %FT93 -.
& AlternateLoud - ExpandFrig-.
& %FT95 -.
& AlternateQuiet - ExpandFrig-.
......@@ -2002,9 +1990,6 @@ AlternateTab
& AlternateCaps -%BT92
& AlternateCaps -%BT92
& AlternateCaps -%BT92
;93
; & DirString -%BT93-1
; & NoDirString -%BT93-1
95
& AlternateQuiet -%BT95
& AlternateLoud -%BT95
......@@ -2075,7 +2060,7 @@ ConfigCheckEOL ROUT
Config2manyparms
& ErrorNumber_Syntax
= "Config2manyparms:Too many parameters"
= "Config2manyparms:Too many parameters"
;*************************************************************************
......@@ -2335,6 +2320,46 @@ Config_Baud_showcode
ADD r2, r4, #4
B ExitShow
Config_Cache_setcode ROUT
LDRB r2, [r0], #1
CMP r2, #" "
BEQ Config_Cache_setcode
SUB r0, r0, #1
BL Cache_Opt_Parse
MOVS r1, r1
BMI BadConOpt
MOVNE r4, #&20 ; CMOS flag for 'Off'
MOVEQ r4, #0 ; CMOS flag for 'On'
MOVVC r0, #ReadCMOS
MOVVC r1, #SystemSpeedCMOS
SWIVC XOS_Byte
BICVC r2, r2, #&20
ORRVC r2, r2, r4
MOVVC r0, #WriteCMOS
SWIVC XOS_Byte
Pull "pc"
Config_Cache_showcode
MOV r4, r0
SWI XOS_WriteS
= "Cache ", 0
ALIGN
MOVVC r0, #ReadCMOS
MOVVC r1, #SystemSpeedCMOS
SWIVC XOS_Byte
BVS %FT11
TST r2, #&20 ; clear = enable
ADREQ r0, %FT12
ADRNE r0, %FT13
SWI XOS_Write0
11 ADD r2, r4, #4
B ExitShow
12
= "On", 0
13
= "Off", 0
ALIGN
Config_MouseStep_setcode ROUT
LDRB r2, [r0], #1
CMP r2, #" "
......
......@@ -62,6 +62,7 @@
GET Hdr:Buffer
GET Hdr:Font
GET Hdr:DevNos
GET Hdr:OsBytes
GET Hdr:Internatio
GET Hdr:Territory
GET Hdr:Portable
......
......@@ -1959,12 +1959,12 @@ iShowHeap ROUT ; Internal entry point for debugging heap
99
CLRV
GRAB "r0, hpd, addr, size, work, bp, tp, pc"
Pull "r0, hpd, addr, size, work, bp, tp, pc"
showfailed_badhpd
WRLN "Invalid heap descriptor : ShowHeap failed"
GRAB "r0, hpd, addr, size, work, bp, tp, pc"
Pull "r0, hpd, addr, size, work, bp, tp, pc"
HexUsedBlk
......@@ -1982,7 +1982,7 @@ PrintOffset
ADDNE R0, R0, hpd
DREG r0," (",cc
STRIM ")"
GRAB "R0, PC"
Pull "R0, PC"
PrintOffsetLine
Push "lr"
......
......@@ -165,6 +165,87 @@ Time_Code ROUT
SWIVC XOS_NewLine
Pull "PC"
Cache_Code ROUT
Push "lr"
TEQ r1, #0
BNE %FT05
; Report
MOV r0, #MMUCReason_ModifyControl
MOV r1, #0 ; EOR mask
MOV r2, #-1 ; AND mask (ie don't modify)
SWI XOS_MMUControl
Pull "PC", VS
SWI XOS_WriteS
DCB "Cache ", 0
ALIGN
Pull "PC", VS
TST r1, #MMUC_C
ADRNE r0, %FT02
ADREQ r0, %FT03
SWI XOS_Write0
SWIVC XOS_NewLine
Pull "PC"
02
DCB "On", 0 ; Not internationalised because the
03 ; command expects english 'On' or 'Off'
DCB "Off", 0 ; to set it so should report in english
ALIGN
05
; Set
BL Cache_Opt_Parse
MOVS r1, r1
BPL %FT07
ADRL r0, ErrorBlock_BadParameters
[ International
BL TranslateError
|
SETV
]
07
LDR r2, =:NOT: (MMUC_I + MMUC_C + MMUC_W)
LDRNE r1, =0
LDREQ r1, =MMUC_I + MMUC_C + MMUC_W
MOVVC r0, #MMUCReason_ModifyControl
SWIVC XOS_MMUControl
Pull "PC"
Cache_Opt_Parse
; => R0 -> control terminated string
; <= R1 = 0, 1, or -ve for error
LDRB r2, [r0], #1
TEQ r2, #'O'
TEQNE r2, #'o'
BNE %FT15
LDRB r2, [r0], #1
TEQ r2, #'N'
TEQNE r2, #'n'
BEQ %FT12
TEQ r2, #'F'
TEQNE r2, #'f'
BNE %FT15
LDRB r2, [r0], #1
TEQ r2, #'F'
TEQNE r2, #'f'
BNE %FT15
; Off
MOVS r1, #1
12
; On
MOVEQ r1, #0
13
; Check for trailing text
LDRB r2, [r0], #1
CMP r2, #' '
BEQ %BT13
MOVCC pc, lr
15
; Error
SETV
MOV r1, #-1
MOV pc, lr
Ignore_Code ROUT
Push "lr"
......@@ -411,6 +492,7 @@ rommstr
ALIGN
]
LTORG
;*****************************************************************************
......
......@@ -140,7 +140,7 @@ OsByteGo ROUT
BAL Osbyte19
HiOsbyte
CMP R0, #MainVars ; is it a variable ?
CMP R0, #OsByte_BaseOfOSByteVarTable ; is it a variable ?
30
ADDCC PC, PC, R3, LSL #2
B DoOsbyteVar ; yes, then do variable mangling
......@@ -271,7 +271,7 @@ InitNewFX0Error ROUT
FX0Error
& ErrorNumber_FX0
= "$MosTitle",0
= "$SystemName $VersionNo",0
[ UseNewFX0Error
NewFX0ErrorFormat
= "$SystemName $VString (%dy %m3 %ce%yr)",0
......@@ -1178,19 +1178,21 @@ OsbyteA5
; *****************************************************************************
DoOsbyteVar
SUB R0, R0, #MainVars ; Point to this block starting at &A6
SUB R0, R0, #OsByte_BaseOfOSByteVarTable
LDRB R3, [WsPtr, R0] ; Load the byte
AND R11, R3, R2 ; Mangle it as required by the law
EOR R11, R11, R1 ; ................................
MOV R1, R3 ; Return old value in R1
TEQ R0, #OsbyteKeyStatus - MainVars ; sorry - it's not pure any more.
BEQ DoOsbyteKeyStatus ; mea culpa. KJB.
TEQ R0, #OsbyteKeyStatus - OsByte_BaseOfOSByteVarTable
BEQ DoOsbyteKeyStatus ; sorry - it's not pure any more, mea culpa. KJB.
STRB R11, [R0, WsPtr]! ; R0 +:= WsPtr
LDRB R2, [R0, #1] ; Return contents of next loc in R2
MyOsbyte
; Keyboard status (OS_Byte 202).
; on entry: R0 = OsbyteKeyStatus - MainVars
; on entry: R0 = OsbyteKeyStatus - OsByte_BaseOfOSByteVarTable
; R1 = old value
; R11 = new value
DoOsbyteKeyStatus ROUT
......
......@@ -741,35 +741,35 @@ TV_Code ALTENTRY ; must be same as FX_Code !
Shadow_Code Entry
CMP R1, #0
MOV R1, R0
MOV R0, #10 + (1:SHL:30)
SWINE XOS_ReadUnsigned
MOVEQ R2, #0
EXIT VS
BL CheckEOL
BNE ShadowNaff
MOV R0, #114
MOV R1, R2
SWI XOS_Byte
EXIT
CMP R1, #0
MOV R1, R0
MOV R0, #10 + (1:SHL:30)
SWINE XOS_ReadUnsigned
MOVEQ R2, #0
EXIT VS
BL CheckEOL
BNE ShadowNaff
MOV R0, #114
MOV R1, R2
SWI XOS_Byte
EXIT
ShadowNaff
ADRL R0, ErrorBlock_BadNumb
[ International
BL TranslateError
|
SETV
]
EXIT
ADRL R0, ErrorBlock_BadNumb
[ International
BL TranslateError
|
SETV
]
EXIT
CheckEOL
LDRB R0, [R1], #1
CMP R0, #" "
CMPNE R0, #13
CMPNE R0, #10
CMPNE R0, #0
MOV PC, lr
LDRB R0, [R1], #1
CMP R0, #" "
CMPNE R0, #13
CMPNE R0, #10
CMPNE R0, #0
MOV PC, lr
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -1666,14 +1666,14 @@ PrintR0Decimal Entry "r0-r3"
ALIGN
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Read configured info of Tutu's wally byte
; Read configured GS string format
;
; Out r1 = bits read from CMOS ram
ReadGSFormat Entry "r0, r2"
MOV r0, #ReadCMOS
MOV r1, #TutuCMOS
MOV r1, #PrintSoundCMOS
SWI XOS_Byte
ANDVC r1, r2, #2_1111 ; Mask out all but my bits
STRVS r0, [sp]
......
......@@ -190,6 +190,7 @@ UtilHelpStr = "MOS Utilities", 9, "$VersionNo", 0
]
UtilHelpTab
Command Break, 0, 0, International_Help ; just help
Command Cache, 1, 0, International_Help
Command ChangeDynamicArea,255, 0, International_Help
Command Configure, 255, 0, Help_Is_Code_Flag :OR: International_Help
Command Commands, 0, 0, Help_Is_Code_Flag :OR: International_Help
......@@ -335,6 +336,7 @@ UHC_hash14
Command SetEval, 255, 2, International_Help
Command RMRun, 255, 1, International_Help
Command RMInsert, 2, 1, International_Help
Command Cache, 1, 0, International_Help
= 0
ALIGN
UHC_hash19
......
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