View Single Post
  #11   Spotlight this post!  
Unread 28-10-2007, 15:35
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Code error causing robot to go into programming mode.

Code:
#pragma interruptlow InterruptHandlerLow save=PROD,section("MATH_DATA"),section(".tmpdata")
The #pragma is a fancy command that has special meaning to the MCC compiler. This one says that the function InterruptHandlerLow() should be compiled and installed as the low-priority interrupt handler (interruptlow), and that extra instructions should be included around the function to save (and later restore) the MATH_DATA and .tmpdata scratchpad memory sections. The PRODH and PRODL registers are also saved (I think the compiler uses them to do address calculations, but I'm not sure).