#include "c:/jeux/emulateur/exl/tasm/H/7040.equ"

	.org $C7AC
	br @start
init_vdp
	sta @309	
	clr B
setup_vdp
	lda @init_screen(B)
	movp A,P45
	inc B
	cmp %36,B
	jne setup_vdp
	rets	
init_screen
	.byte 4,$10,5,$80,6,$88,7,$0
	.byte 1,$FF,2,$FF,8,0,0
	.byte 1,$FF,2,$FF,9,0,0
	.byte 1,$FF,2,$09,10,0,0
	.byte 1,$FF,2,$FF,15,0,0
start	
	push A
	push B
	lda @$F006
	cmp %$FF,A
	jeq fin
	call @init_vdp
	call @$F022	
	call @$F016		
	mov %3, TEMP10
	or %8,TEMP10
	trap 14
	br *TEMP8
fin
	pop B
	pop A
	rets

	.end