This is not my routine. I just saw this on the https://spectrumcomputing.co.uk/ forums and thought I should place it here for further study.
sent in a bit of code that will do a Dixel Scroll
scrolling two pixels at a time to the whole screen.
This makes for faster movement with a little loss
; Your Sinclair issue 19 page 74 ; it still needs a full loop org 32000 di ld bc,6144 ld hl,22527 loop: srl (hl) call c,sub1 srl (hl) call c,sub2 dec hl dec bc ld a,b or c jr nz,loop ei ret sub1 inc hl set 6,(hl) dec hl ret sub2 inc hl set 7,(hl) dec hl ret
10 ORG 32000 20 DI 30 LD BC,6144 40 LD HL,22527 50 LOOP SRL (HL) 60 CALL C,SUB1 70 SRL (HL) 80 CALL C,SUB2 90 DEC HL 100 DEC BC 110 LD A,B 120 OR C 130 JR NZ,LOOP 140 RI 150 RET 160 SUB 1 INC HL 170 SET 6,(HL) 180 DEC HL 190 RET 200 SUB 2 INC HL 210 SET 7,(HL) 220 DEC HL 230 RET 240 END
I’m going to have to explore this at some point. Could make for an interesting add to a game engine at some point.