chiark / gitweb /
Add a ZX81 port.
[zx-fizzbuzz] / zx81.s
diff --git a/zx81.s b/zx81.s
new file mode 100644 (file)
index 0000000..8efe185
--- /dev/null
+++ b/zx81.s
@@ -0,0 +1,25 @@
+;;; -*-asm-*-
+
+       org     0x7000
+
+spc:   equ     0
+
+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: