Reputation: 1949
what where does the assembler store somedata
in the following code? relative addressing? relative to what?
.data
somedata: .word 0xDEADBEEF
.code
lw $s0 somedata
Upvotes: 0
Views: 131
Reputation: 3190
somedata
is stored in the data segment, whose start address may vary with file format. Relative addressing is the addressing mode for I-type (branch) instructions. Relative addressing and data declarations aren't related in any way.
Upvotes: 2