From: Mark Wooding Date: Sun, 14 Nov 2021 15:44:10 +0000 (+0000) Subject: fizzbuzz.s: Delete pointless calculation of new high digit position. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/zx-fizzbuzz/commitdiff_plain/0e3fb42fd6d951d2372ec63a07d60ece113ba1a1 fizzbuzz.s: Delete pointless calculation of new high digit position. HL is already in the right place. We only end up here if `djnz' fails, which means we've stepped len bytes through buf, and therefore HL now holds buf + len -- which is what we try to calculate. --- diff --git a/fizzbuzz.s b/fizzbuzz.s index 00504d4..6a68e9d 100644 --- a/fizzbuzz.s +++ b/fizzbuzz.s @@ -112,10 +112,6 @@ incr: ld a, (hl) ;; Carry out. ld a, (len) - ld b, 0 - ld c, a - ld hl, buf - add hl, bc ld (hl), 1 inc a ld (len), a