4 // Addition tests - mostly int's
6 /* bit types are not ANSI - so provide a way of disabling bit types
7 * if this file is used to test other compilers besides SDCC */
8 #define SUPPORT_BIT_TYPES 1
11 unsigned char success=0;
12 unsigned char failures=0;
13 unsigned char dummy=0;
16 unsigned int aint0 = 0;
17 unsigned int aint1 = 0;
18 unsigned int aint2 = 0;
19 unsigned int aint3 = 0;
20 unsigned char achar0 = 0;
21 unsigned char achar1 = 0;
22 unsigned char achar2 = 0;
23 unsigned char achar3 = 0;
24 unsigned char *acharP = 0;
51 void add_lit2uint(void)
64 aint0 = aint0 +1; // Should be an increment
68 for(aint1 = 0; aint1 < 100; aint1++)
76 void add_uint2uint (void)
79 aint1 = aint1 + aint0;
84 for(aint2 = 0; aint2<7; aint2++)
95 // aint2, aint3 can be anything.
97 void add_uint2uint2(void)
112 aint2 = aint1 + aint0;
116 aint3 = aint2 + aint1 + aint0;
132 aint3 = aint2 + aint1 + aint0;
139 #if SUPPORT_BIT_TYPES
158 bit3 = bit4+bit5+bit6+bit7+bit0;
164 /* add_bit2uchar(void) - assumes bit0 = 1, aint0 = 7 */
166 void add_bit2uchar(void)
179 void add_bit2uint(void)
191 /***********************************/
312 #if SUPPORT_BIT_TYPES