
bs_temp			<---- work
bs_rampointer		<---- BG buffer pointer
bestscore_messagebuffer	<----- text buffer


	ai16
Set6_score	
	php
	a16

	lda	#6
	sta	bs_temp
	phx					; >>
	ldx	bs_rampointer
	lda.l	hs_score+0,x
	sta	kz_wkdividend_L	 		; (low)  16bit
	lda.l	hs_score+2,x
	and	#00ffh
	sta	kz_wkdividend_H	 		; (high)  8bit
	plx					; <<

	txa
	clc
	adc	bs_temp
	tax

	phx		; >>
.loop	ldy	#10
	jsl	KDivide_u32u16_l
	a8
	sta.l	bestscore_messagebuffer-1,x
	a16
	dex
	dec	bs_temp
	bne	.loop
	plx		; <<

	plp
	rts

