+; handle fractions of a page size first
+
+ ldy ptr3 ; count, low byte
+ bne @entry ; something to copy?
+ beq PageSizeCopy ; here like bra...
+
+@copyByte:
+ lda (ptr1),y
+ sta (ptr2),y
+@entry:
+ dey
+ bne @copyByte
+ lda (ptr1),y ; copy remaining byte
+ sta (ptr2),y
+
+PageSizeCopy: ; assert Y = 0
+ ldx ptr3+1 ; number of pages
+ beq done ; none? -> done
+
+@initBase:
+ dec ptr1+1 ; adjust base...
+ dec ptr2+1
+ dey ; in entry case: 0 -> FF
+ lda (ptr1),y ; need to copy this 'intro byte'
+ sta (ptr2),y ; to 'land' later on Y=0! (as a result of the '.repeat'-block!)
+ dey ; FF ->FE
+@copyBytes:
+ .repeat 2 ; Unroll this a bit to make it faster...