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

前端 未结 3 1763
温柔的废话
温柔的废话 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:02

    I want to clarify something:

    example: db 'ABCDE';
    

    This reserves 5 bytes in total, each containing a letter.

    ex2: db 1 ;
    

    reserves a byte that contains 1

    ex3: db "cool;
    

    reserves 4 bytes and each byte contains a letter

    ex4: db "cool", 1, 3;
    

    reserves 3 bytes?

    answers: ex4 is 6 bytes

提交回复
热议问题