aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
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