/* vectors08.c * example file on how to set up interrupt handlers for the HC08 devices. * * How to use this file: * 1) Modify the contents as needed * 2) Either #include this file in your source file, so you can do a single * compiler (File->CompileTo...), OR * 3) The PREFERRED method is to add this file (or a copy) to the project * file list and use the Project Builder to build your project. * Do #2 OR #3, NOT both! * * * How to modify this file: * 1) reset vector is setup in crt08.s to point to the __start label. No * changes is needed. * 2) For different HC08 device, change the #pragma abs_address below * to start at the address of the first vector for that device. * Change the entries to correspond with the device. * 3) For each interrupt handler, declare the function on top of the file: * extern void a_handler(); * 4) Replace the corresponding entry in the array from "isrDummy" with * the name of your handler. * 5) Don't forget that in the file that defines the interrupt, you must * use the #pragma interrupt_handler function * before the definition of the function * Last change: ETC 11-01-02 9:42:42 AM */ /* Dummy Interrupt Handler * Place a Breakpoint here in case you are looking for spurious Interrupts */ #pragma interrupt_handler isrDummy void isrDummy(void) { } extern void isr_porta_keybd (void); /* Change this address for other HC08 device. * * This is for the GP32 device */ #pragma abs_address:0xffdc void (* const _vectab[])(void) = { isrDummy, /* Timebase */ isrDummy, /* ADC */ isr_porta_keybd, /* KBI */ isrDummy, /* SCI TC/TE */ isrDummy, /* SCI RF/IDLE */ isrDummy, /* SCI PE/FE/NF/OR */ isrDummy, /* SPI TE */ isrDummy, /* SPI MOD/OVR/RF */ isrDummy, /* TIM2 OVR */ isrDummy, /* TIM2 channel 1 */ isrDummy, /* TIM2 channel 0 */ isrDummy, /* TIM1 OVR */ isrDummy, /* TIM1 channel 1 */ isrDummy, /* TIM1 channel 0 */ isrDummy, /* CGM */ isrDummy, /* IRQ */ isrDummy /* SWI */ /* RESET defined in crt08.o */ };