Good day! I need to read 12 values from 12 addresses, which are reserved only for these 12 values no matter how many times the application is run, I read the information from a binary file, record it on the 12 addresses and than use an array to compare the 12 values from the addresses, to 12 values in the array. The idea is not to compare every variable 1 by 1, because that will to bad for me. Perhaps there is a way to reserve the addresses and just compare it to the value in the array which is the same as the address? Meaning "if value on address 0x105 equals the value in array element 5, do something".
How about like this:
for (i=0; i<12 ;i++)
parameter = 0x100 + i;
How do I use it afterwards in order to compare with an address in the array.
In array "parameter[2]" I have recorded "0x102", I guess I have to somehow reserve addresses from "0x100" to "0x111" for use only by putting something there by using the address in the array, can someone tell me how to do that please?
The whole idea is that I dont declare the variables separetaly, but use one array in order to compare a value with the value on address "what is recorded in the array" instead of using 1 by 1 the variables, which makes the program too long.
So I compare the value read from a file "100 decimal" to the value in address "0x102" which is in the array element "paremeter[2]".
I also need to reserve the addresses from "0x100" to "0x111", so the value from them is always read and always coresponds to the same value for comparison.
How about like this:
for (i=0; i<12 ;i++)
parameter = 0x100 + i;
How do I use it afterwards in order to compare with an address in the array.
In array "parameter[2]" I have recorded "0x102", I guess I have to somehow reserve addresses from "0x100" to "0x111" for use only by putting something there by using the address in the array, can someone tell me how to do that please?
The whole idea is that I dont declare the variables separetaly, but use one array in order to compare a value with the value on address "what is recorded in the array" instead of using 1 by 1 the variables, which makes the program too long.
So I compare the value read from a file "100 decimal" to the value in address "0x102" which is in the array element "paremeter[2]".
I also need to reserve the addresses from "0x100" to "0x111", so the value from them is always read and always coresponds to the same value for comparison.