What does the dollar sign ($) mean in x86 assembly when calculating string lengths like “$ – label”? [duplicate]
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.