September 2017
Beginner to intermediate
290 pages
6h 58m
English
The previous subsection shows us how to approach arrays of uniform structures. As there is no particular reason to have string buffers of fixed size and, therefore, no reason for a fixed size structure, let's first of all make a tiny correction to the structure declaration:
struc strtabentry [s]{ .length dw .pad - .string ; Length of the string .string db s, 0 ; Bytes of the string .size = $ - .length ; Size of the structure (valid ; in compile time only)}
We only removed the .pad member of the strtabentry structure, thus allowing it to be of variable size. Obviously, we may no longer use the same get_string_length procedure as we have no constant step to iterate through the array. But you might have definitely ...
Read now
Unlock full access