blob: 163893a13610381e0432c8a3618a763cb1ba66b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#include "gpsim_assert.h"
#include "picregs.h"
unsigned char failures=0;
//unsigned bit bit1;
typedef unsigned char byte;
byte uchar0;
const byte arr[] = { 1,2,8,9,0 };
void
done()
{
ASSERT(MANGLE(failures) == 0);
PASSED();
}
void isr(void) __interrupt 1 __using 1
{
if(arr[3]!=9)
failures++;
PORTB = 7;
}
void lcd1(const unsigned char *str)
{
const char *p = "hello world!\r\n";
if(!str)
failures++;
if(str && str[2] != 'r')
failures++;
if(arr[3]!=9)
failures++;
while (1) {
if (0 == *p) break;
PORTB = *p;
p++;
}
}
void main(void)
{
lcd1("str");
done();
}
|