As you define data entries (using .int, for example) and specify instructions, a section (text or data) will be filled with content. Each section has a “current location” counter to keep track of the number of byte locations used up so far. The “current location” counter is represented by a single period (.).
For example, if you want to allocate 20 bytes without specifying what to initialize it with, you can use the following directive:
This directive says that the current location should be incremented by 20, which essentially takes up 20 bytes of the current section (either text or data).
More often, we use the current location to define symbolic labels:
In this example, prompt is defined to be a particular location (where the current location was) before the null-terminated string is allocated. This means that prompt is actually defined as the location of the first byte (E) of the null-terminated string.
Defining a symbol as the current location is a frequent operation. That is why it has a short form. The following code is equivalent to the previous code:
Note that .asciz can start on the following line, but this form is more compact.