September 2017
Beginner to intermediate
290 pages
6h 58m
English
By now, we are fine with everything regarding access to structures and members thereof, but what if we have more than one structure of the same type? We would naturally organize them into an array of structures. Looks simple, and partially so, it is.
In order to ease the process of accessing array members, we may use an array of pointers and access each structure in the array through a kind of lookup table. In this scenario, we would simply read a pointer from the lookup table with the following:
mov ebx, [lookup_table + ecx * 4] ; ECX contains the index into array ; of pointers and 4 is the scale (size ; of pointer on 32-bit systems)
Having a pointer to the structure of interest, we continue the work as usual.
Our ...
Read now
Unlock full access