Bonk
Bonk

Reputation: 1949

where does the assembler store constant .data? and how are they used?

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

Answers (1)

blackcompe
blackcompe

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

Related Questions