Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
This commit is contained in:
parent
b0a105606a
commit
56057a4aba
|
@ -140,8 +140,8 @@ finishWrite:
|
|||
rts
|
||||
|
||||
GetByte:
|
||||
lda #$1d ;set read flag low
|
||||
sta OutputFlags
|
||||
ldx #$1d ;set read flag low
|
||||
stx OutputFlags
|
||||
waitRead:
|
||||
bit InputFlags
|
||||
bpl readByte
|
||||
|
@ -153,13 +153,11 @@ waitRead:
|
|||
rts
|
||||
readByte:
|
||||
lda InputByte
|
||||
pha
|
||||
lda #$1f ;set all flags high
|
||||
sta OutputFlags
|
||||
ldx #$1f ;set all flags high
|
||||
stx OutputFlags
|
||||
finishRead:
|
||||
bit InputFlags
|
||||
bpl finishRead
|
||||
pla
|
||||
clc ;success
|
||||
end:
|
||||
rts
|
||||
|
|
|
@ -174,19 +174,17 @@ finishWrite:
|
|||
rts
|
||||
|
||||
GetByte:
|
||||
lda #$0d ;set read flag low
|
||||
sta OutputFlags
|
||||
ldx #$0d ;set read flag low
|
||||
stx OutputFlags
|
||||
waitRead:
|
||||
bit InputFlags
|
||||
bmi waitRead
|
||||
lda InputByte
|
||||
pha
|
||||
lda #$0f ;set all flags high
|
||||
sta OutputFlags
|
||||
ldx #$0f ;set all flags high
|
||||
stx OutputFlags
|
||||
finishRead:
|
||||
bit InputFlags
|
||||
bpl finishRead
|
||||
pla
|
||||
end:
|
||||
rts
|
||||
|
||||
|
|
|
@ -127,19 +127,17 @@ finishWrite:
|
|||
rts
|
||||
|
||||
GetByte:
|
||||
lda #$2d ;set read flag low
|
||||
sta OutputFlags
|
||||
ldx #$2d ;set read flag low
|
||||
stx OutputFlags
|
||||
waitRead:
|
||||
bit InputFlags
|
||||
bmi waitRead
|
||||
lda InputByte
|
||||
pha
|
||||
lda #$2f ;set all flags high
|
||||
sta OutputFlags
|
||||
ldx #$2f ;set all flags high
|
||||
stx OutputFlags
|
||||
finishRead:
|
||||
bit InputFlags
|
||||
bpl finishRead
|
||||
pla
|
||||
end:
|
||||
rts
|
||||
|
||||
|
|
|
@ -134,19 +134,17 @@ finishWrite:
|
|||
rts
|
||||
|
||||
GetByte:
|
||||
lda #$3d ;set read flag low
|
||||
sta OutputFlags
|
||||
ldx #$3d ;set read flag low
|
||||
stx OutputFlags
|
||||
waitRead:
|
||||
bit InputFlags
|
||||
bmi waitRead
|
||||
lda InputByte
|
||||
pha
|
||||
lda #$3f ;set all flags high
|
||||
sta OutputFlags
|
||||
ldx #$3f ;set all flags high
|
||||
stx OutputFlags
|
||||
finishRead:
|
||||
bit InputFlags
|
||||
bpl finishRead
|
||||
pla
|
||||
rts
|
||||
|
||||
Text:
|
||||
|
|
Loading…
Reference in New Issue