	org	8800h
	jp	start
lcd0	equ	0aah
lcd1	equ	0abh

lcdbusy:
	push	af
lcdbusy0:
	in	a,(lcd0)
	and	80h
	jp	nz,lcdbusy0
	pop	af
	ret

lcdinit:
	push	af
	push	bc
	ld	b,4
	lcdinit0:
	ld	a,38h
	out	(lcd0),a
	call	lcdbusy
	djnz	lcdinit0
	ld	a,6
	out	(lcd0),a
	call	lcdbusy
	ld	a,0eh
	out	(lcd0),a
	call	lcdbusy
	ld	a,1
	out	(lcd0),a
	call	lcdbusy
	ld	a,80h
	out	(lcd0),a
	call	lcdbusy
	pop	bc
	pop	af
	ret

start:
	call	lcdinit
	ld	a,'A'
	out	(lcd1),a
loop:
	ret
