* src/regression/ptrarg.c: added, fails due to bug #1430967
[fw/sdcc] / src / regression / string1.c
1 #include "gpsim_assert.h"
2 unsigned char failures=0;
3 //unsigned bit bit1;
4
5 typedef unsigned char byte;
6
7
8 byte uchar0;
9 const byte arr[] = { 1,2,8,9,0 };
10
11 bit at 0x30 B1;
12
13 void
14 done()
15 {
16   ASSERT(MANGLE(failures) == 0);
17   PASSED();
18 }
19
20 void  isr(void) interrupt 1 using 1
21 {
22
23   if(arr[3]!=9)
24     failures++;
25   PORTB = 7;
26   B1=1;
27 }
28
29 void lcd1(const unsigned char *str)
30 {
31   const char *p = "hello world!\r\n";
32
33   if(!str)
34     failures++;
35
36  if(str && str[2] != 'r')
37     failures++;
38
39   if(arr[3]!=9)
40     failures++;
41
42   while (1) {
43     if (0 == *p) break;
44     PORTB = *p;
45     p++;
46   }
47
48 }
49
50 void main(void)
51 {
52   dummy = 0;
53
54   lcd1("str");
55   B1=0;
56   done();
57 }