Knock off two bytes from getcwd(), cbm_read() and cbm_write().
This commit is contained in:
committed by
greg-king5
parent
e0c12c90cd
commit
3957310950
@@ -17,22 +17,22 @@
|
||||
|
||||
.proc _getcwd
|
||||
|
||||
; Remember -size-1 because this simplifies the following loop
|
||||
; Remember size with each byte incremented because this simplifies the following loop
|
||||
|
||||
eor #$FF
|
||||
sta ptr2
|
||||
txa
|
||||
eor #$FF
|
||||
sta ptr2+1
|
||||
inx
|
||||
stx ptr2+1
|
||||
tax
|
||||
inx
|
||||
stx ptr2
|
||||
|
||||
jsr popptr1 ; Get buf to ptr1
|
||||
|
||||
; Copy __cwd to the given buffer checking the length
|
||||
|
||||
; ldy #$00 is guaranteed by popptr1
|
||||
loop: inc ptr2
|
||||
loop: dec ptr2
|
||||
bne @L1
|
||||
inc ptr2+1
|
||||
dec ptr2+1
|
||||
beq overflow
|
||||
|
||||
; Copy one character, end the loop if the zero terminator is reached. We
|
||||
|
||||
Reference in New Issue
Block a user