If db
stands for Define Byte and can hold 8 bits (1 byte), why can we use a 6 bytes string with db
? I know that one character is only 1 byte, and db
holds 1 byte.
section .data
text db "Yellow"
db
is playing like a char
in more high level languages (compared to asm), which we can just increase the buffer, but assembly does it automatically?
#include <stdio.h>
int main(void)
{
char c = 'Y';
char string[7] = "Yellow";
return 42;
}