Re: A83: Re: moving background


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

Re: A83: Re: moving background




Spend 5 minutes to think about it yourself, then read the answer below:

- ---

Just rotate every byte in the graph buffer through carry, like this:

        ld    hl,PLOTSSCREEN
        ld    b,0
loop1:  rr    (hl)
        djnz  loop1
        ld    b,0
loop2:  rr    (hl)
        djnz  loop2
        ld    b,0
loop3:  rr    (hl)
        djnz  loop3
        ret

That's optimized for speed, optimizing for size would use bc to loop
through
all of the buffer at once. This will scroll everything to the right one
pixel, leaving the leftmost row trashed.

Linus
-------------------------------------------------------------


To Linus:

Hey, thanks for the help. I still don't get why if you use bc the left most
row gets trashed. 

From: Chris
mecad@scv.net


Follow-Ups: