Ok thank youThat is correct. The timer works by counting system cycles (Tcyc). The 'time' in timer comes from the fact that it takes time to count a bunch of Tcyc. Also, be very clear on the difference between a subroutine and an interrupt. You call the subroutine. The interrupt is called automatically in response to an event, in this case TMR0 rolling over from FF->00. See 5.3 in the datasheet. It is critical to realize that since the interrupt can happen at any time, the interrupt routine must save any registers it uses then restore them just before returning to the system. Failure to to that will cause endless problems.
The reason to use interrupt-driven timing is that you can do other processing in-between interrupts. When you use delay loops, you consume 100% of your CPU time in mindless counting. It doesn't matter if all you are doing is flashing one LED but it gets ugly fast when you want to do other things.
The reason the code won't assemble is that it is incomplete. You have to fill in the blanks and replace those comment lines like ;handle LED output with code that does that. What I wrote was just a framework.
TimerPostScaler is a byte in RAM (a variable) that you have to declare. TimerPostScalerValue is a defined (names) value that is what the post scaler is loaded to. It is named so that it is consistent across the whole program. Observe that it is used twice. If you used literal values, it would be easy to miss one when you changed the value.
BTW: when you post code, use the CODE tags available on the toolbar 'Insert->Code Tags' of the posting window. Don't post code with line numbers as it make it impossible to copy/paste into MPLAB to test.
