diff --git a/libsrc/c16/c16-ram.s b/libsrc/c16/c16-ram.s index 3d797c6ab..2b603ae14 100644 --- a/libsrc/c16/c16-ram.s +++ b/libsrc/c16/c16-ram.s @@ -158,37 +158,11 @@ transfer: sei sta ENABLE_RAM + .repeat 8 lda (ptr1),y sta (ptr2),y iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny + .endrepeat sta ENABLE_ROM cli diff --git a/libsrc/c64/c64-ram.s b/libsrc/c64/c64-ram.s index 161f35272..b0a60c1d9 100644 --- a/libsrc/c64/c64-ram.s +++ b/libsrc/c64/c64-ram.s @@ -147,37 +147,11 @@ transfer: ; Unroll the following loop -loop: lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y - sta (ptr2),y - iny - - lda (ptr1),y +loop: .repeat 8 + lda (ptr1),y sta (ptr2),y iny + .endrepeat bne loop