I am really very sorry to all. i couldnt write the comments.
actually i wanted to make a volt meter so all the code is written for that.
and it realy works. i checked it practiclay. then i tried to run it on protues then gave error, i described.
so i thought to run only an up counter. so i changed it to up counter but didnt delete the routines related to ADC.
This sode also works practically.
i m sending u the modified ASM file with comments. please check it and tell me my mistakes.
- - - Updated - - -
and one more very interesting fact. may be it is the error of protuse.
when i remove the connections of bases of transistors of common anode of display, displays still show "000". please check it too.
- - - Updated - - -
by the way i have used 8051 with keil, avr with avr studio. and in both IDEs, i can make hi or lo the ports of MCU in debuggers/ simulators but while using MPLAB (8.85) i couldnt. i worte very simple program to just turn on and off an LED by an input, when i run the simulator and changed the input, it didnt work. simply asking that in which way, i can make hi or lo the input of MCU in MPLAB?