Commit 16db00e8 authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Actually issue upcalls when OS_Byte 202 is called.

Version 4.68. Tagged as 'Kernel-4_68'
parent 2392dd15
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
GBLA Module_Version GBLA Module_Version
GBLS Module_MinorVersion GBLS Module_MinorVersion
GBLS Module_Date GBLS Module_Date
Module_MajorVersion SETS "4.67" Module_MajorVersion SETS "4.68"
Module_Version SETA 467 Module_Version SETA 468
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "30 Oct 1998" Module_Date SETS "16 Dec 1998"
END END
/* (4.67) /* (4.68)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 4.67 #define Module_MajorVersion_CMHG 4.68
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Oct 1998 #define Module_Date_CMHG 16 Dec 1998
#define Module_MajorVersion "4.67" #define Module_MajorVersion "4.68"
#define Module_Version 467 #define Module_Version 468
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "30 Oct 1998" #define Module_Date "16 Dec 1998"
...@@ -1356,42 +1356,39 @@ DoOsbyteVar ...@@ -1356,42 +1356,39 @@ DoOsbyteVar
AND R11, R3, R2 ; Mangle it as required by the law AND R11, R3, R2 ; Mangle it as required by the law
EOR R11, R11, R1 ; ................................ EOR R11, R11, R1 ; ................................
MOV R1, R3 ; Return old value in R1 MOV R1, R3 ; Return old value in R1
[ {FALSE}
TEQ R0, #OsbyteKeyStatus - MainVars ; sorry - it's not pure any more. TEQ R0, #OsbyteKeyStatus - MainVars ; sorry - it's not pure any more.
BEQ DoOsbyteKeyStatus ; mea culpa. KJB. BEQ DoOsbyteKeyStatus ; mea culpa. KJB.
]
STRB R11, [R0, WsPtr]! ; R0 +:= WsPtr STRB R11, [R0, WsPtr]! ; R0 +:= WsPtr
LDRB R2, [R0, #1] ; Return contents of next loc in R2 LDRB R2, [R0, #1] ; Return contents of next loc in R2
MyOsbyte MyOsbyte
[ {FALSE}
; Keyboard status (OS_Byte 202). ; Keyboard status (OS_Byte 202).
; on entry: R0 = OsbyteKeyStatus - MainVars ; on entry: R0 = OsbyteKeyStatus - MainVars
; R1 = old value ; R1 = old value
; R11 = new value ; R11 = new value
DoOsbyteKeyStatus ROUT DoOsbyteKeyStatus ROUT
Push "R0-R3" Push "R0-R3,R10"
MOV R10,#UpCallV ; (Can't use OS_UpCall - it enables IRQs and we're documented as not doing so)
MOV R3,R11 ; R3 = new value MOV R3,R11 ; R3 = new value
MOV R2,R1 ; R2 = old value MOV R2,R1 ; R2 = old value
MOV R1,#0 ; pre-change MOV R1,#0 ; pre-change
MOV R0,#UpCall_KeyboardStatus MOV R0,#UpCall_KeyboardStatus
SWI XOS_UpCall ; go on then, interfere BL CallVector ; go on then, interfere (Corrupts R10 & WsPtr)
BVS %FT10
LDR R0, [R13] ; get back original R0 LDR R0, [R13] ; get back original R0
STRB R3, [R0, WsPtr]! ; R0 +:= WsPtr STRB R3, [R0, #OsbyteVars]! ; R0 +:= WsPtr
LDRB R14, [R0, #1] ; Return contents of next loc in R2 LDRB R14, [R0, #1] ; Return contents of next loc in R2
STR R14, [R13, #8] ; by popping it on the stack STR R14, [R13, #8] ; by popping it on the stack
TEQ R2, R3 ; don't bother with UpCall if it didn't change... TEQ R2, R3 ; don't bother with UpCall if it didn't change...
MOVNE R10,#UpCallV
MOVNE R1,#1 ; post-change MOVNE R1,#1 ; post-change
MOVNE R0,#UpCall_KeyboardStatus MOVNE R0,#UpCall_KeyboardStatus
SWINE XOS_UpCall ; can't do anything about it now... BLNE CallVector ; can't do anything about it now...
10
Pull "R0-R3" Pull "R0-R3,R10"
MyOsbyte MyOsbyte
]
LTORG LTORG
......
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