aboutsummaryrefslogtreecommitdiff
path: root/src/example/cpc.asm
blob: e1f00bc0cfcf5a7ca455b63a584e2ca6b4509a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
	; Simple example CPC code
	;
	; To use:
	;
	; RUN ""

	option	output-file,cpc.cdt
	option	output-format,cpc
	option	cpc-start,start
	option	cpc-loader,true

start:	org	$8000

	ld	hl,msg
	call	print
	ret

	org	$8400
print:
	ld	a,(hl)
	cp	0
	ret	z
	push	hl
	call	$bb5a
	pop	hl
	inc	hl
	jr	print

	org	$8800
msg:	defb	"Hello World",0