      .include #system
      .include #stddef
      .include #macros
; ------------------------------
; Natuerlich!'s handy dandy
;         MOVER
; (c)1990 by Natuerlich!
; All Rights Reserved.
; not written for speed or
; beauty
; -----------------------------
; change these defines to
; suit your taste. Must be zero
; page though
; -----------------------------
:src     =  $F0               ; -> org prg
:dst     =  $F2               ; -> reloc prg
:pages   =  $F4

; ---
mover    DPOKE :src,|R_START  ; uppercase labels come from the
         DPOKE :dst,|MEMLO     
         
         POKE  :pages,>|R_END-|R_START
         ldx   #<|R_END-|R_START
         ldy   #0
         
:loop    lda   (:src),y       ; nice and slow
         sta   (:dst),y
         iny
         dex
         bne   :loop
         inc    :src+1
         inc    :dst+1
         dec   :pages
         bne   :loop
         
         jmp   |MEMLO

