;Program: Pokus s přerušením
;*********************************
	LIST P = 16F84,	R = DEC
	#INCLUDE <P16F84.INC>
;----------------------------------
RAM	EQU	H'0C'
REG_A	EQU	RAM
MEM_W	EQU	RAM+1
MEM_S	EQU	RAM+2
;**********************************
	ORG	0
	GOTO	START

	ORG	4
	MOVWF	MEM_W
	SWAPF	STATUS,W
	MOVWF	MEM_S
	BCF	INTCON,T0IF
	MOVLW	245
	MOVWF	TMR0
	SWAPF	MEM_S,W
	MOVWF	STATUS
	SWAPF	MEM_W,F
	SWAPF	MEM_W,W
	RETFIE

START	BSF	STATUS,RP0
	MOVLW	B'11001000'
	MOVWF	OPTION_REG
	BCF	STATUS,RP0
	MOVLW	245
	MOVWF	TMR0
	MOVLW	B'10100000'
	MOVWF	INTCON

SEM	INCF	REG_A,F
	MOVFW	REG_A
	GOTO	SEM
	END
