7 typedef unsigned char BYTE
;
8 typedef unsigned int WORD
;
10 volatile BYTE MYDAT
[8];
12 #define MAKEWORD(msb, lsb) (((WORD) (msb) << 8) | (lsb))
14 #define SETUP_VALUE() MAKEWORD (MYDAT[3], MYDAT[2])
15 #define SETUP_INDEX() MAKEWORD (MYDAT[5], MYDAT[4])
16 #define SETUP_LENGTH() MAKEWORD (MYDAT[7], MYDAT[6])
18 WORD
badfunc (BYTE cmd
)
20 WORD val
= SETUP_VALUE();
21 WORD idx
= SETUP_INDEX();
22 WORD len
= SETUP_LENGTH();
23 volatile WORD r
= val
+ idx
+ len
;
40 ASSERT (badfunc (0) == 12);
41 ASSERT (badfunc (1) == 0);