aboutsummaryrefslogtreecommitdiff
path: root/src/example/zx81.asm
blob: 3a0021c6fc5e8ad14c18ad472a642ff9b3821536 (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
31
32
33
34
	; Simple example ZX81 code
	;

	option	output-file,zx81.p
	option	output-format,zx81

	option	zx81-margin,pal
	option	zx81-autorun,on
	option	zx81-collapse-dfile,off

	option	codepage,zx81

DFILE:	equ	16396

	org 16514

	ld	hl,(DFILE)
	inc	hl
	ld	de,hello
loop:
	ld	a,(de)
	cp	255
	ret	z
	ld	(hl),a
	inc	hl
	inc	de

	ld	a,(hl)
	cp	$76
	jr	nz,loop
	inc	hl
	jr	loop

hello:	db	"HELLO|WORLD hello world (#69.99 well spent)",255