Store word assembly mips 32 bit -


I suspect the word store in the assembly MIPS 32 bit:

assuming that my Pass data is Part:

  .data vector: .word 2,3,4,5,6 ......   

when I do

  .text sw $ t0, vector ($ t1)   

Believing that starting with vector address 10 (decimal base example) in memory it happens. The label 'vector' has been replaced by 10?

Thanks to your time

Edit:

  li $ v0, 1st la $ a0, vector syscall   

I did this and I started to know. I do not understand anything: if the immediate field is 16-bit and the label has been replaced with the starting address of 'vector', how do I address all the memory with 16 bit?

You need to manually calculate the address. MIPS does not have load effective address instructions (LEAs) such as X86

  la $ T1, vector self $ t0, 0 ($ t1)   

If the absolute address value fits within 16 bits, you can use the full address

  sw $ t0, vector ($ zero)   

If it is known in $ t1 for data segment then use it

  sw $ t0, vector ($ t1)   

I understand the sentence- Do not know the composition, so you may need it You can specify to receive addresses

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -