From: Mark Wooding Date: Sun, 14 Nov 2021 15:46:11 +0000 (+0000) Subject: fizzbuzz.s: Increment `len' in place rather than via register. X-Git-Url: https://git.distorted.org.uk/~mdw/zx-fizzbuzz/commitdiff_plain/b4fd018059713a9efdaa72f9017a8d87b7dc7325?ds=sidebyside fizzbuzz.s: Increment `len' in place rather than via register. The Z80 isn't a load/store architecture, even though my RISC-programming habits lead me to treat it like one. --- diff --git a/fizzbuzz.s b/fizzbuzz.s index 6a68e9d..76242ef 100644 --- a/fizzbuzz.s +++ b/fizzbuzz.s @@ -111,10 +111,9 @@ incr: ld a, (hl) djnz incr ;; Carry out. - ld a, (len) ld (hl), 1 - inc a - ld (len), a + ld hl, len + inc (hl) jp again squish: