Commit 2392dd15 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

OS_Byte 129 0 255 now reports &A7 for STB build (because it _is_ a

RISC OS 3.7 generation kernel).
CMOS no longer gets scrambled when reset in STB build.
UpCall_KeyboardStatus now issued when OS_Byte 202 called or when keyboard
status byte is changed by other means (such as pressing Caps Lock).

Version 4.67. Tagged as 'Kernel-4_67'
parent 71447636
......@@ -5,8 +5,8 @@
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
Module_MajorVersion SETS "4.66"
Module_Version SETA 466
Module_MajorVersion SETS "4.67"
Module_Version SETA 467
Module_MinorVersion SETS ""
Module_Date SETS "22 Oct 1998"
Module_Date SETS "30 Oct 1998"
END
/* (4.66)
/* (4.67)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.66
#define Module_MajorVersion_CMHG 4.67
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Oct 1998
#define Module_Date_CMHG 30 Oct 1998
#define Module_MajorVersion "4.66"
#define Module_Version 466
#define Module_MajorVersion "4.67"
#define Module_Version 467
#define Module_MinorVersion ""
#define Module_Date "22 Oct 1998"
#define Module_Date "30 Oct 1998"
......@@ -1340,8 +1340,8 @@ DefaultCMOSTable ; list of non-zero options wanted :
= AlarmAndTimeCMOS,2_00010000 ; !Alarm autosave on
= FSLockCMOS+5, &EA ; Checksum for no password
= CDROMFSCMOS, &60 ; drives = 0, buffer size = 32K
= &FF
]
= &FF
ALIGN
......
......@@ -104,7 +104,7 @@ KeyInit ROUT
[ :LNOT: AssemblingArthur
TEQP PC, #I_bit
MOVNV R0, R0
MOV R0, R0
]
Pull PC ; go back to user
......@@ -514,8 +514,12 @@ CallUserKeyCode ROUT
Push R14
LDROSB R5, KeyBdStatus
LDRB R7, PendingAltType
Push R5
BL %FT10
Pull R12
STRB R7, PendingAltType
TEQ R5, R12
BLNE OfferKeyStatusUpCall
STROSB R5, KeyBdStatus, R12
Pull R14
MOV R12, #IOC
......@@ -533,6 +537,40 @@ ReturnVector
B MouseButtonChange
B DoBreakKey
; On entry: R5 = new status, R12 = old
; On exit: R5 = new new status, R12 corrupt, all other registers preserved
OfferKeyStatusUpCall
Entry "R0-R3,R10,R11"
MOV R11, PC
TEQP PC, #SVC_mode + I_bit
NOP
Push "R14"
MOV R10, #UpCallV
MOV R3, R5 ; new value
MOV R2, R12 ; old value
MOV R1, #0 ; pre-change
MOV R0, #UpCall_KeyboardStatus
BL CallVector
MOV R5, R3 ; R5 = value, after interference
10 TEQ R5, R2
MOVNE R10, #UpCallV
MOVNE R1, #1 ; post-change
MOVNE R0, #UpCall_KeyboardStatus
BLNE CallVector
Pull "R14"
TEQP R11, #0
NOP
EXITS
OfferPostKeyStatusUpCall
ALTENTRY
MOV R11, PC
TEQP PC, #SVC_mode + I_bit
MOV R3, R5
MOV R2, R12
B %BT10
; *****************************************************************************
;
; Centisecond tick routine
......@@ -705,10 +743,15 @@ GenerateChar ROUT
TEQEQ R6, #0
LDROSB R6, ESCBREAK, EQ ; and ESCAPE not disabled
TSTEQ R6, #1
BICEQ R5, R5, #KBStat_PendingAlt ; then cancel pending alt
STROSB R5, KeyBdStatus, R6, EQ ; and store back
BNE %FT21
TST R5, #KBStat_PendingAlt
MOVNE R5, R12
BICNE R5, R5, #KBStat_PendingAlt ; then cancel pending alt
BLNE OfferPostKeyStatusUpCall ; don't let them interfere
STROSB R5, KeyBdStatus, R6, NE ; and store back
TST R5, #KBStat_PendingAlt ; is there a pending Alt ?
21 TST R5, #KBStat_PendingAlt ; is there a pending Alt ?
BNE ProcessPendingAlt
TEQ R3, #0 ; is it NUL ?
......
......@@ -28,13 +28,9 @@ OsbyteLowLimit * &6A ; osbytes lower than this get Y set to 0
OsbyteVeryLow * &1A ; osbytes lower than this are all recognised
OsbyteSetCountry * &46
OsbyteSetAlphKey * &47
OsbyteWrchDests * &EC ; only OS_Byte variable which isn't pure any more!
OsbyteKeyStatus * &CA ; only OS_Byte variable which isn't pure any more!
[ STB
ArthurINKEY256 * &A6 ; INKEY-256 value
|
ArthurINKEY256 * &A7 ; INKEY-256 value
]
; *****************************************************************************
......@@ -1360,23 +1356,43 @@ DoOsbyteVar
AND R11, R3, R2 ; Mangle it as required by the law
EOR R11, R11, R1 ; ................................
MOV R1, R3 ; Return old value in R1
[ {FALSE}
TEQ R0, #OsbyteKeyStatus - MainVars ; sorry - it's not pure any more.
BEQ DoOsbyteKeyStatus ; mea culpa. KJB.
]
STRB R11, [R0, WsPtr]! ; R0 +:= WsPtr
LDRB R2, [R0, #1] ; Return contents of next loc in R2
[ {FALSE} ; This code didn't work in 3.00 because R0 isn't the offset from MainVars
; anymore - anyway, the code is not needed because the kernel closes the
; stream on an open request.
TEQ R0, #OsbyteWrchDests-MainVars
MyOsbyte NE ; fast exit if not setting wrch destinations
TST R11, #1 ; is serial output now disabled
MyOsbyte NE
LDRB R1, SerialOutHandle ; see if serial stream open
TEQ R1, #0 ; if it is
MOVNE R0, #0 ; then close it
STRNEB R0, SerialOutHandle ; zeroing handle beforehand
SWINE XOS_Find
]
MyOsbyte
[ {FALSE}
; Keyboard status (OS_Byte 202).
; on entry: R0 = OsbyteKeyStatus - MainVars
; R1 = old value
; R11 = new value
DoOsbyteKeyStatus ROUT
Push "R0-R3"
MOV R3,R11 ; R3 = new value
MOV R2,R1 ; R2 = old value
MOV R1,#0 ; pre-change
MOV R0,#UpCall_KeyboardStatus
SWI XOS_UpCall ; go on then, interfere
BVS %FT10
LDR R0, [R13] ; get back original R0
STRB R3, [R0, WsPtr]! ; R0 +:= WsPtr
LDRB R14, [R0, #1] ; Return contents of next loc in R2
STR R14, [R13, #8] ; by popping it on the stack
TEQ R2, R3 ; don't bother with UpCall if it didn't change...
MOVNE R1,#1 ; post-change
MOVNE R0,#UpCall_KeyboardStatus
SWINE XOS_UpCall ; can't do anything about it now...
10
Pull "R0-R3"
MyOsbyte
]
LTORG
; All the unused OS_Byte calls
......
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