From: Mark Wooding Date: Thu, 18 Nov 2021 19:47:32 +0000 (+0000) Subject: Add a separate port for 1K ZX81. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/zx-fizzbuzz/commitdiff_plain/601d46cd6c5e38d40de9226ea05bd2260e38f1c4 Add a separate port for 1K ZX81. 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. --- diff --git a/.gitignore b/.gitignore index aff1ece..fcbd6e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.img /spectrum-fizzbuzz.tap +/zx81-1kfizzbuzz.p /zx81-fizzbuzz.p diff --git a/Makefile b/Makefile index 40594c4..a72a278 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,14 @@ TARGETS += 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) diff --git a/zx81-1k.s b/zx81-1k.s new file mode 100644 index 0000000..74460fd --- /dev/null +++ b/zx81-1k.s @@ -0,0 +1,25 @@ +;;; -*-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: diff --git a/zx81-1kldr.p b/zx81-1kldr.p new file mode 100644 index 0000000..847255b Binary files /dev/null and b/zx81-1kldr.p differ