Reputation: 23
Does processor allocates 1 byte for each character of the String? If yes then is allocating 1 byte enough for character as ASCII values vary from 0-255?
Upvotes: 0
Views: 152
Reputation: 137398
The processor is not allocating anything. The directive
strvar:
db "hello"
Tells the assembler to emit the bytes "hello" at a location in your program identified by the label strvar
.
A byte is usually 8 bits, which can store the unsigned values 0 to (28 - 1) = 255.
Upvotes: 3