FPROB.ASM;--------------------------------------;
;  FPROB                    9.96/12.96 ;
;         Farbige Zeichen probieren    ;
;--------------------------------------;
;
	ORG	200H
;
PV1	EQU	0F003H
;
	DEFW	7F7FH
	DEFM	'FPROB'
	DEFB	01H
	LD	HL,FEN0
	CALL	FENST
	LD	A,0CH
	CALL	PV1
	DEFB	00H
	LD	HL,0101H
	LD	(0B7A0H),HL
	CALL	PV1
	DEFB	23H
	DEFM	'__________FARBEN PR'
	DEFM	'OBIEREN____________'
	DEFB	0
	LD	HL,0E02H
	LD	DE,COD
	CALL	ZIF
	LD	HL,1702H
	CALL	ZIF
	LD	HL,1902H
	LD	DE,COD
	CALL	ZIF
	XOR	A
	LD	(0B7A3H),A
	LD	HL,VOG
	LD	(STR),HL
	LD	HL,0F01H
	LD	D,02H
Y3	LD	C,08H
Y2	CALL	FUP
	LD	A,(0B7A3H)
	ADD	08H
	LD	(0B7A3H),A
	DEC	C
	JR	NZ,Y2
	LD	HL,1301H
	DEC	D
	JR	NZ,Y3
	LD	HL,HIG
	LD	(STR),HL
	LD	HL,1A01H
	XOR	A
	LD	(0B7A3H),A
	LD	C,08H
Y4	CALL	FUP
	LD	A,(0B7A3H)
	INC	A
	LD	(0B7A3H),A
	DEC	C
	JR	NZ,Y4
	LD	HL,FEN1
	CALL	FENST
	CALL	PV1
	DEFB	23H
	DEFM	'VOR-  DER-  GRUND'
	DEFB	0
	LD	HL,0900H
	LD	(0B7A0H),HL
	CALL	PV1
	DEFB	23H
	DEFM	'HIN-  TER-  GRUND'
	DEFB	0
WDH	LD	HL,FEN2
	CALL	FENST
	CALL	PV1
	DEFB	23H
	DEFM	'Farbe V H'
	DEFW	0D0AH
	DEFB	0AH
	DEFM	'1 Ohne L| 2 Mit L|  '
	DEFM	'3 Nur F '
	DEFW	0D0AH
	DEFB	0AH
	DEFM	'N Neu     X Ende'
	DEFB	0
	LD	HL,0006H
	LD	(0B7A0H),HL
	CALL	PV1		;Eingabe
	DEFB	17H		; Farbe
	LD	HL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[[[['
	DEFB	00H
HIG	DEFM	'    '
	DEFB	00H
STR	DEFW	0000H
COD	DEFM	'0123456789ABCDEF'
	;
FEN	DEFW	0100H
	DEFW	1E28H
	DEFW	0000H
	DEFW	3900H
	DEFW	0F77DH
FEN0	DEFW	0000H
	DEFW	2028H
	DEFW	0000H
	DEFW	3800H
	DEFW	0F77DH
FEN1	DEFW	1122H
	DEFW	0F06H
	DEFW	0000H
	DEFW	3800H
	DEFW	0F77DH
FEN2	DEFW	041EH
	DEFW	090AH
	DEFW	0000H
	DEFW	3800H
	DEFW	0F77DH
FEN3	DEFW	0402H
	DEFW	0819H
	DEFW	0000H
	DEFW	3800H
	DEFW	0F837H
*
FEN3: 
FEN2:
FEN1:
FEN0:
FEN:ò
COD:ð
STR:ë
HIG:æ
VOG:Ý
FENST:Å
Y1:Ã
FUP:¸
W2:±
W1	DEFW	3800H
	DEFW	0F837H
*
FEN3: 
FEN2:
FEN1:
FEN0:
FEN:ò
COD:ð
STR:ë
HIG:æ
VOG:Ý
FENST:Å
Y1:Ã
FUP:¸
W2:±
W1