                         .module RTI_Test.c
                         .area memory(abs)
                         .org 0xc4
 00C4                  _IVJT::
 00C4  7E                .byte 126
 00C5  F000              .word 61440
 00C7  7E                .byte 126
 00C8  F000              .word 61440
 00CA  7E                .byte 126
 00CB  F000              .word 61440
 00CD  7E                .byte 126
 00CE  F000              .word 61440
 00D0  7E                .byte 126
 00D1  F000              .word 61440
 00D3  7E                .byte 126
 00D4  F000              .word 61440
 00D6  7E                .byte 126
 00D7  F000              .word 61440
 00D9  7E                .byte 126
 00DA  F000              .word 61440
 00DC  7E                .byte 126
 00DD  F000              .word 61440
 00DF  7E                .byte 126
 00E0  F000              .word 61440
 00E2  7E                .byte 126
 00E3  F000              .word 61440
 00E5  7E                .byte 126
 00E6  F000              .word 61440
 00E8  7E                .byte 126
 00E9  F000              .word 61440
 00EB  7E                .byte 126
 00EC  202F              .word _RTI_ISR
 00EE  7E                .byte 126
 00EF  2053              .word _IRQ_ISR
 00F1  7E                .byte 126
 00F2  F000              .word 61440
 00F4  7E                .byte 126
 00F5  2054              .word _SWI_ISR
 00F7  7E                .byte 126
 00F8  F000              .word 61440
 00FA  7E                .byte 126
 00FB  F000              .word 61440
 00FD  7E                .byte 126
 00FE  F000              .word 61440
                         .area text
 202F                  _RTI_ISR::
                       ; #include <stdio.h>
                       ; #include <HC11.H>
                       ; 
                       ; int count;
                       ; /**************************************************/
                       ; /* buff_vec.c                                     */
                       ; /*                                                */
                       ; /* D. Bridges                                     */
                       ; /* October 27, 2000                               */
                       ; /*                                                */
                       ; /* Structure initilization of Buffalo's           */
                       ; /* interrupt vector jump table for the Imagecraft */
                       ; /* ICC11 compiler.                                */
                       ; /*                                                */
                       ; /* This file should be included anytime interrupt */
                       ; /* service routines are being used while running  */
                       ; /* under the Buffalo operating system.            */
                       ; /*                                                */
                       ; /* Because it does not include any of the extern  */
                       ; /* interrupt service routines, or a "main" module,*/
                       ; /* this file will not compile into an executable  */
                       ; /* by itself.  It must either be compiled as to   */
                       ; /* an "object" file (to be linked with other      */
                       ; /* object files later), or included as a file in  */
                       ; /* project that has the ISRs and "main" defined.  */
                       ; /*                                                */
                       ; /* Any ISRs that are used must be declared as     */
                       ; /* "extern" in this file.  The DUMMY_ENTRY        */
                       ; /* should be used for all vectors not being used. */
                       ; /*                                                */
                       ; /* This file is initially set up to define jump   */
                       ; /* table addresses for RTI, IRQ and SWI.          */                         
                       ; /*                                                */
                       ; /**************************************************/
                       ; 
                       ; /* Buffalo's interrupt vector jump table for */
                       ; /* the 68HC11 has 20 entries in it.          */
                       ; #define NUM_VEC 20
                       ; #define DUMMY_ENTRY (void (*)()) 0xF000
                       ; 
                       ; extern void _start();
                       ; extern void RTI_ISR();
                       ; extern void IRQ_ISR();
                       ; extern void SWI_ISR();
                       ; 
                       ; //#define INTR_ON()   asm("  cli")
                       ; //#define INTR_OFF()  asm("  sei")
                       ; 
                       ; typedef const struct I_VEC_JMP_TBL
                       ; {
                       ;    unsigned char jmp_instr;
                       ;    void (*isr_addr)();
                       ; } jmp_tbl;
                       ; 
                       ; #pragma abs_address:0x00c4
                       ; jmp_tbl IVJT[NUM_VEC] =
                       ; {
                       ;    {0x7e,DUMMY_ENTRY},  // SCI
                       ;    {0x7e,DUMMY_ENTRY},  // SPI
                       ;    {0x7e,DUMMY_ENTRY},  // Pulse Accumulator Input Edge
                       ;    {0x7e,DUMMY_ENTRY},  // Pulse Accumulator Overflow
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Overflow
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Output Compare 5
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Output Compare 4
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Output Compare 3
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Output Compare 2
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Output Compare 1
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Input Capture 3
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Input Capture 2
                       ;    {0x7e,DUMMY_ENTRY},  // Timer Input Capture 1
                       ;    {0x7e,RTI_ISR},      // RTI
                       ;    {0x7e,IRQ_ISR},      // IRQ
                       ;    {0x7e,DUMMY_ENTRY},  // XIRQ        
                       ;    {0x7e,SWI_ISR},      // SWI
                       ;    {0x7e,DUMMY_ENTRY},  // Illegal Opcode          
                       ;    {0x7e,DUMMY_ENTRY},  // COP
                       ;    {0x7e,DUMMY_ENTRY},  // Clock Monitor       
                       ;    
                       ; };
                       ; #pragma end_abs_address
                       ; 
                       ; /**************************************************/
                       ; /* isr_pgms.c                                     */
                       ; /*                                                */
                       ; /* D. Bridges                                     */
                       ; /* October 27, 2000                               */
                       ; /*                                                */
                       ; /* Skeleton code for a c file where all of the    */
                       ; /* interrupt service routines are defined.        */
                       ; /*                                                */
                       ; /* When compiling, this file should be accompanied*/
                       ; /* by buff_vec.c (for running under Buffalo), or  */
                       ; /* rom_vec.c (for running without Buffalo).       */
                       ; /*                                                */
                       ; /* Because it does not include a "main" module,   */
                       ; /* this file will not compile into an executable  */
                       ; /* by itself.  It must either be compiled as to   */
                       ; /* an "object" file (to be linked with other      */
                       ; /* object files later), or included as a file in  */
                       ; /* project that has "main" code defined.          */
                       ; /*                                                */
                       ; /**************************************************/
                       ; 
                       ; #pragma interrupt_handler RTI_ISR()
                       ; void RTI_ISR(void)
                       ; {
                       ;      TFLG2=0x40;
 202F  C640              ldab #64
 2031  F71025            stab 0x1025
                       ;      count=count+1;
 2034  FC4000            ldd _count
 2037  C30001            addd #1
 203A  FD4000            std _count
                       ;      if (count==31)
 203D  FC4000            ldd _count
 2040  1A83001F          cpd #31
 2044  260C              bne L4
                       ;      {
                       ;           printf("*");
 2046  CC2068            ldd #L6
 2049  BD2488            jsr _printf
                       ;           count = 0;
 204C  CC0000            ldd #0
 204F  FD4000            std _count
                       ;      }
 2052                  L4:
                       ; }
 2052                  L3:
 2052                    .dbline 0 ; func end
 2052  3B                rti
 2053                  _IRQ_ISR::
                       ; 
                       ; #pragma interrupt_handler IRQ_ISR()
                       ; void IRQ_ISR(void)
                       ; {
                       ; }
 2053                  L7:
 2053                    .dbline 0 ; func end
 2053  3B                rti
 2054                  _SWI_ISR::
                       ; 
                       ; #pragma interrupt_handler SWI_ISR()
                       ; void SWI_ISR(void)
                       ; {
                       ; }
 2054                  L8:
 2054                    .dbline 0 ; func end
 2054  3B                rti
 2055                  _main::
                       ; 
                       ; void main (void)
                       ; {
                       ;   INTR_ON();
 2055  0E                        cli
                       
                       ;   TFLG2=0x40;
 2056  C640              ldab #64
 2058  F71025            stab 0x1025
                       ;   TMSK2=0x40;
 205B  C640              ldab #64
 205D  F71024            stab 0x1024
                       ;   PACTL=0x03;
 2060  C603              ldab #3
 2062  F71026            stab 0x1026
 2065                  L10:
 2065                  L11:
                       ;   while (1);
 2065  20FE              bra L10
 2067                  X0:
                       ; }
 2067                  L9:
 2067                    .dbline 0 ; func end
 2067  39                rts
                         .area bss
 4000                  _count::
 4000                    .blkb 2
                         .area text
--- 0039                 L6:
--- 0039 2A00              .byte 42,0
