Added "popptr1" which is of common use to save some bytes.

This commit is contained in:
IrgendwerA8
2018-05-20 15:30:18 +02:00
parent 3a6430b13d
commit c95ed4b8b5
35 changed files with 113 additions and 151 deletions

View File

@@ -11,7 +11,7 @@
;
.export _memcpy, memcpy_upwards, memcpy_getparams
.import popax
.import popax, popptr1
.importzp sp, ptr1, ptr2, ptr3
; ----------------------------------------------------------------------
@@ -64,12 +64,11 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0!
sta ptr3
stx ptr3+1 ; save n to ptr3
jsr popax
sta ptr1
stx ptr1+1 ; save src to ptr1
jsr popptr1 ; save src to ptr1
; save dest to ptr2
ldy #1 ; (direct stack access is three cycles faster
iny ; Y=0 guaranteed by popptr1, we need '1' here...
; (direct stack access is three cycles faster
; (total cycle count with return))
lda (sp),y
tax