Rodo55

How do you assign reset vectors in assembly? - MC9S08QE8

Discussion created by Rodo55 on Jun 25, 2008
Latest reply on Jun 27, 2008 by David Payne
I'm a beginner to MCUs and I'm pulling my hair out trying to figure out how to assign my subroutine (ISR) to an RTC vector address in assembly. My code works fine in C but I'm new to assembly and QE8 MCUs and I just can't figure out how to get the interrupts to work in assembly.
 
Here's a snippet of my C code and if you would explain how to do it in assembly I'd appreciate it.
 
Below is where the ISR code is assigned to the vector address in "C".
 
void interrupt VectorNumber_Vrtc rtc_isr(void) 
 {
  RTCSC_RTIF = 1; /* Clear RTIF */
  LED3 = !LED3;   /* Toggle LED3 */
}
 
I understand that "Vrtc" is pre-defined in the file MC9S08QE8.inc to address $FFCE which is the vector from the RTC interrupt. But how do I assign the vector address to point to my code "rtc_isr"?
 
Rodo
 
 
Added p/n to subject.


Message Edited by NLFSJ on 2008-06-26 11:10 AM

Outcomes