dattalo - Added bank1.c and string1.c to test banking and character strings in the...
[fw/sdcc] / src / regression / string1.c
1 unsigned char success=0;
2 unsigned char failures=0;
3 unsigned char dummy=0;
4 //unsigned bit bit1;
5
6 typedef unsigned char byte;
7 data at 0x06 unsigned char  PORTB;
8
9 byte uchar0;
10 const byte arr[] = { 1,2,8,9,0 };
11
12 bit at 0x30 B1;
13
14 void done()
15 {
16
17   dummy++;
18
19 }
20
21 void  isr(void) interrupt 1 using 1
22 {
23
24   if(arr[3]!=9)
25     failures++;
26   PORTB = 7;
27   B1=1;
28 }
29
30 void lcd1(const unsigned char *str)
31 {
32   if(str && str[2] != 'r')
33     failures++;
34
35   if(arr[3]!=9)
36     failures++;
37 }
38
39 void main(void)
40 {
41   dummy = 0;
42
43   lcd1("str");
44   B1=0;
45   success = failures;
46   done();
47 }