Cleanup and preparation for the new design

git-svn-id: svn://svn.cc65.org/cc65/trunk@2839 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-26 21:43:18 +00:00
parent b9327d23f8
commit 8636914964
12 changed files with 533 additions and 794 deletions

View File

@@ -1,4 +1,4 @@
;
;
; Ullrich von Bassewitz, 13.09.2001
;
; Keyboard polling stuff for the 510.
@@ -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,10 +28,10 @@
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
@@ -48,11 +48,11 @@ 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
@@ -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