Although I have more "advanced" questions on this site about Assembler, I still can't understand the variables, everywhere is the same information, where this table is included in all:
Directive | Purpose | Storage Space |
---|---|---|
DB | Define Byte | allocates 1 byte |
DW | Define Word | allocates 2 bytes |
DD | Define Doubleword | allocates 4 bytes |
DQ | Define Quadword | allocates 8 bytes |
DT | Define Ten Bytes | allocates 10 bytes |
What is the difference between doing this:
message: db "Hello"
or this:
message: dw "Hello"
What does 1 byte assign to or 2 byte in the case of dw? Layers is something very obvious but I am having a harder time understanding this than opening a socket. What I "understood" at the beginning is that for example, if you created a variable with the db directive you could only store 1 byte, but it doesn't make sense when in the tutorials I see that they store a "Hello world". I know it must be stupid, but if someone has the patience to explain me without scolding me, I would appreciate it. I can't keep doing things without knowing something basic like creating a variable.