aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2024-04-11 18:22:46 +0100
committerIan C <ianc@noddybox.co.uk>2024-04-11 18:22:46 +0100
commit5263696a44cc4f2c23e53dd68af0c66efd1fd896 (patch)
tree9ba5ffe49ef39213d4ee30c97211c8e33990e0d3 /src/example
parentc019aa4607fa177e7f9c5cfbe540abd9c4e103d3 (diff)
Added Vic-20 PRG output. Not sure BASIC stub is needed so checkin prior to
removal.
Diffstat (limited to 'src/example')
-rw-r--r--src/example/Makefile5
-rw-r--r--src/example/vic20.asm24
2 files changed, 28 insertions, 1 deletions
diff --git a/src/example/Makefile b/src/example/Makefile
index 700e9e5..629314a 100644
--- a/src/example/Makefile
+++ b/src/example/Makefile
@@ -21,7 +21,7 @@
#
ALL = spectrum.tap t64.t64 zx81.p gb.gb vcs.bin snes.sfc nes.nes cpc.cdt \
- prg.prg hex.hex
+ prg.prg hex.hex vic20.prg
CASM = ../casm
all: $(ALL) $(CASM)
@@ -61,6 +61,9 @@ prg.prg: prg.asm $(CASM)
hex.hex: emucpm.z80 $(CASM)
$(CASM) emucpm.z80
+vic20.prg: vic20.asm $(CASM)
+ $(CASM) vic20.asm
+
clean:
rm -f $(ALL)
diff --git a/src/example/vic20.asm b/src/example/vic20.asm
new file mode 100644
index 0000000..8bb222d
--- /dev/null
+++ b/src/example/vic20.asm
@@ -0,0 +1,24 @@
+ ; Simple example C64 code
+ ;
+
+ cpu 6502
+
+ option codepage,cbm
+
+ option output-file,vic20.prg
+ option output-format,prg
+ option prg-start,start
+ option prg-system,vic20
+
+ org $1100
+
+main:
+ lda #0
+ clc
+loop:
+ sta 36879
+ adc #1
+ jmp loop
+
+start:
+ jmp main