Declare zero page variables before use. Otherwise they aren't used in zero
page addressing mode, if the assembler has a choice. git-svn-id: svn://svn.cc65.org/cc65/trunk@3725 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -45,6 +45,20 @@ _inviocb:
|
|||||||
|
|
||||||
; line oriented input
|
; line oriented input
|
||||||
|
|
||||||
|
.segment "EXTZP" : zeropage
|
||||||
|
|
||||||
|
index: .res 1 ; index into line buffer
|
||||||
|
buflen: .res 1 ; length of used part of buffer
|
||||||
|
cbs: .res 1 ; current buffer size: buflen - index
|
||||||
|
dataptr:.res 2 ; temp pointer to user buffer
|
||||||
|
copylen:.res 1 ; temp counter
|
||||||
|
|
||||||
|
.bss
|
||||||
|
|
||||||
|
linebuf:.res LINEBUF ; the line buffer
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
do_line:
|
do_line:
|
||||||
lda buflen ; line buffer active?
|
lda buflen ; line buffer active?
|
||||||
bne use_buf ; yes, get data from there
|
bne use_buf ; yes, get data from there
|
||||||
@@ -164,17 +178,5 @@ btsmall:
|
|||||||
sta ICBLL,x
|
sta ICBLL,x
|
||||||
bpl icbll_copy
|
bpl icbll_copy
|
||||||
|
|
||||||
.segment "EXTZP" : zeropage
|
|
||||||
|
|
||||||
index: .res 1 ; index into line buffer
|
|
||||||
buflen: .res 1 ; length of used part of buffer
|
|
||||||
cbs: .res 1 ; current buffer size: buflen - index
|
|
||||||
dataptr:.res 2 ; temp pointer to user buffer
|
|
||||||
copylen:.res 1 ; temp counter
|
|
||||||
|
|
||||||
.bss
|
|
||||||
|
|
||||||
linebuf:.res LINEBUF ; the line buffer
|
|
||||||
|
|
||||||
.endif ; .ifdef LINEBUF
|
.endif ; .ifdef LINEBUF
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user