This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupt without LJMP

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

Parents
  • How do I implement this in C without the LJMP.
    If you want tight control, use assembler.

    That you "should not use assembler" is an urban legend spread by incompetents and cheapskate managers that believe that a tyro should be hired in lieu of a pro. The "nobody will be able to maintain it if you use assembler" is only true if the company insist that "a programmer is a programmer" even if they find one willing to work for peanuts.

    Erik

Reply
  • How do I implement this in C without the LJMP.
    If you want tight control, use assembler.

    That you "should not use assembler" is an urban legend spread by incompetents and cheapskate managers that believe that a tyro should be hired in lieu of a pro. The "nobody will be able to maintain it if you use assembler" is only true if the company insist that "a programmer is a programmer" even if they find one willing to work for peanuts.

    Erik

Children