Thank you sayzer,

I found this thread already. I tried Melanie's way but it doesn't work.

First, it looks as "Digit" won't increment from 0 to 3.

Second, I have put a "spy" before entering the loop. I put PORTA.6 = 1.

Since I use PIC Simulator, I can see the port status and as soon as the program has started, PORTA.6 goes back to 0 (!?).

Am I doing something wrong?

In my code's FOR...NEXT loop, I have put:
Code:
    for Digit = 0 to 3
        value_d = value dig digit
        lookup value_d, [$7E,$0C,$B6,$9E,$CC,$DA,$FA,$0E,$FE,$DE], Segments
        PORTA.0(Digit) = ~DCD Digit
        PORTB = Segments
    next