From: IrgendwerA8 Date: Sun, 20 May 2018 13:38:48 +0000 (+0200) Subject: Fixed formatting and two import issues. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=911b86de67db870a393447d5ad5b61da3c78f59a;p=cc65 Fixed formatting and two import issues. --- diff --git a/libsrc/common/memchr.s b/libsrc/common/memchr.s index de39a04f9..c11a467d0 100644 --- a/libsrc/common/memchr.s +++ b/libsrc/common/memchr.s @@ -5,7 +5,7 @@ ; .export _memchr - .import popax, popptr1 return0 + .import popax, popptr1, return0 .importzp ptr1, ptr2 diff --git a/libsrc/common/strncpy.s b/libsrc/common/strncpy.s index e6cafd990..56387f880 100644 --- a/libsrc/common/strncpy.s +++ b/libsrc/common/strncpy.s @@ -5,7 +5,7 @@ ; .export _strncpy - .import popptr1 + .import popax, popptr1 .importzp ptr1, ptr2, tmp1, tmp2, tmp3 .proc _strncpy diff --git a/libsrc/runtime/popptr1.s b/libsrc/runtime/popptr1.s index 64da308a8..2167717ce 100644 --- a/libsrc/runtime/popptr1.s +++ b/libsrc/runtime/popptr1.s @@ -5,25 +5,19 @@ ; X is untouched, low byte in A, Y is defined to be 0! .export popptr1 - .import incsp2 + .import incsp2 .importzp sp, ptr1 - .macpack cpu - -.proc popptr1 ; 14 bytes, + .macpack cpu +.proc popptr1 ; 14 bytes (four usages = at least 2 bytes saved) ldy #1 lda (sp),y ; get hi byte - sta ptr+1 ; into ptr hi - dey ; note: apply even for 65C02 to have Y=0 at exit! -.if (.cpu .bitand ::CPU_ISET_65SC02) - lda (sp) ; get lo byte -.else + sta ptr1+1 ; into ptr hi + dey ; no optimization for 65C02 here to have Y=0 at exit! lda (sp),y ; get lo byte -.endif - sta ptr1 ; to ptr lo - - jmp incsp2 + sta ptr1 ; to ptr lo + jmp incsp2 .endproc