;Program: Písničky 2
;****************************************************************************
	LIST P = 16F84,	R = DEC
	#INCLUDE <P16F84.INC>
;----------------------------------------------------------------------------
 __CONFIG   _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
;****************************************************************************
RAM	EQU	H'0C'
TM0	EQU	RAM
TM1	EQU	RAM+1
TM2	EQU	RAM+2
TM3	EQU	RAM+3
TM4	EQU	RAM+4
POM	EQU	RAM+5

#define	Q	PORTB,0
#define	ZVUK	PORTB,4

;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	ORG	0
	GOTO	START
;****************************************************************************
;PODPROGRAMY
;****************************************************************************
t15mS	MOVLW	49		;doba 15 milisekund
	GOTO	$+2
t4mS	MOVLW	14		;doba 4 milisekund
	MOVWF	TM1
	MOVLW	255
	MOVWF	TM2
	DECFSZ	TM2,F
	GOTO	$-1
	DECFSZ	TM1,F
	GOTO	$-5
	RETURN
;****************************************************************************
t600mS	CALL	t200mS		;doba 600 milisekund
t400mS	CALL	t200mS		;doba 400 milisekund
t200mS	MOVLW	255		;doba 200 milisekund
	MOVWF	TM1
	MOVLW	255
	MOVWF	TM2
	DECFSZ	TM2,F
	GOTO	$-1
	DECFSZ	TM1,F
	GOTO	$-5
	RETURN
;****************************************************************************
TON	MOVWF	TM3		;nastaví druh noty (tónu)
TON1	BSF	ZVUK		;jednička na pin B4
	MOVFW	TM4
	MOVWF	TM0
	MOVLW	249		;doba 1mS
	MOVWF	TM1
	NOP
	DECFSZ	TM1,F
	GOTO	$-2
	
	BCF	ZVUK	;nula na pin B4
	MOVLW	4
	MOVWF	TM2	;tónová konstanta
	DECFSZ	TM2,F
	GOTO	$-1
	DECFSZ	TM0,F	;generuje druh tónu (0,270 - 3,540 mS)
	GOTO	$-5
	DECFSZ	TM3,F	;odpočítává délku nastaveného tónu
	GOTO	TON1

	CALL	t4mS
	RETURN

;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
;PROGRAM
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

START	BSF	STATUS,RP0
	MOVLW	B'11111000'
	MOVWF	TRISA		;nastavení portu A
	MOVLW	B'11101111'
	MOVWF	TRISB		;nastavení portu B
	BCF	STATUS,RP0

KLAVES	CLRF	POM		;výběr klávesy
	MOVFW	POM
	MOVWF	PORTA
	BTFSC	Q
	GOTO	SKOK
	INCF	POM,F
	BTFSS	POM,3
	GOTO	$-6
	GOTO	$-8

;****************************************************************************

;Písnička: "Tluče bubeníček"

PIS_1	CALL	t600mS

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	MOVLW	150	;nota 1D	
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	MOVLW	150	;nota 1D	
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	CALL	t15mS	;1.takt
;--------------------------------

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	117
	CALL	TON	

	MOVLW	221	;nota mA
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	CALL	t15mS	;2.takt
;--------------------------------

	MOVLW	190	;nota mH
	MOVWF	TM4
	MOVLW	49	
	CALL	TON

	MOVLW	190	;nota mH
	MOVWF	TM4
	MOVLW	49	
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	CALL	t15mS	;3.takt
;-------------------------------

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	117
	CALL	TON

	CALL	t400mS	;4.takt
;-------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	CALL	t15mS	;5.takt
;------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	198
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;6.takt
;------------------------------

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	MOVLW	190	;nota mH
	MOVWF	TM4
	MOVLW	49
	CALL	TON

	MOVLW	190	;nota mH
	MOVWF	TM4
	MOVLW	49
	CALL	TON

	CALL	t15mS	;7.takt
;--------------------------------

	MOVLW	221	;nota mA
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	CALL	t400mS	;8.takt
;--------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t15mS	;9.takt
;---------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;10.takt
;---------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t15mS	;11.takt
;--------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;12.takt
;--------------------------------

	MOVLW	221	;nota mA
	MOVWF	TM4
	MOVLW	44
	CALL	TON

	MOVLW	221	;nota mA
	MOVWF	TM4
	MOVLW	44
	CALL	TON

	MOVLW	190	;nota mH
	MOVWF	TM4
	MOVLW	49
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	CALL	t15mS	;13.takt
;----------------------------------
	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	117
	CALL	TON

	CALL	t400mS	;14.takt
;----------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	CALL	t15mS	;15.takt
;----------------------------------

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	117
	CALL	TON

	CALL	t400mS	;16.takt

	GOTO	KLAVES
;**********************************

;Písnička: "la Nanynka do zelí"

PIS_2	CALL	t600mS

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t15mS	;1.takt
;--------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	157
	CALL	TON

	CALL	t15mS	;2.takt
;-------------------------------

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	140	
	CALL	TON

	CALL	t15mS	;3.takt
;-------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	132
	CALL	TON

	CALL	t15mS	;4.takt
