Copyright (C) 2000-2012 |
GNU Info (nasm.info)Section 3.4.33.4.3. String Constants ----------------------- String constants are only acceptable to some pseudo-instructions, namely the `DB' family and `INCBIN'. A string constant looks like a character constant, only longer. It is treated as a concatenation of maximum-size character constants for the conditions. So the following are equivalent: db 'hello' ; string constant db 'h','e','l','l','o' ; equivalent character constants And the following are also equivalent: dd 'ninechars' ; doubleword string constant dd 'nine','char','s' ; becomes three doublewords db 'ninechars',0,0,0 ; and really looks like this Note that when used as an operand to `db', a constant like `'ab'' is treated as a string constant despite being short enough to be a character constant, because otherwise `db 'ab'' would have the same effect as `db 'a'', which would be silly. Similarly, three-character or four-character constants are treated as strings when they are operands to `dw'. automatically generated by info2www version 1.2.2.9 |