	title	Fruit Matrix Definition
	name	('F300')

; Diese einfache Routine installiert eine neue Zeichenmatrix fuer das Spiel
; FRUIT.PAS. Die Vorbereitung erfolgt ueber das Hauptprogramm. Die Routine
; ist geschrieben zum Lauf ab Adresse 0xf300.

XBIOS	equ	0fc5ah		; XBIOS Adresse
SCR_RUN	equ	000e9h		; SCR_RUNTIME

CHRMTX	equ	0b800h		; Zeichenmatrix
mtxlen	equ	8

	.phase	0f300h
;
; Neue Matrix definieren
;
FR_Matrix:
	ld	bc,_Matrix
	call	XBIOS
	dw	SCR_RUN		; SCR_RUNTIME aufrufen
	ret
;
; Aufruf mittels SCR_RUNTIME
;
_Matrix:
	ld	hl,NEWMTX	; Zeiger auf neue Matrix
	ld	bc,mtxlen	; Laenge laden
CHRADR	equ	$+1
	ld	de,CHRMTX	; Ziel laden
	ldir			; Matrix kopieren
	ret
;
NEWMTX	equ	$

	.dephase

	end

