	.module RTI_Test.c
	.area memory(abs)
	.org 0xc4
_IVJT::
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word _RTI_ISR
	.byte 126
	.word _IRQ_ISR
	.byte 126
	.word 61440
	.byte 126
	.word _SWI_ISR
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.byte 126
	.word 61440
	.area text
_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;
	ldab #64
	stab 0x1025
; 	 count=count+1;
	ldd _count
	addd #1
	std _count
; 	 if (count==31)
	ldd _count
	cpd #31
	bne L4
; 	 {
; 	      printf("*");
	ldd #L6
	jsr _printf
; 		  count = 0;
	ldd #0
	std _count
;      }
L4:
; }
L3:
	.dbline 0 ; func end
	rti
_IRQ_ISR::
; 
; #pragma interrupt_handler IRQ_ISR()
; void IRQ_ISR(void)
; {
; }
L7:
	.dbline 0 ; func end
	rti
_SWI_ISR::
; 
; #pragma interrupt_handler SWI_ISR()
; void SWI_ISR(void)
; {
; }
L8:
	.dbline 0 ; func end
	rti
_main::
; 
; void main (void)
; {
;   INTR_ON();
			cli

;   TFLG2=0x40;
	ldab #64
	stab 0x1025
;   TMSK2=0x40;
	ldab #64
	stab 0x1024
;   PACTL=0x03;
	ldab #3
	stab 0x1026
L10:
L11:
;   while (1);
	bra L10
X0:
; }
L9:
	.dbline 0 ; func end
	rts
	.area bss
_count::
	.blkb 2
	.area text
L6:
	.byte 42,0
