Re: A83: A routine to move data...


[Prev][Next][Index][Thread]

Re: A83: A routine to move data...




No.

Linus

On 25-Jul-98, Phelan Wolf wrote:

>Does this work??

>SOURCE:
>;MOVEIT.Z80
>;by: Chris Watford
>;copying data plus deleting the old data
>;usage: moving data

>;input:
>;bc= Start of old data
>;de= End of old data
>;hl= Where to put it

>start:
> push bc
> push de
> push hl
>;I am getting the lenght of data
> ld hl,de-bc
> ld (statvars),hl
>;statvars now contains the length of the data
> pop hl
> pop de
> pop bc
> ld de,(statvars)
> ld (statvars+2),0
>loop:
> sub (statvars),(statvars+2) ;is the operation done??
> jp z,the_end
> ld (hl),(bc) ;copy old data
> ld (bc),0000h ;delete old data
> inc (statvars+2) ;increment the counter
> inc (bc)  ;
> inc (bc)  ;move to the next mem location
> jp loop  ;lets do more deleting and moving
>the_end:
> ret





References: