X-Git-Url: https://git.distorted.org.uk/~mdw/zx-fizzbuzz/blobdiff_plain/0bf6b60e8ecdc17c4eb93d4880267894380b386e..HEAD:/fizzbuzz.s diff --git a/fizzbuzz.s b/fizzbuzz.s index 00504d4..57f262d 100644 --- a/fizzbuzz.s +++ b/fizzbuzz.s @@ -1,7 +1,26 @@ ;;; -*-asm-*- +;;; (c) 2021 Mark Wooding ;;; ;;; Best not to ask why. +;;;----- Licensing notice --------------------------------------------------- +;;; +;;; This file is part of ZX Fizzbuzz. +;;; +;;; ZX Fizzbuzz is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU Lesser General Public License as published +;;; by the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; ZX Fizzbuzz is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with ZX Fizzbuzz. If not, see +;;; . + ;; Look at the buffer and decide what to do. again: ld e, 0 @@ -111,14 +130,9 @@ incr: ld a, (hl) djnz incr ;; 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 + ld hl, len + inc (hl) jp again squish: