fizzbuzz.s: Delete pointless calculation of new high digit position.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 14 Nov 2021 15:44:10 +0000 (15:44 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 14 Nov 2021 15:44:10 +0000 (15:44 +0000)
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.

fizzbuzz.s

index 00504d4..6a68e9d 100644 (file)
@@ -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