هذا جزء من برنامج مكتوب بلغة أسميلي
.
.
movwf _w ; Save the Current Values
swapf STATUS, w
movwf _status
bcf STATUS, RP0 ; Make Sure We're in Bank 0
movlw 0x020 ; Clear the Interrupt Handler
movwf INTCON
movlw Seg0 ; Output the Correct Segment
addwf Dig, w
movwf FSR ; Use the FSR to Index into the Value
movf INDF, w ; Turn Off Digit O/P and Turn On Display
call SEGMENTS_B
movwf PORTB
movf INDF, w ; Now, Make Sure PORTA is Set Correctly
call SEGMENTS_A
movwf PORTA
movf Dig, w ; Now, Everything Setup, Turn on the Digit
call Digits
iorwf PORTB, f
incf Dig, f ; For the Next Interrupt, Point to the
movlw 3 ; Next Digit in the Chain (or the First One)
subwf Dig, w
btfsc STATUS, C ; If Result is Negative, Don't Clear
clrf Dig
swapf _status, w ; Return from Interrupt with Valid Regs
movwf STATUS
swapf _w, f
swapf _w, w
retfie
.
.
.
وفقنا الله وإياكم الي كل مايحب ويرضي