rendered paste body; Pause-Programm
list p=16F84A
include p16F84A.inc
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
;------------------------------------------------
Z1 equ 0C
Z2 equ 0D
ZAEHL equ 0E
BU equ 0F
;------------------------------------------------
;------------------------------------------------
org 00
goto start
;Unterprogramme
;--------------UP PAUSE--------------------------
pause
movlw 0FFh
movlw Z1
movwf Z1
movwf Z2
wdh
decfsz Z2,F
;goto wdh ;DEV!
movlw 0FFh
movwf Z2
decfsz Z1,F
;goto wdh ;DEV!
return
;-----------------------------------------------
portinit clrf PORTA
clrf PORTB
bsf STATUS,RP0
movlw b'00000000'
movwf TRISB
movwf TRISA
bcf STATUS,RP0
return
;-----------------------------------------------
start
call portinit
clrf Z1
clrf Z2
clrf PORTA
clrf ZAEHL
loop
incf ZAEHL,F
call TABELLE
movwf PORTB
call pause
movf ZAEHL,W
movwf BU,F
movlw b'00001111'
subwf BU,F
decfsz BU,W
goto NULL
goto loop
NULL
clrf ZAEHL
goto loop
TABELLE
movf ZAEHL,W
addwf PCL,F
retlw 3F
retlw 06
retlw 5B
retlw 4F
retlw 66
retlw 6D
retlw 7D
retlw 07
retlw 7F
retlw 6F
retlw 77
retlw 7F
retlw 39
retlw 3E
retlw 79
retlw 71
end