From 601d46cd6c5e38d40de9226ea05bd2260e38f1c4 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 18 Nov 2021 19:47:32 +0000 Subject: [PATCH] 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. --- .gitignore | 1 + Makefile | 8 ++++++++ zx81-1k.s | 25 +++++++++++++++++++++++++ zx81-1kldr.p | Bin 0 -> 257 bytes 4 files changed, 34 insertions(+) create mode 100644 zx81-1k.s create mode 100644 zx81-1kldr.p 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 0000000000000000000000000000000000000000..847255bcd544b7abd68d34d63421326d30dd4a7f GIT binary patch literal 257 zcmZP&VR-NG!GXh(fq~O;r31qOPDf5h=U4{@CI*K6fB&1Waxh{5f?ggF$-uBjQKA9N zz(bTllCQqL@0V2V`z$MP`MOIl>QLe6^4JalhCnHDUwS$Z+ SV=&@l_<04%f-;<-fg1pm<~6hc literal 0 HcmV?d00001 -- 2.11.0