mirror of
https://github.com/tjboldt/Apple2-IO-RPi.git
synced 2024-05-31 12:41:27 +00:00
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
|
rts
|
||||||
|
|
||||||
GetByte:
|
GetByte:
|
||||||
lda #$1d ;set read flag low
|
ldx #$1d ;set read flag low
|
||||||
sta OutputFlags
|
stx OutputFlags
|
||||||
waitRead:
|
waitRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bpl readByte
|
bpl readByte
|
||||||
|
@ -153,13 +153,11 @@ waitRead:
|
||||||
rts
|
rts
|
||||||
readByte:
|
readByte:
|
||||||
lda InputByte
|
lda InputByte
|
||||||
pha
|
ldx #$1f ;set all flags high
|
||||||
lda #$1f ;set all flags high
|
stx OutputFlags
|
||||||
sta OutputFlags
|
|
||||||
finishRead:
|
finishRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bpl finishRead
|
bpl finishRead
|
||||||
pla
|
|
||||||
clc ;success
|
clc ;success
|
||||||
end:
|
end:
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -174,19 +174,17 @@ finishWrite:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
GetByte:
|
GetByte:
|
||||||
lda #$0d ;set read flag low
|
ldx #$0d ;set read flag low
|
||||||
sta OutputFlags
|
stx OutputFlags
|
||||||
waitRead:
|
waitRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bmi waitRead
|
bmi waitRead
|
||||||
lda InputByte
|
lda InputByte
|
||||||
pha
|
ldx #$0f ;set all flags high
|
||||||
lda #$0f ;set all flags high
|
stx OutputFlags
|
||||||
sta OutputFlags
|
|
||||||
finishRead:
|
finishRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bpl finishRead
|
bpl finishRead
|
||||||
pla
|
|
||||||
end:
|
end:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -127,19 +127,17 @@ finishWrite:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
GetByte:
|
GetByte:
|
||||||
lda #$2d ;set read flag low
|
ldx #$2d ;set read flag low
|
||||||
sta OutputFlags
|
stx OutputFlags
|
||||||
waitRead:
|
waitRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bmi waitRead
|
bmi waitRead
|
||||||
lda InputByte
|
lda InputByte
|
||||||
pha
|
ldx #$2f ;set all flags high
|
||||||
lda #$2f ;set all flags high
|
stx OutputFlags
|
||||||
sta OutputFlags
|
|
||||||
finishRead:
|
finishRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bpl finishRead
|
bpl finishRead
|
||||||
pla
|
|
||||||
end:
|
end:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -134,19 +134,17 @@ finishWrite:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
GetByte:
|
GetByte:
|
||||||
lda #$3d ;set read flag low
|
ldx #$3d ;set read flag low
|
||||||
sta OutputFlags
|
stx OutputFlags
|
||||||
waitRead:
|
waitRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bmi waitRead
|
bmi waitRead
|
||||||
lda InputByte
|
lda InputByte
|
||||||
pha
|
ldx #$3f ;set all flags high
|
||||||
lda #$3f ;set all flags high
|
stx OutputFlags
|
||||||
sta OutputFlags
|
|
||||||
finishRead:
|
finishRead:
|
||||||
bit InputFlags
|
bit InputFlags
|
||||||
bpl finishRead
|
bpl finishRead
|
||||||
pla
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
Text:
|
Text:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user