How are dw and dd different from db directives for strings?

前端 未结 3 1768
温柔的废话
温柔的废话 2020-12-03 18:54

Let\'s say I want to define a initialized variable string before running my assembly program (in section .data). The variable I chose to create is called

3条回答
  •  天涯浪人
    2020-12-03 19:16

    For each character in the string "0123456789ABCDEF" you need just one byte. So, the string will occupy 16 bytes in the memory.

    In case of this declaration:

    vark db 1

    you can make this:

    mov [vark],128

    and cannot:

    mov [vark],1024

    but in this case:

    vark dw 1

    you can.

提交回复
热议问题