From d99a9070450157dd8fc3e5d6ad5172af4cc0be59 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 6 Apr 2016 23:37:07 +0100 Subject: Added ZX81 output driver --- src/example/Makefile | 14 ++++++++++---- src/example/zx81.asm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 src/example/zx81.asm (limited to 'src/example') diff --git a/src/example/Makefile b/src/example/Makefile index e9ddfce..7c53209 100644 --- a/src/example/Makefile +++ b/src/example/Makefile @@ -20,18 +20,24 @@ # Makefile for examples # -ALL = spectrum.tap c64.t64 # zx81.p +ALL = spectrum.tap c64.t64 zx81.p CASM = ../casm -all: $(ALL) +all: $(ALL) $(CASM) + +$(CASM): ../*.[ch] + cd .. ; make remake: clean all -spectrum.tap: spectrum.asm +spectrum.tap: spectrum.asm $(CASM) $(CASM) spectrum.asm -c64.t64: c64.asm +c64.t64: c64.asm $(CASM) $(CASM) c64.asm +zx81.p: zx81.asm $(CASM) + $(CASM) zx81.asm + clean: rm -f $(ALL) diff --git a/src/example/zx81.asm b/src/example/zx81.asm new file mode 100644 index 0000000..3a0021c --- /dev/null +++ b/src/example/zx81.asm @@ -0,0 +1,34 @@ + ; Simple example ZX81 code + ; + + option output-file,zx81.p + option output-format,zx81 + + option zx81-margin,pal + option zx81-autorun,on + option zx81-collapse-dfile,off + + option codepage,zx81 + +DFILE: equ 16396 + + org 16514 + + ld hl,(DFILE) + inc hl + ld de,hello +loop: + ld a,(de) + cp 255 + ret z + ld (hl),a + inc hl + inc de + + ld a,(hl) + cp $76 + jr nz,loop + inc hl + jr loop + +hello: db "HELLO|WORLD hello world (#69.99 well spent)",255 -- cgit v1.2.3