home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / nasm_src / lib / src / mover.s65 < prev    next >
Text File  |  1993-01-19  |  921b  |  40 lines

  1.       .include #system
  2.       .include #stddef
  3.       .include #macros
  4. ; ------------------------------
  5. ; Natuerlich!'s handy dandy
  6. ;         MOVER
  7. ; (c)1990 by Natuerlich!
  8. ; All Rights Reserved.
  9. ; not written for speed or
  10. ; beauty
  11. ; -----------------------------
  12. ; change these defines to
  13. ; suit your taste. Must be zero
  14. ; page though
  15. ; -----------------------------
  16. :src     =  $F0               ; -> org prg
  17. :dst     =  $F2               ; -> reloc prg
  18. :pages   =  $F4
  19.  
  20. ; ---
  21. mover    DPOKE :src,|R_START  ; uppercase labels come from the
  22.          DPOKE :dst,|MEMLO     
  23.          
  24.          POKE  :pages,>|R_END-|R_START
  25.          ldx   #<|R_END-|R_START
  26.          ldy   #0
  27.          
  28. :loop    lda   (:src),y       ; nice and slow
  29.          sta   (:dst),y
  30.          iny
  31.          dex
  32.          bne   :loop
  33.          inc    :src+1
  34.          inc    :dst+1
  35.          dec   :pages
  36.          bne   :loop
  37.          
  38.          jmp   |MEMLO
  39.  
  40.