Add a separate port for 1K ZX81.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 18 Nov 2021 19:47:32 +0000 (19:47 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 18 Nov 2021 19:47:32 +0000 (19:47 +0000)
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
Makefile
zx81-1k.s [new file with mode: 0644]
zx81-1kldr.p [new file with mode: 0644]

index aff1ece..fcbd6e3 100644 (file)
@@ -1,3 +1,4 @@
 *.img
 /spectrum-fizzbuzz.tap
+/zx81-1kfizzbuzz.p
 /zx81-fizzbuzz.p
index 40594c4..a72a278 100644 (file)
--- 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 (file)
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 (file)
index 0000000..847255b
Binary files /dev/null and b/zx81-1kldr.p differ