                         .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 0000              .word _RTI_ISR
 00EE 7E                .byte 126
 00EF 0024              .word _IRQ_ISR
 00F1 7E                .byte 126
 00F2 F000              .word 61440
 00F4 7E                .byte 126
 00F5 0025              .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
 0000                 _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;
 0000 C640              ldab #64
 0002 F71025            stab 0x1025
                       ;      count=count+1;
 0005 FC0000            ldd _count
 0008 C30001            addd #1
 000B FD0000            std _count
                       ;      if (count==31)
 000E FC0000            ldd _count
 0011 1A83001F          cpd #31
 0015 260C              bne L4
                       ;      {
                       ;           printf("*");
 0017 CC0039            ldd #L6
 001A BD0000            jsr _printf
                       ;           count = 0;
 001D CC0000            ldd #0
 0020 FD0000            std _count
                       ;      }
 0023                 L4:
                       ; }
 0023                 L3:
 0023                   .dbline 0 ; func end
 0023 3B                rti
 0024                 _IRQ_ISR::
                       ; 
                       ; #pragma interrupt_handler IRQ_ISR()
                       ; void IRQ_ISR(void)
                       ; {
                       ; }
 0024                 L7:
 0024                   .dbline 0 ; func end
 0024 3B                rti
 0025                 _SWI_ISR::
                       ; 
                       ; #pragma interrupt_handler SWI_ISR()
                       ; void SWI_ISR(void)
                       ; {
                       ; }
 0025                 L8:
 0025                   .dbline 0 ; func end
 0025 3B                rti
 0026                 _main::
                       ; 
                       ; void main (void)
                       ; {
                       ;   INTR_ON();
 0026 0E                        cli
                       
                       ;   TFLG2=0x40;
 0027 C640              ldab #64
 0029 F71025            stab 0x1025
                       ;   TMSK2=0x40;
 002C C640              ldab #64
 002E F71024            stab 0x1024
                       ;   PACTL=0x03;
 0031 C603              ldab #3
 0033 F71026            stab 0x1026
 0036                 L10:
 0036                 L11:
                       ;   while (1);
 0036 20FE              bra L10
 0038                 X0:
                       ; }
 0038                 L9:
 0038                   .dbline 0 ; func end
 0038 39                rts
                         .area bss
 0000                 _count::
 0000                   .blkb 2
                         .area text
 0039                 L6:
 0039 2A00              .byte 42,0
