mirror of
https://github.com/cc65/cc65.git
synced 2025-02-02 00:35:32 +00:00
Add sample assembly program for Commodore machines
This commit is contained in:
parent
2c4d4d3314
commit
5976e3b85d
@ -80,17 +80,19 @@ ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),)
|
|||||||
C1541 ?= c1541
|
C1541 ?= c1541
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DISK_c64 = samples.d64
|
DISK_$(SYS) = samples.d64
|
||||||
|
|
||||||
EXELIST_c64 = \
|
EXELIST_c64 = \
|
||||||
fire \
|
fire \
|
||||||
plasma \
|
plasma \
|
||||||
nachtm
|
nachtm \
|
||||||
|
hello
|
||||||
|
|
||||||
EXELIST_c128 = \
|
EXELIST_c128 = \
|
||||||
fire \
|
fire \
|
||||||
plasma \
|
plasma \
|
||||||
nachtm
|
nachtm \
|
||||||
|
hello
|
||||||
|
|
||||||
EXELIST_cbm510 = \
|
EXELIST_cbm510 = \
|
||||||
fire \
|
fire \
|
||||||
@ -110,7 +112,7 @@ EXELIST_pet = \
|
|||||||
notavailable
|
notavailable
|
||||||
|
|
||||||
EXELIST_vic20 = \
|
EXELIST_vic20 = \
|
||||||
notavailable
|
hello
|
||||||
|
|
||||||
ifneq ($(EXELIST_$(SYS)),)
|
ifneq ($(EXELIST_$(SYS)),)
|
||||||
samples: $(EXELIST_$(SYS))
|
samples: $(EXELIST_$(SYS))
|
||||||
@ -135,6 +137,15 @@ plasma: plasma.c
|
|||||||
$(CL) -t $(SYS) -O -o plasma -m plasma.map plasma.c
|
$(CL) -t $(SYS) -O -o plasma -m plasma.map plasma.c
|
||||||
nachtm: nachtm.c
|
nachtm: nachtm.c
|
||||||
$(CL) -t $(SYS) -O -o nachtm -m nachtm.map nachtm.c
|
$(CL) -t $(SYS) -O -o nachtm -m nachtm.map nachtm.c
|
||||||
|
hello: hello.s
|
||||||
|
# Use separate assembler ...
|
||||||
|
$(AS) -t $(SYS) hello.s
|
||||||
|
# ... and linker commands ...
|
||||||
|
$(LD) -C $(SYS)-asm.cfg -o hello -m hello.map -u __EXEHDR__ hello.o $(SYS).lib
|
||||||
|
@$(DEL) hello.o 2>$(NULLDEV)
|
||||||
|
# ... or compile & link utility
|
||||||
|
# $(CL) -C $(SYS)-asm.cfg -o hello -m hello.map -u __EXEHDR__ hello.s
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# Rule to make a CBM disk with all samples. Needs the c1541 program that comes
|
# Rule to make a CBM disk with all samples. Needs the c1541 program that comes
|
||||||
|
15
samples/cbm/hello.s
Normal file
15
samples/cbm/hello.s
Normal file
@ -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!"
|
Loading…
x
Reference in New Issue
Block a user