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
/
push_pop_sp.c
blob
faf8061bfd36fd85cdfdc082ffad11adf8149d8d
1
/** push/pop tests for mcs51.
2
*/
3
#include <testfwk.h>
4
5
__data
unsigned char
_SP0
,
_SP1
,
_SP2
;
6
7
void
test
(
void
)
8
{
9
#ifdef __SDCC_mcs51
10
__asm
11
mov __SP0
,
SP
12
push SP
13
mov r0
,
SP
14
mov __SP1
,
@r0
15
mov @r0
,
#0xFE
16
pop SP
17
mov __SP2
,
SP
18
mov SP
,
__SP0
19
__endasm
;
20
21
ASSERT
(
_SP0
==
_SP1
);
22
ASSERT
(
_SP2
==
0xFE
);
23
#endif
24
}