From: Greg King Date: Mon, 23 Dec 2013 17:20:28 +0000 (-0500) Subject: Avoided a reload by using a second register. X-Git-Tag: V2.15~203^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F67%2Fhead;p=cc65 Avoided a reload by using a second register. --- diff --git a/libsrc/cbm/read.s b/libsrc/cbm/read.s index 6227f7e0a..aa692a34a 100644 --- a/libsrc/cbm/read.s +++ b/libsrc/cbm/read.s @@ -1,6 +1,6 @@ ; ; 2002-11-16, Ullrich von Bassewitz -; 2013-12-18, Greg King +; 2013-12-23, Greg King ; ; int read (int fd, void* buf, unsigned count); ; @@ -52,12 +52,13 @@ adc #LFN_OFFS ; Carry is already clear tax lda fdtab-LFN_OFFS,x; Get flags for this handle + tay and #LFN_READ ; File open for writing? beq invalidfd ; 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 ; Remember the device number.