Call __seterrno and save a few bytes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4702 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -53,12 +53,10 @@ loop: inc ptr2
|
|||||||
|
|
||||||
overflow:
|
overflow:
|
||||||
lda #<ERANGE
|
lda #<ERANGE
|
||||||
sta __errno
|
jsr __seterrno ; Returns 0 in A
|
||||||
lda #>ERANGE
|
tax ; Return zero
|
||||||
sta __errno+1
|
rts
|
||||||
tax ; High byte of ERANGE is zero, return zero
|
|
||||||
rts
|
|
||||||
|
|
||||||
; Success, return buf
|
; Success, return buf
|
||||||
|
|
||||||
done: lda ptr1
|
done: lda ptr1
|
||||||
|
|||||||
Reference in New Issue
Block a user