Kernel version 0.8 : Fixed bug in Event Mgr

This commit is contained in:
Rémy GIBERT 2016-10-06 08:23:20 +02:00
parent f76268fe93
commit bbf65b74e5
5 changed files with 28 additions and 31 deletions

Binary file not shown.

Binary file not shown.

View File

@ -10,7 +10,7 @@ echo Env:
SET SET
# Main Screen # Main Screen
INSDRV CONSOLE.DRV INSDRV CONSOLE.DRV
#STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
# Serial Login # Serial Login
#INSDRV SSC.I.DRV 9600 N 8 1 X #INSDRV SSC.I.DRV 9600 N 8 1 X
#STARTPROC GETTY COM2 LOGIN #STARTPROC GETTY COM2 LOGIN

View File

@ -103,43 +103,41 @@ OPEN stz CURON
clc clc
rts rts
*-------------------------------------- *--------------------------------------
GETEVENT lda A2osX.TIMER16 GETEVENT jsr Char.Out.Get
bcc .7 no char in output buffer...
lda A2osX.ASCREEN
cmp #1 is CON active?
bne .9 no....exit
lda A2osX.TIMER16
and #CURSOR.BLINK.SPEED and #CURSOR.BLINK.SPEED
eor CURON eor CURON
beq .1 beq .1
jsr CURBLNK jsr CURBLNK
.1 jsr Char.Out.Get .1 lda OPENAPPLE
bcc .7 bmi .9 Open apple key, not for us...
>DEBUG
>SYSCALL SYS.GetKeyboardEvent
bcs .9
ldy #S.EVT.DATAHI lda KBD
lda (pEvent),y bpl .9
bne .8 sta KBDSTROBE
lda A2osX.ASCREEN and #$7F
cmp #1
bne .9
dey
lda (pEvent),y
ldx KeyRemapped ldx KeyRemapped
.2 cmp KeyRemapped,x .2 cmp KeyRemapped,x
beq .3 beq .3
dex dex
bne .2 bne .2
clc bra .7
rts
.3 lda KeyRemappedIdx,x .3 lda KeyRemappedIdx,x
tay tay
.4 lda KeyRemappedTbl,y .4 lda KeyRemappedTbl,y
beq .6 beq .6
jsr Char.Out jsr Char.Out.Put
iny iny
bra .4 bra .4
@ -147,7 +145,7 @@ GETEVENT lda A2osX.TIMER16
.7 ldy #S.EVT.DATALO .7 ldy #S.EVT.DATALO
sta (pEvent),y sta (pEvent),y
iny iny S.EVT.DATAHI
lda #0 lda #0
sta (pEvent),y sta (pEvent),y
lda #S.EVT.F.KEY lda #S.EVT.F.KEY
@ -531,19 +529,19 @@ Esc.Query ldx EscSeqParamCnt
bne .8 bne .8
lda #$1B lda #$1B
jsr Char.Out jsr Char.Out.Put
lda #$5B lda #$5B
jsr Char.Out jsr Char.Out.Put
lda CV lda CV
inc inc
jsr Decimal.Out jsr Decimal.Out
lda #';' lda #';'
jsr Char.Out jsr Char.Out.Put
lda CH lda CH
inc inc
jsr Decimal.Out jsr Decimal.Out
lda #'R' lda #'R'
jsr Char.Out jsr Char.Out.Put
.8 clc .8 clc
rts rts
@ -733,7 +731,7 @@ Decimal.Out stz DecimalBuffer
beq .2 beq .2
ora #$30 ora #$30
dec bDecimal0Out dec bDecimal0Out
jsr Char.Out jsr Char.Out.Put
.2 lda DecimalBuffer .2 lda DecimalBuffer
lsr lsr
@ -744,12 +742,12 @@ Decimal.Out stz DecimalBuffer
bit bDecimal0Out bit bDecimal0Out
bpl .4 bpl .4
.3 ora #$30 .3 ora #$30
jsr Char.Out jsr Char.Out.Put
.4 lda DecimalBuffer .4 lda DecimalBuffer
and #$0f and #$0f
ora #$30 ora #$30
*-------------------------------------- *--------------------------------------
Char.Out pha Char.Out.Put pha
lda OutPtr lda OutPtr
clc clc
adc OutCnt adc OutCnt

View File

@ -163,12 +163,11 @@ DevMgr.SYS.GetEvent
.1 stx DevMgr.SYS.CPULOADI .1 stx DevMgr.SYS.CPULOADI
jsr K.GetKeyboardEvent jsr K.GetKeyboardEvent
bcs .9 bcc .8
rts
.9 lda #0 Error = no event .9 lda #0 Error = no event
sec sec
rts .8 rts
*-------------------------------------- *--------------------------------------
DevMgr.SYS.COut phx DevMgr.SYS.COut phx
phy phy