Timer0 is used for freq. generation at port 3.5 (Portf) of my AT89C4051 @ 24MHz. Each time the timer overflows the port is toggled. 1st case in asm: ORG 00BH tim0_int cpl Portf reti 2nd case in C51: void timer0_int (void) interrupt 1 { Portf = ~Portf; } The problem in the second case is that a LJMP is added to the service routine and this consumes extra time. How do I implement this in C without the LJMP. Thanks. Han
I'm sorry, forgot something... #pragma asm CSEG at 0bh cpl P3^5 reti #pragma endasm Han.