ti/kbd: make Alpha and 2nd toggle
Previously, when being in A-Lock mode, activating Alpha wouldn't make us go temporarily in digit mode, as is expected.
This commit is contained in:
parent
67f689260f
commit
418af5f626
@ -90,7 +90,10 @@ kbdGetC:
|
|||||||
jr z, .handle2nd
|
jr z, .handle2nd
|
||||||
jp .loop
|
jp .loop
|
||||||
.handleAlpha:
|
.handleAlpha:
|
||||||
set 0, c
|
; Toggle Alpha bit in C. Also, if 2ND bit is set, toggle A-Lock mod.
|
||||||
|
ld a, 1 ; mask for Alpha
|
||||||
|
xor c
|
||||||
|
ld c, a
|
||||||
bit 1, c ; 2nd set?
|
bit 1, c ; 2nd set?
|
||||||
jp z, .loop ; unset? loop
|
jp z, .loop ; unset? loop
|
||||||
; we've just hit Alpha with 2nd set. Toggle A-Lock and set Alpha to
|
; we've just hit Alpha with 2nd set. Toggle A-Lock and set Alpha to
|
||||||
@ -101,7 +104,10 @@ kbdGetC:
|
|||||||
ld c, a
|
ld c, a
|
||||||
jp .loop
|
jp .loop
|
||||||
.handle2nd:
|
.handle2nd:
|
||||||
set 1, c
|
; toggle 2ND bit in C
|
||||||
|
ld a, 2 ; mask for 2ND
|
||||||
|
xor c
|
||||||
|
ld c, a
|
||||||
jp .loop
|
jp .loop
|
||||||
|
|
||||||
.end:
|
.end:
|
||||||
|
Loading…
Reference in New Issue
Block a user