what is the syntax to define a string constant in assembly?

前端 未结 3 1497
南方客
南方客 2021-02-19 10:51

I am learning assembly I see two examples of defining a string:

msg db \'Hello, world!\',0xa

  • what does the 0xa mean here?

message DB \'I

3条回答
  •  梦如初夏
    2021-02-19 11:17

    0xa stands for the hexadecimal value "A" which is 10 in decimal. The Linefeed control character has ASCII code 10 (Return has D hexadecimal or 13 decimal).

    Strings are commonly terminated by a nul character to indicate their end.

提交回复
热议问题