What is the meaning of a dollar sign in front of a gnu assembly label?
For example, what is the difference between mov msg, %si and mov $msg, %si
You use $(dollar) sign when addressing a constant, e.g.:
movl $1, %eax (put 1 to %eax register)
or when handling an address of some variable, e.g.: movl $var, %eax (this means take an address of var label and put it into %eax register).
If you don't use dollar sign that would mean "take the value from var label and put it to register".