	maclib z80

cenpad	equ	54h
cenpac	equ	55h
cenpbd	equ	56h
cenpbc	equ	57h

init:
	mvi	a,04fh
	out	cenpac
	out	cenpbc
	xra	a
	out	cenpbd
	mvi	a,0ffh
	out	cenpbc
	mvi	a,0feh
	out	cenpbc
	mvi	a,0ffh
	sta	0fcc3h
	lxi	h,int
	shld	0f568h
	mvi	a,68h
	out	cenpac
	mvi	a,83h
	out	cenpac
	in	cenpad
wait:	jr	wait
	mvi	a,0feh
	sta	wait+1
	in	cenpad
	mov	e,a
	mvi	c,5
	call	5
	jr	wait
int:
	push	psw
	xra	a
	sta	wait+1
	pop	psw
	ei
	reti

	end
