373
|
1
|
|
2 #define BIT8 260
|
|
3 #define BIT10 1030
|
|
4 #define BIT12 5000
|
|
5 #define BIT16 (65536*2)
|
|
6
|
|
7 int midium[BIT12];
|
|
8 int large[BIT16];
|
|
9
|
375
|
10
|
|
11 main0(int ac,char *av[])
|
373
|
12 {
|
|
13 int *p;
|
|
14 int local_midium[BIT12];
|
|
15 int local_large[BIT16];
|
|
16
|
375
|
17 #if 0
|
|
18 printf("int ac =\t%x\n",&ac);
|
|
19 printf("int midium[0] =\t%x\n",&midium[0]);
|
|
20 printf("int midium[BIT12] =\t%x\n",&midium[BIT12]);
|
|
21 printf("int large[0] =\t%x\n",&large[0]);
|
|
22 printf("int large[BIT16] =\t%x\n",&large[BIT16]);
|
|
23 printf("int local_midium[0] =\t%x\n",&local_midium[0]);
|
|
24 printf("int local_midium[BIT12] =\t%x\n",&local_midium[BIT12]);
|
|
25 printf("int local_large[0] =\t%x\n",&local_large[0]);
|
|
26 printf("int local_large[BIT16] =\t%x\n",&local_large[BIT16]);
|
|
27 #endif
|
|
28
|
373
|
29 midium[0]=0x55;
|
|
30 large[0]=0x55;
|
|
31 local_midium[0]=0x55;
|
|
32 local_large[0]=0x55;
|
|
33
|
|
34 midium[BIT8]=0x50;
|
|
35 large[BIT8]=0x50;
|
|
36 local_midium[BIT8]=0x50;
|
|
37 local_large[BIT8]=0x50;
|
|
38
|
|
39 midium[BIT10]=0xa0;
|
|
40 large[BIT10]=0xa0;
|
|
41 local_midium[BIT10]=0xa0;
|
|
42 local_large[BIT10]=0xa0;
|
|
43
|
|
44 midium[BIT12-1]=0xaa;
|
|
45 large[BIT16-1]=0xaa;
|
|
46 local_midium[BIT12-1]=0xaa;
|
|
47 local_large[BIT16-1]=0xaa;
|
|
48
|
|
49 printf("%x\n", midium[0]);
|
|
50 printf("%x\n", large[0]);
|
|
51 printf("%x\n", local_midium[0]);
|
|
52 printf("%x\n", local_large[0]);
|
|
53
|
|
54 printf("%x\n", midium[BIT8]);
|
|
55 printf("%x\n", large[BIT8]);
|
|
56 printf("%x\n", local_midium[BIT8]);
|
|
57 printf("%x\n", local_large[BIT8]);
|
|
58
|
|
59 printf("%x\n", midium[BIT10]);
|
|
60 printf("%x\n", large[BIT10]);
|
|
61 printf("%x\n", local_midium[BIT10]);
|
|
62 printf("%x\n", local_large[BIT10]);
|
|
63
|
|
64 printf("%x\n", midium[BIT12-1]);
|
|
65 printf("%x\n", large[BIT16-1]);
|
|
66 printf("%x\n", local_midium[BIT12-1]);
|
|
67 printf("%x\n", local_large[BIT16-1]);
|
|
68
|
|
69 p = local_large+BIT16;
|
|
70
|
|
71 p[-1] = 0xaa;
|
|
72 p[-BIT8] = 0xbb;
|
|
73 p[-BIT10] = 0xcc;
|
|
74 p[-(BIT12-1)] = 0xdd;
|
|
75 p[-(BIT16-1)] = 0xee;
|
|
76
|
|
77 printf("%x\n", p[-1]);
|
|
78 printf("%x\n", p[-BIT8]);
|
|
79 printf("%x\n", p[-BIT10]);
|
375
|
80 printf("%x\n", p[-(BIT12-1)]);
|
|
81 printf("%x\n", p[-(BIT16-1)]);
|
|
82
|
377
|
83 p = large+BIT16;
|
|
84
|
|
85 p[-1] = 0xaa;
|
|
86 p[-BIT8] = 0xbb;
|
|
87 p[-BIT10] = 0xcc;
|
|
88 p[-(BIT12-1)] = 0xdd;
|
|
89 p[-(BIT16-1)] = 0xee;
|
|
90
|
|
91 printf("%x\n", p[-1]);
|
|
92 printf("%x\n", p[-BIT8]);
|
|
93 printf("%x\n", p[-BIT10]);
|
|
94 printf("%x\n", p[-(BIT12-1)]);
|
|
95 printf("%x\n", p[-(BIT16-1)]);
|
|
96
|
|
97
|
375
|
98 for(p=local_midium;p<&local_midium[BIT12];p++) *p = p-local_midium;
|
|
99 for(p=local_large;p<&local_large[BIT16];p++) *p = p-local_large;
|
373
|
100
|
377
|
101 for(p=midium;p<&midium[BIT12];p++) *p = p-midium;
|
|
102 for(p=large;p<&large[BIT16];p++) *p = p-large;
|
|
103
|
373
|
104 }
|
375
|
105
|
|
106 main(int ac,char *av[])
|
|
107 {
|
|
108 int i=-1,j=-2,k=-3;
|
|
109
|
|
110 main0(ac,av);
|
|
111
|
|
112 printf("%d %d %d %d\n",ac,i,j,k);
|
|
113 return 0;
|
|
114 }
|
|
115
|