mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Avoided a reload by using a second register.
This commit is contained in:
parent
263ae3ceb1
commit
50c626d02b
@ -1,6 +1,6 @@
|
|||||||
;
|
;
|
||||||
; 2002-11-16, Ullrich von Bassewitz
|
; 2002-11-16, Ullrich von Bassewitz
|
||||||
; 2013-12-18, Greg King
|
; 2013-12-23, Greg King
|
||||||
;
|
;
|
||||||
; int read (int fd, void* buf, unsigned count);
|
; int read (int fd, void* buf, unsigned count);
|
||||||
;
|
;
|
||||||
@ -52,12 +52,13 @@
|
|||||||
adc #LFN_OFFS ; Carry is already clear
|
adc #LFN_OFFS ; Carry is already clear
|
||||||
tax
|
tax
|
||||||
lda fdtab-LFN_OFFS,x; Get flags for this handle
|
lda fdtab-LFN_OFFS,x; Get flags for this handle
|
||||||
|
tay
|
||||||
and #LFN_READ ; File open for writing?
|
and #LFN_READ ; File open for writing?
|
||||||
beq invalidfd
|
beq invalidfd
|
||||||
|
|
||||||
; Check the EOF flag. If it is set, don't read anything
|
; Check the EOF flag. If it is set, don't read anything
|
||||||
|
|
||||||
lda fdtab-LFN_OFFS,x; Get flags for this handle
|
tya ; Get flags again
|
||||||
bmi eof
|
bmi eof
|
||||||
|
|
||||||
; Remember the device number.
|
; Remember the device number.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user