text: 
  // automatically generated by m4 from headers in proto subdir
  
  
  #ifndef _IM2_H
  #define _IM2_H
  
  #include <stdint.h>
  
  extern void __LIB__ __FASTCALL__ im2_init(void *im2_table_address) __smallc;
  
  
  extern void __LIB__ *im2_install_isr(uint8_t vector,void *isr) __smallc;
  extern void __LIB__ __CALLEE__ *im2_install_isr_callee(uint8_t vector,void *isr) __smallc;
  #define im2_install_isr(a,b) im2_install_isr_callee(a,b)
  
  
  extern void __LIB__ *im2_create_generic_isr(uint8_t num_callbacks,void *address) __smallc;
  extern void __LIB__ __CALLEE__ *im2_create_generic_isr_callee(uint8_t num_callbacks,void *address) __smallc;
  #define im2_create_generic_isr(a,b) im2_create_generic_isr_callee(a,b)
  
  
  extern void __LIB__ *im2_create_generic_isr_8080(uint8_t num_callbacks,void *address) __smallc;
  extern void __LIB__ __CALLEE__ *im2_create_generic_isr_8080_callee(uint8_t num_callbacks,void *address) __smallc;
  #define im2_create_generic_isr_8080(a,b) im2_create_generic_isr_8080_callee(a,b)
  
  
  extern void __LIB__ im2_append_generic_callback(uint8_t vector,void *callback) __smallc;
  extern void __LIB__ __CALLEE__ im2_append_generic_callback_callee(uint8_t vector,void *callback) __smallc;
  #define im2_append_generic_callback(a,b) im2_append_generic_callback_callee(a,b)
  
  
  extern void __LIB__ im2_prepend_generic_callback(uint8_t vector,void *callback) __smallc;
  extern void __LIB__ __CALLEE__ im2_prepend_generic_callback_callee(uint8_t vector,void *callback) __smallc;
  #define im2_prepend_generic_callback(a,b) im2_prepend_generic_callback_callee(a,b)
  
  
  extern int __LIB__ im2_remove_generic_callback(uint8_t vector,void *callback) __smallc;
  extern int __LIB__ __CALLEE__ im2_remove_generic_callback_callee(uint8_t vector,void *callback) __smallc;
  #define im2_remove_generic_callback(a,b) im2_remove_generic_callback_callee(a,b)
  
  
  
  #ifdef __CLANG
  
  #define IM2_DEFINE_ISR(name)       error clang does not support IM2_DEFINE_ISR;
  #define IM2_DEFINE_ISR_8080(name)  error clang does not support IM2_DEFINE_ISR_8080;
  
  #endif
  
  #ifdef __SCCZ80
  
  #define IM2_DEFINE_ISR(name)  void name(void) \
  { \
  asm("\tEXTERN\tasm_im2_push_registers\n" \
  "\tEXTERN\tasm_im2_pop_registers\n" \
  "\n" \
  "\tcall\tasm_im2_push_registers\n" \
  "\tcall\t__im2_isr_" #name "\n" \
  "\tcall\tasm_im2_pop_registers\n" \
  "\n" \
  "\tei\n" \
  "\treti\n" \
  ); \
  } \
  void _im2_isr_##name(void)
  
  #define IM2_DEFINE_ISR_8080(name)  void name(void) \
  { \
  asm("\tEXTERN\tasm_im2_push_registers_8080\n" \
  "\tEXTERN\tasm_im2_pop_registers_8080\n" \
  "\n" \
  "\tcall\tasm_im2_push_registers_8080\n" \
  "\tcall\t__im2_isr_8080_" #name "\n" \
  "\tcall\tasm_im2_pop_registers_8080\n" \
  "\n" \
  "\tei\n" \
  "\treti\n" \
  ); \
  } \
  void _im2_isr_8080_##name(void)
  
  #endif
  
  #ifdef __SDCC
  
  #define IM2_DEFINE_ISR(name)  void name(void) __naked \
  { \
  	__asm \
  	EXTERN	asm_im2_push_registers \
     EXTERN	asm_im2_pop_registers \
  	\
  	call	asm_im2_push_registers \
  	call   __im2_isr_##name \
  	call   asm_im2_pop_registers \
  	\
  	ei \
  	reti \
  	__endasm; \
  } \
  void _im2_isr_##name(void)
  
  #define IM2_DEFINE_ISR_8080(name)  void name(void) __critical __interrupt(0)
  
  #endif
  
  #endif
  