diff --git a/samples/cbm/Makefile b/samples/cbm/Makefile index 03387a061..fe9d349bc 100644 --- a/samples/cbm/Makefile +++ b/samples/cbm/Makefile @@ -80,17 +80,19 @@ ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),) C1541 ?= c1541 endif -DISK_c64 = samples.d64 +DISK_$(SYS) = samples.d64 EXELIST_c64 = \ fire \ plasma \ - nachtm + nachtm \ + hello EXELIST_c128 = \ fire \ plasma \ - nachtm + nachtm \ + hello EXELIST_cbm510 = \ fire \ @@ -110,7 +112,7 @@ EXELIST_pet = \ notavailable EXELIST_vic20 = \ - notavailable + hello ifneq ($(EXELIST_$(SYS)),) samples: $(EXELIST_$(SYS)) @@ -135,6 +137,15 @@ plasma: plasma.c $(CL) -t $(SYS) -O -o plasma -m plasma.map plasma.c nachtm: nachtm.c $(CL) -t $(SYS) -O -o nachtm -m nachtm.map nachtm.c +hello: hello-asm.s + # Use separate assembler ... + $(AS) -t $(SYS) hello-asm.s + # ... and linker commands ... + $(LD) -C $(SYS)-asm.cfg -o hello -m hello-asm.map -u __EXEHDR__ hello-asm.o $(SYS).lib + @$(DEL) hello-asm.o 2>$(NULLDEV) + # ... or compile & link utility +# $(CL) -C $(SYS)-asm.cfg -o hello -m hello-asm.map -u __EXEHDR__ hello-asm.s + # -------------------------------------------------------------------------- # Rule to make a CBM disk with all samples. Needs the c1541 program that comes diff --git a/samples/cbm/hello-asm.s b/samples/cbm/hello-asm.s new file mode 100644 index 000000000..689dcc06b --- /dev/null +++ b/samples/cbm/hello-asm.s @@ -0,0 +1,15 @@ +; +; Sample assembly program for Commodore machines +; + + .include "cbm_kernal.inc" + + ldx #$00 +: lda text,x + beq out + jsr CHROUT + inx + bne :- +out: rts + +text: .asciiz "hello world!"