0

Is there a difference between the following two statements:

i: DD 12345

    section .data:
i DD 12345
John
  • 1,049
  • 1
  • 14
  • 34
  • 1
    No. The colon is optional. – Frank Kotler Jan 02 '15 at 11:01
  • For Microsoft and probably Intel assemblers, | i: dd 12345 | is not allowed. Labels with colons are not allowed in the data section, and in the code section you can't have | i: dd 12345 | either, but you could have | i: | on one line and | dd 12345 | on the next line, but the i: will represent an offset in the code segment, while with | i dd 12345| the i represents a double word with content value 12345. – rcgldr Jan 03 '15 at 03:52
  • re: `section .data:` instead of `section .data` - that's a bug. [Segmentation fault in x86\_64 assembly writing into section .data:](https://stackoverflow.com/a/69249191) – Peter Cordes Jan 06 '22 at 03:22

0 Answers0