Interrupt context registers WSAVE and SSAVE were not getting allocated.
[fw/sdcc] / src / regression / string1.c
1 #define __16F873
2 #include "p16f873.h"
3 unsigned char success=0;
4 unsigned char failures=0;
5 unsigned char dummy=0;
6 //unsigned bit bit1;
7
8 typedef unsigned char byte;
9
10
11 byte uchar0;
12 const byte arr[] = { 1,2,8,9,0 };
13
14 bit at 0x30 B1;
15
16 void done()
17 {
18
19   dummy++;
20
21 }
22
23 void  isr(void) interrupt 1 using 1
24 {
25
26   if(arr[3]!=9)
27     failures++;
28   PORTB = 7;
29   B1=1;
30 }
31
32 void lcd1(const unsigned char *str)
33 {
34   const char *p = "hellow world!\r\n";
35
36   if(!str)
37     failures++;
38
39  if(str && str[2] != 'r')
40     failures++;
41
42   if(arr[3]!=9)
43     failures++;
44
45   while (1) {
46     if (0 == *p) break;
47     PORTB = *p;
48     p++;
49   }
50
51 }
52
53 void main(void)
54 {
55   dummy = 0;
56
57   lcd1("str");
58   B1=0;
59   success = failures;
60   done();
61 }