Changed chip register names, fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@2789 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-19 23:04:30 +00:00
parent 5c632ab0ef
commit 290de026d1
4 changed files with 149 additions and 132 deletions

View File

@@ -17,9 +17,9 @@
sta NorKey
lda #$00
sta KbdScanBuf
ldy #tpiPortB
ldy #TPI::PRB
sta (tpi2),y
ldy #tpiPortA
ldy #TPI::PRA
sta (tpi2),y
jsr Poll
and #$3F
@@ -28,16 +28,16 @@
jmp NoKey
L1: lda #$FF
ldy #tpiPortA
ldy #TPI::PRA
sta (tpi2),y
asl a
ldy #tpiPortB
ldy #TPI::PRB
sta (tpi2),y
jsr Poll
pha
sta ModKey
ora #$30
bne L3 ; Branch always
bne L3 ; Branch always
L2: jsr Poll
L3: ldx #$05
@@ -48,17 +48,17 @@ L4: lsr a
dex
bpl L4
sec
ldy #tpiPortB
ldy #TPI::PRB
lda (tpi2),y
rol a
sta (tpi2),y
ldy #tpiPortA
ldy #TPI::PRA
lda (tpi2),y
rol a
sta (tpi2),y
bcs L2
pla
bcc NoKey ; Branch always
bcc NoKey ; Branch always
L5: ldy KbdScanBuf
sty NorKey
@@ -98,9 +98,9 @@ L8: tax
NoKey: ldy #$FF
Done: sty LastIndex
End: lda #$7F
ldy #tpiPortA
ldy #TPI::PRA
sta (tpi2),y
ldy #tpiPortB
ldy #TPI::PRB
lda #$FF
sta (tpi2),y
rts
@@ -127,7 +127,7 @@ PutKey: sta KeyBuf,x
; Poll the keyboard port until it's stable
.proc Poll
ldy #tpiPortC
ldy #TPI::PRC
L1: lda (tpi2),y
sta KeySave
lda (tpi2),y