0

It is understood that the labels that come in the .text section of an assembly program are representative of the address of the following instruction.

Is it the same idea with the symbols we see in the .data section ? i.e. "The label is representative of the base address of whatever follows".

Does this apply anywhere in the program ?

I'm a NOOB in assembly, learning MIPS as a part of coursework.

1 Answer 1

1

You basically stated the answer yourself, a label is representative of a location in your assembly code. The section is irrelevant.

(You misused the term "base address" though)

2
  • Thank you ! What should have been the correct term ? I thought doing str: .asciiz "Hello" and then doing la $t0, str would load the address of 'H' in t0, Hence Base Address.
    – kesari
    Commented Aug 26, 2015 at 17:05
  • You have the principle right, it's just that the term Base Address designs the reference address from which you calculate relative addresses once loaded in memory (VA = BaseAddress + RVA) Commented Aug 28, 2015 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.