home *** CD-ROM | disk | FTP | other *** search
- .title Memory Move Routine
-
- *=$c000
-
- start= $fb
- end= $fd
- dest = $03
- temp= $02
-
-
- ;to use this from BASIC
- ;poke 251,start low
- ;poke 252,start high
- ;poke 253,end low
- ;poke 254,end high
- ;poke 3,destination low
- ;poke 4,destination high
- ;sys 49152
-
-
- entry:ldx#0;init. index
- loop:lda (start,x);get byte
- sta (dest,x);store it
-
- ;now inc start address
-
- incstart;inc start lo
- bneskip1;go if not 0
- incstart+1;inc hi byte
-
- ;increment the destination
-
- skip1:incdest;inc dest lo
- bneskip2;go if not 0
- incdest+1;inc hi byte
-
- ;now, see if all bytes
- ;have been moved.
-
- skip2:sec;perform a 16
- ldastart;bit compare
- sbcend
- statemp
- ldastart+1
- sbcend+1
- oratemp
- beqloop;go if equal
- bccloop;and if less
-
- ;all done!
-
- rts;return
-
- .end
-
-