projects
/
fw
/
sdcc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* as/hc08/lkaomf51.c (OutputName),
[fw/sdcc]
/
support
/
regression
/
tests
/
bug1409955.c
1
/*
2
bug1409955.c
3
*/
4
5
#include <testfwk.h>
6
7
void
8
WriteToXData(char* buffer)
9
{
10
(void)buffer;
11
}
12
13
void
14
test_push_pop(void)
15
{
16
char a;
17
xdata char* p;
18
char d[5];
19
20
d[0] = 0;
21
d[1] = 0;
22
d[2] = 0;
23
d[3] = 0;
24
d[4] = 0;
25
p = 0;
26
do
27
{ if( (unsigned short)p > 10 ) a = 10-(char)p;
28
else a = 60;
29
d[0] = 0x12;
30
d[1] = 0x34;
31
WriteToXData(d); // Watch the xdata: 0, 1!
32
p += a;
33
ASSERT (d[0] == 0x12);
34
ASSERT (d[1] == 0x34);
35
} while( !p );
36
d[0] = 1;
37
d[1] = 2;
38
d[2] = 3;
39
d[3] = 4;
40
d[4] = 5;
41
}