This puts each output on its own line rather than trying to fill the
screen -- because there isn't enough memory to do that.
Alternatively, we might try writing to just the top few lines of the
display file. Maybe later.
*.img
/spectrum-fizzbuzz.tap
+/zx81-1kfizzbuzz.p
/zx81-fizzbuzz.p
zx81-fizzbuzz.p: gluep zx81-loader.p zx81-fb.img
./gluep 0x4009:zx81-loader.p 0x7000:zx81-fb.img >$@.new && mv $@.new $@
+CLEANFILES += zx81-1kfb.img
+zx81-1kfb.img: zx81-1k.s fizzbuzz.s
+ z80asm -o $@ $^
+
+TARGETS += zx81-1kfizzbuzz.p
+zx81-1kfizzbuzz.p: gluep zx81-1kldr.p zx81-1kfb.img
+ ./gluep 0x4009:zx81-1kldr.p 0x4300:zx81-1kfb.img >$@.new && mv $@.new $@
+
all: $(TARGETS)
clean::; rm -f $(CLEANFILES)
--- /dev/null
+;;; -*-asm-*-
+
+ org 0x4300
+
+spc: equ 0x76
+
+fixdig: macro
+ add a, 0x1c
+ endm
+
+print_a: macro
+ rst 0x10
+ endm
+
+endstr: equ 0x7a
+endstrp: macro
+ cp endstr
+ endm
+
+ jr begin
+
+fizz: db 0x2b, 0x2e, 0x3f, 0x3f, endstr
+buzz: db 0x27, 0x3a, 0x3f, 0x3f, endstr
+
+begin: