| 1 | #include <stdio.h> |
|---|---|
| 2 | #include <stdint.h> |
| 3 | |
| 4 | uint64_t pad0 = 0; |
| 5 | uint8_t byteArray[8] = {0}; |
| 6 | uint64_t pad1 = 0; |
| 7 | uint16_t wordArray[4] = {0}; |
| 8 | uint64_t pad2 = 0; |
| 9 | uint32_t dwordArray[2] = {0}; |
| 10 | |
| 11 | int main(int argc, char** argv) { |
| 12 | |
| 13 | int i; |
| 14 | uint8_t localByte; |
| 15 | uint16_t localWord; |
| 16 | uint32_t localDword; |
| 17 | |
| 18 | for (i = 0; i < 8; i++) |
| 19 | { |
| 20 | printf(format: "About to write byteArray[%d] ...\n", i); // About to write byteArray |
| 21 | pad0++; |
| 22 | byteArray[i] = 7; |
| 23 | pad1++; |
| 24 | localByte = byteArray[i]; // Here onwards we should'nt be stopped in loop |
| 25 | byteArray[i]++; |
| 26 | localByte = byteArray[i]; |
| 27 | } |
| 28 | |
| 29 | pad0 = 0; |
| 30 | pad1 = 0; |
| 31 | |
| 32 | for (i = 0; i < 4; i++) |
| 33 | { |
| 34 | printf(format: "About to write wordArray[%d] ...\n", i); // About to write wordArray |
| 35 | pad0++; |
| 36 | wordArray[i] = 7; |
| 37 | pad1++; |
| 38 | localWord = wordArray[i]; // Here onwards we should'nt be stopped in loop |
| 39 | wordArray[i]++; |
| 40 | localWord = wordArray[i]; |
| 41 | } |
| 42 | |
| 43 | pad0 = 0; |
| 44 | pad1 = 0; |
| 45 | |
| 46 | for (i = 0; i < 2; i++) |
| 47 | { |
| 48 | printf(format: "About to write dwordArray[%d] ...\n", i); // About to write dwordArray |
| 49 | pad0++; |
| 50 | dwordArray[i] = 7; |
| 51 | pad1++; |
| 52 | localDword = dwordArray[i]; // Here onwards we shouldn't be stopped in loop |
| 53 | dwordArray[i]++; |
| 54 | localDword = dwordArray[i]; |
| 55 | } |
| 56 | |
| 57 | return 0; |
| 58 | } |
| 59 |
