chiark
/
gitweb
/
~mdw
/
zx-fizzbuzz
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bf6b60
)
fizzbuzz.s: Delete pointless calculation of new high digit position.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 14 Nov 2021 15:44:10 +0000
(15:44 +0000)
committer
Mark 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
patch
|
blob
|
blame
|
history
diff --git
a/fizzbuzz.s
b/fizzbuzz.s
index 00504d4d78ece0fb92ba170cc6edc54d46da1823..6a68e9d940e8c9b046573a07db7304c0e848ae48 100644
(file)
--- 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