Question

What is the difference between (a) the .data section and .bss section? (b) the .ascii and...

What is the difference between

(a) the .data section and .bss section? (b) the .ascii and .asciz directives? (c) the .word and the .long directives?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

The.data section- The smallest unit of an object file is a section. A section is a block of data that occupy contiguous space in the memory map. Each section of an object is separate and distinct. It usually contains initialized data. The .data section is normally used to contain tables of data or pre-initialized variables-

.bss section- While bss refers to uninitialized global and static objects. Bss is used by a number of compilers and linkers for the portion of executable containing variables which is statically-allocated, are not explicitly initialized to any value. It refers to the bss section.

.ascii directives- Assembles each string from the list into successive locations. The .ascii directive does not add the string with null characters. You must put double quotation marks (“) around each string.

.acsiiz directives- Assembles each string in the list into successive locations and adds a null character.

.word- .word directive initializes 16-bit integers. Each value is placed in a 16-bit word by itself and aligned on a word boundary.

.long directive- .long directive initialize 32-bit integer. An expression that the assembler evaluates and treats as a 32 –bit signed or unsigned number

Add a comment
Know the answer?
Add Answer to:
What is the difference between (a) the .data section and .bss section? (b) the .ascii and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT