repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
nadd.c
blob
65c0c6140954ebfbdd1e895ab9097f332ed7cdc0
1
/** Test use of pdk15 nadd instructions.
2
3
*/
4
#include <testfwk.h>
5
6
unsigned char
a
,
b
,
c
;
7
8
void
f
(
void
)
9
{
10
c
=
b
- (
a
&
0x5f
);
11
}
12
13
void
g
(
void
)
14
{
15
c
= (
a
&
0x5f
) -
c
;
16
}
17
18
void
testNadd
(
void
)
19
{
20
a
=
1
;
21
b
=
24
;
22
f
();
23
ASSERT
(
c
==
23
);
24
25
a
=
24
;
26
g
();
27
ASSERT
(
c
==
1
);
28
}
29