I am trying to get a basic feel for assembly and am working through some tutorials. The following code is an excerpt of one of the tutorials.
.
.
.
section .data
msg1 db 'Hello, programmers!',0xA,0xD
len1 equ $ - msg1
As I understand it, the directive db tells the assembler to reserve 1 byte of memory but 'Hello, programmers!' is certainly longer than 1 byte. Also, I do not know what 0xA,0xD
are supposed to accomplish. Moreover, len1
is supposed to hold the length of the string, I want to know what the expression $-msg1
specifically $
is.
Thanks!