2 ;;; (c) 2021 Mark Wooding
4 ;;; Best not to ask why.
6 ;;;----- Licensing notice ---------------------------------------------------
8 ;;; This file is part of ZX Fizzbuzz.
10 ;;; ZX Fizzbuzz is free software: you can redistribute it and/or modify it
11 ;;; under the terms of the GNU Lesser General Public License as published
12 ;;; by the Free Software Foundation; either version 3 of the License, or
13 ;;; (at your option) any later version.
15 ;;; ZX Fizzbuzz is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;;; Lesser General Public License for more details.
20 ;;; You should have received a copy of the GNU Lesser General Public
21 ;;; License along with ZX Fizzbuzz. If not, see
22 ;;; <https://www.gnu.org/licenses/>.
24 ;; Look at the buffer and decide what to do.
27 ;; First, decide whether it's a multiple of three. This is a bit
34 ;; Main `mod 3' loop. Load a byte and add it into the accumulator in
62 ;; Next, decide whether it's a multiple of five. This is easier.
73 ;; Not a multiple of five. Skip ahead if it was a multiple of three.
78 ;; OK, so just print the value.
115 ;; Print the newline.
119 ;; Increment the counter.
139 ;; Add the two halves of a.
151 ;; Print the string at hl.
159 ;; Initial state. The buffer notionally continues for another 254
160 ;; bytes, but there's no point in including them in the image.