String - Using as
Description: Using as

Next: Struct, Previous: Stab, Up: Pseudo Ops

### 7.106 `.string` "str", `.string8` "str", `.string16`

"str", `.string32` "str", `.string64` "str"

Copy the characters in str to the object file. You may specify more than one string to copy, separated by commas. Unless otherwise specified for a particular machine, the assembler marks the end of each string with a 0 byte. You can use any of the escape sequences described in Strings.

The variants `string16`, `string32` and `string64` differ from the `string` pseudo opcode in that each 8-bit character from str is copied and expanded to 16, 32 or 64 bits respectively. The expanded characters are stored in target endianness byte order.

Example:

         	.string32 "BYE"
         expands to:
         	.string   "B\0\0\0Y\0\0\0E\0\0\0"  /* On little endian targets.  */
         	.string   "\0\0\0B\0\0\0Y\0\0\0E"  /* On big endian targets.  */