preface BYTE "Hello", 0Each character uses a byte of storage. The above code is equal to:
preface BYTE 'H', 'e', 'l', 'l', 'o', 0A string can be spread across multiple lines, for example:
preface BYTE "Assembly language for Intel computers", 0Dh, 0Ah
BYTE "A book for IA-32 processor architecture.", 0
The hexadecimal bytes and (carriage-return line-feed) advance the cursor to the beginning of the next line of standard output.
The continuation character () may be used to concatenate two lines into a single program statement. For example, the following two statements are the same:
preface BYTE "Assembly language for Intel computers", 0
preface \
BYTE "Assembly language for Intel computers", 0
|
Replacing a Character |
Printing Part of a String |
4 + 6 |
| Output | Output | Output |
| This is a test. | test. | 10 |
|
“I asked my brother-in-law, the father of four boys, ‘If you had it to do all over again, would you still have kids?’ ‘Yes,’ he said. ‘Just not these four.’” — Sheila Lee |