;:poke785,.:poke786,192
;:rem frequenzzaehler 5.8.1986
;:sys36864
	;.opt oo
	*= 49152
timer	=$dd04
cra	=$dd0e
crb	=$dd0f
stick	=$dc00
fac	=$62
float	=$bc4f
memdiv	=$bb0f
	sei
	ldx #3
	lda #-1
settimer	sta timer,x
	dex
	bpl settimer
	ldy #$11
	ldx #$51
waitan	lda stick
	and #16
	bne waitan
	stx crb
	sty cra
waitaus	lda stick
	and #16
	beq waitaus
waitan2	lda stick
	and #16
	bne waitan2
	ldy #0
	sty cra
	sty crb
	cli
	lda timer
	eor #-1
	sec
	sbc #8
	sta fac+3
	ldx #3
rest	lda timer+1,y
	eor #-1
	sbc #0
	sta fac-1,x
	iny
	dex
	bne rest
	sec
	txa
	ldx #160
	jsr float
	lda #<flp
	ldy #>flp
	jmp memdiv
flp	.byt $94,$70,$85,$ed,$63
