For example, if we were writing a simple hello world type program, the .data section might contain something like:
section .data
msg db 'Enter something: '
len equ $ - msg
What does the $ in this example represent, and why does $ - msg
equal the length of the string?
In this case, the $ means the current address according to the assembler. $ - msg is the current address of the assembler minus the address of msg, which would be the length of the string.