HERTZASM	;
	;
	ORG	0200H
	;
	DEFW	7F7FH
	DEFM	'HERTZ'
	DEFB	1
	;
	XOR	A		;CLS
	LD	HL,0A7FFH
	LD	M,A
	LD	DE,0A7FEH
	LD	BC,2800H
	LDDR
	LD	A,07H		;FARBE
	LD	(0B7A3H),A
	LD	HL,0B1FFH
	LD	M,A
	LD	DE,0B1FEH
	LD	BC,0A00H
	LDDR
	;
	LD	HL,0100H
	LD	(0B7A0H),HL
	CALL	0F003H
	DEFB	23H
	DEFW	6020H
	DEFB	20H
	DEFM	'Beggerow   '
	DEFM	'                     '
	DEFM	'1989 '
	DEFM '-------------------------'
	DEFM '---------------'
	DEFB	00
	LD	HL,0805H
	LD	(0B7A0H),HL
	CALL	0F003H
	DEFB	23H
	DEFM	'Frequenz'
	DEFM	'messung  '
	DEFM	'120...2630 Hz'
	DEFB	00
	;
	LD	HL,1315H
	LD	(0B7A0H),HL
	CALL	0F003H
	DEFB	23H
	DEFM	'Hz'
	DEFB	0
	;
	LD	HL,MA1	;Zeiger PIO A
	LD	(1E4H),HL
	;
	LD	A,0C7H	;Init CTC
	OUT	8EH,A	;auf .5s
	LD	A,25
	OUT	8EH,A
	;
	LD	HL,MA2	;Zeiger CTC 2
	LD	(1ECH),HL
	;
MA3	LD	A,(IX+13)
	SUB	3	;BRK Test
	JP	NZ,MA3	;  & Schleife
	CALL	0E000H	;RESET
	RET
	;
MA4	DEFB	00	;1./2.Lauf
MA6	DEFW	0000H	;Ergebnis
MA2	LD	HL,MA4	;INT CTC Reakt.
	LD	A,M
	CP 	1
	JR	Z,MA5
	INC	A
	LD	M,A
	;
	LD	A,83H	;1.Lauf
	SET	0,(IX+7);Verify
 	OUT	8AH,A	;PIO INT Frei
	EI
	RETI
MA5	LD	A,3	;PIO INT
	OUT	8AH,A	;gesperrt
	XOR	A
	LD	M,A
	LD	HL,(MA6)
	CALL	MA7	;Call Ausgabe
	LD	BC,0000	;Ergebnis=0
	LD	(MA6),BC
	RETI
	;
MA1	IN	A,88H	;LED ein
	SET	5,A
	OUT	88H,A
	LD	HL,(MA6)
	INC	HL	;Ergebnis+1
	LD	(MA6),HL
	RES	5,A	;LED aus
	OUT	88H,A
	EI
 	RETI
	;
	;
MA7	XOR	A	;HEX->DEZ
	LD	D,A
	LD	B,16
ZYKL	ADD	HL,HL
	ADC	A,A
	DAA
	LD	E,A
	LD	A,D
	ADC	A,A
	DAA
	LD	D,A
	RL	C
	LD	A,E
	DJNZ	ZYKL
	EX	DE,HL
	LD	A,C
	PUSH	HL
	LD	HL,0130DH
	LD	(0B7A0H),HL
	POP	HL
	CALL	0F003H	;Ausg.1.u.2.St
	DEFB	1CH
	CALL	0F003H	;"-"  3.- 6.St.
	DEFB	1AH
	RET
щщLABELмП*tМKrуу~#ЕїМBА0-Ч
 СЕЎ  #~Ч: Уї(Ч  А++^+ncмП