#ifndef GENERIC_FI_H
#define GENERIC_FI_H

/* Compilers may use another function within the assert macro to exit the 
 * program. QAC thus does not see an "exit" function and assumes the 
 * function returns, which it does not.
 * The below pragma tells QAC the compiler supplied function does not
 * return.
 */

/* examples - GCC, ICC, BCC 3.1, BCC 5.5, CYGWIN gcc, Watcom 1.6 */
#pragma PRQA_NO_RETURN __assert_fail
#pragma PRQA_NO_RETURN __assert_perror_fail
#pragma PRQA_NO_RETURN __assert

/* SDCC, BCC 5.5, Digital Mars DM 8.4, LCC, Watcom 1.6, Fujitsu F2MM,FR */
#pragma PRQA_NO_RETURN _assert

/* HI-TECH PCCLite */
#pragma PRQA_NO_RETURN _fassert

/* DJGPP, D.J.Delorie gcc DOS port */
#pragma PRQA_NO_RETURN __dj_assert

/* Watcom 1.6, MSVS 08 */
#pragma PRQA_NO_RETURN _wassert
#pragma PRQA_NO_RETURN __wassert
#pragma PRQA_NO_RETURN _assert99
#pragma PRQA_NO_RETURN _wassert99
#pragma PRQA_NO_RETURN __assert99
#pragma PRQA_NO_RETURN __wassert99

/* Renesas M32R compiler */
#pragma PRQA_NO_RETURN _Assert

/* NEC 78K0 series 16bit compiler */
#pragma PRQA_NO_RETURN __assertfail
#pragma PRQA_NO_RETURN __assertfail_n
#pragma PRQA_NO_RETURN __assertfail_f


/* Depending on the code that the compiler maker uses within the assert macro,
 * QAC may issue warnings. It is also possible that when the NDEBUG macro is used
 * to suppress the assertion code, QAC may issue a "no side-effects" warning.
 * To eliminate these, we turn off all warnings for the assert macro.
 */
#pragma PRQA_MACRO_MESSAGES_OFF "assert"


/* Any other items that may be required in a "force-include" file should be placed below. */

/* builtin function prototypes */

unsigned long __BANK0 ( unsigned int addr ) ;
unsigned long __BANK1 ( unsigned int addr ) ;
unsigned long __BANK2 ( unsigned int addr ) ;
unsigned long __BANK3 ( unsigned int addr ) ;
unsigned long __BANK4 ( unsigned int addr ) ;
unsigned long __BANK5 ( unsigned int addr ) ;
unsigned long __BANK6 ( unsigned int addr ) ;
unsigned long __BANK7 ( unsigned int addr ) ;
unsigned long __BANK8 ( unsigned int addr ) ;
unsigned long __BANK9 ( unsigned int addr ) ;
unsigned long __BANK10 ( unsigned int addr ) ;
unsigned long __BANK11 ( unsigned int addr ) ;
unsigned long __BANK12 ( unsigned int addr ) ;
unsigned long __BANK13 ( unsigned int addr ) ;
unsigned long __BANK14 ( unsigned int addr ) ;
unsigned long __BANK15 ( unsigned int addr ) ;

/* functions for absolute address accessing.
 * Used with #pragma rot directive.
 * If a user supplies the functions, these 
 * prototypes should be removed.
 */
unsigned char rorb (unsigned char x , unsigned char y ) ;
unsigned char rolb (unsigned char x , unsigned char y ) ;
unsigned int rorw (unsigned int x , unsigned char y ) ;
unsigned int rolw (unsigned int x , unsigned char y ) ;

/* functions for absolute address accessing.
 * Used with #pragma mul directive.
 * If a user supplies the functions, these 
 * prototypes should be removed.
 */
unsigned int mulu (unsigned char x, unsigned char y) ;

/* functions for absolute address accessing.
 * Used with #pragma div directive.
 * If a user supplies the functions, these 
 * prototypes should be removed.
 */
unsigned int divuw(unsigned int x, unsigned char y) ;
unsigned char moduw(unsigned int x, unsigned char y) ;

/* functions for absolute address accessing.
 * Used with #pragma opc directive.
 * If a user supplies the functions, these 
 * prototypes should be removed.
 */
void __OPC (unsigned char x, ...);
void __DI(void);
void __EI(void);

#else
#error "Multiple include"
#endif  /* ifndef GENERIC_FI_H */
