you are correct, you are just attaching yourself to the beginning of the
interrupt service routine, and the job of formatting system flags is taken
care of by the ISR.
however, i do see something that may be causing numerical errors. in the
code, you only concern yourself with the lower byte of the D accumulator, so
you take the contents of the B accumulator, and copy it to the A accumulator
also, which is fine, but then you go ahead to store the whole D accumulator
into "TCOUNT", which is storing the value of the A accumulator along with
value of the B accumulator. i am not sure if this is causing problems, but i
know that small things like this can cause huge problems. instead of "STD
variable_TCOUNT", try "STAB variable_TCOUNT". this may help.
Justin D. Gullotta.. , Engineer,
Rensselaer Polytechnic Institute.
|