annotate test/offset.c @ 373:a9bc85fe6702

*** empty log message ***
author kono
date Sun, 11 Jul 2004 13:31:52 +0900
parents
children 91849fdeea60
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
373
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
1
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
2 #define BIT8 260
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
3 #define BIT10 1030
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
4 #define BIT12 5000
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
5 #define BIT16 (65536*2)
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
6
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
7 int midium[BIT12];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
8 int large[BIT16];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
9
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
10 main()
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
11 {
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
12 int *p;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
13 int local_midium[BIT12];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
14 int local_large[BIT16];
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
15
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
16 midium[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
17 large[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
18 local_midium[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
19 local_large[0]=0x55;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
20
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
21 midium[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
22 large[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
23 local_midium[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
24 local_large[BIT8]=0x50;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
25
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
26 midium[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
27 large[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
28 local_midium[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
29 local_large[BIT10]=0xa0;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
30
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
31 midium[BIT12-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
32 large[BIT16-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
33 local_midium[BIT12-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
34 local_large[BIT16-1]=0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
35
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
36 printf("%x\n", midium[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
37 printf("%x\n", large[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
38 printf("%x\n", local_midium[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
39 printf("%x\n", local_large[0]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
40
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
41 printf("%x\n", midium[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
42 printf("%x\n", large[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
43 printf("%x\n", local_midium[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
44 printf("%x\n", local_large[BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
45
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
46 printf("%x\n", midium[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
47 printf("%x\n", large[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
48 printf("%x\n", local_midium[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
49 printf("%x\n", local_large[BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
50
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
51 printf("%x\n", midium[BIT12-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
52 printf("%x\n", large[BIT16-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
53 printf("%x\n", local_midium[BIT12-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
54 printf("%x\n", local_large[BIT16-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
55
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
56 p = local_large+BIT16;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
57
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
58 p[-1] = 0xaa;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
59 p[-BIT8] = 0xbb;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
60 p[-BIT10] = 0xcc;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
61 p[-(BIT12-1)] = 0xdd;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
62 p[-(BIT16-1)] = 0xee;
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
63
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
64 printf("%x\n", p[-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
65 printf("%x\n", p[-BIT8]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
66 printf("%x\n", p[-BIT10]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
67 printf("%x\n", p[BIT12-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
68 printf("%x\n", p[BIT16-1]);
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
69
a9bc85fe6702 *** empty log message ***
kono
parents:
diff changeset
70 }