;--------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t15mS	;5.takt
;--------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	157
	CALL	TON

	CALL	t15mS	;6.takt
;-------------------------------

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	116	;nota 1G
	MOVWF	TM4
	MOVLW	140
	CALL	TON

	CALL	t15mS	;7.takt
;--------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	132
	CALL	TON

	CALL	t400mS	;8.takt
;--------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	CALL	t15mS	;5.takt
;------------------------------

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t200mS	;5.takt
;------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	CALL	t15mS	;7.takt
;--------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t200mS	;8.takt
;--------------------------------

	MOVLW	57	;nota 2C
	MOVWF	TM4
	MOVLW	104
	CALL	TON

	MOVLW	57	;nota 2C
	MOVWF	TM4
	MOVLW	104
	CALL	TON

	MOVLW	57	;nota 2C
	MOVWF	TM4
	MOVLW	104
	CALL	TON

	CALL	t200mS	;9.takt
;--------------------------------

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	CALL	t200mS	;9.takt
;----------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;9.takt
;----------------------------------

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON	;10.takt

	GOTO	KLAVES
;****************************************************************************

;Písnička: " Neukej,neukej"

PIS_3	CALL	t600mS

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	57	;nota 2C
	MOVWF	TM4
	MOVLW	104	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	176	
	CALL	TON

	CALL	t15mS	;1.takt
;--------------------------------

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	132	
	CALL	TON

	CALL	t15mS	;2.takt
;--------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	CALL	t15mS	;3.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	CALL	t15mS	;4.takt
;----------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	57	;nota 2C
	MOVWF	TM4
	MOVLW	104	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	176	
	CALL	TON

	CALL	t15mS	;5.takt
;--------------------------------

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	132	
	CALL	TON

	CALL	t15mS	;6.takt
;--------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78	
	CALL	TON

	CALL	t15mS	;7.takt
;----------------------------------

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	176	
	CALL	TON

	CALL	t15mS	;8.takt
;--------------------------------

	MOVLW	190	;nota mH
	MOVWF	TM4
	MOVLW	49	
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	CALL	t15mS	;9.takt
;----------------------------------

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	CALL	t15mS	;10.takt
;----------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63	
	CALL	TON

	CALL	t15mS	;11.takt
;----------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	CALL	t15mS	;12.takt
;----------------------------------

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	57	;nota 2C
	MOVWF	TM4
	MOVLW	104	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	176	
	CALL	TON

	CALL	t15mS	;13.takt
;----------------------------------

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	132	
	CALL	TON

	CALL	t15mS	;14.takt
;----------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78	
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70	
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66	
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78	
	CALL	TON

	CALL	t15mS	;15.takt
;----------------------------------

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88	
	CALL	TON	;16.takt

	GOTO	KLAVES

;****************************************************************************

;Písnička: "Pec nám spadla"

PIS_4	CALL	t600mS

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t15mS	;1.takt
;-------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	CALL	t15mS	;2.takt
;-------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	88
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	CALL	t15mS	;3.takt
;-------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	140
	CALL	TON

	CALL	t15mS	;4.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;5.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;6.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	CALL	t15mS	;7.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	132
	CALL	TON	;8.takt

	GOTO	KLAVES
;****************************************************************************

;písnička:"ly panenky silnicí"

PIS_5	CALL	t600mS

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;1.takt
;-------------------------------

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	140
	CALL	TON

	CALL	t15mS	;.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	157
	CALL	TON

	CALL	t15mS	;3.takt
;-------------------------------

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	78
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	79	;nota 1A
	MOVWF	TM4
	MOVLW	176
	CALL	TON

	CALL	t15mS	;4.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	CALL	t15mS	;5.takt
;-------------------------------

	MOVLW	150	;nota 1D
	MOVWF	TM4
	MOVLW	63
	CALL	TON

	MOVLW	175	;nota 1C
	MOVWF	TM4
	MOVLW	52
	CALL	TON

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	140
	CALL	TON

	CALL	t15mS	;6.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	70
	CALL	TON

	MOVLW	126	;nota 1E
	MOVWF	TM4
	MOVLW	66
	CALL	TON

	MOVLW	97	;nota 1G
	MOVWF	TM4
	MOVLW	157
	CALL	TON

	CALL	t15mS	;7.takt
;-------------------------------

	MOVLW	116	;nota 1F
	MOVWF	TM4
	MOVLW	140
	CALL	TON	;8.takt

	GOTO	KLAVES

;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

	ORG	1000		;adresa začátku rutiny SKOK
SKOK	MOVLW	3
	MOVWF	PCLATH		;výběr 3.stránky programové paměti
	MOVFW	POM
	ADDWF	PCL,F		;proveden skok dle velikosti registru W
	GOTO	KLAVES
	GOTO	KLAVES
	GOTO	PIS_1		;písnička 1
	GOTO	PIS_2		;písnička 2
	GOTO	PIS_3		;písnička 3
	GOTO	PIS_4		;písnička 4
	GOTO	PIS_5		;písnička 5
	GOTO	KLAVES

;****************************************************************************

	END


