MIPS “la” pseudo instruction loads a literal's address

Question!

I have two questions here :

1)> What is happening in line 2.The 'la' pseudo instruction refers to load address, instead of the literal '3444' there should have been a label.How can it load the address of the literal

2)> if you replace line 3 with "li $a0 3444" which loads 3444 into the register #a0 instead of the address.The output is still the same.What i want to ask from this is that how could syscall know that in #a0 is the address of the variable or the variable itself.How could the subroutine for printing the integer work correctly whether the argument stored in #a0 is the address or the integer value itself.

.text

      li $v0 1 
 >>2  la $a0 3444   # When i replace 3444 literal with the label  'anint' it makes sense and the output of course is the same
      syscall


.data

 anint: .word 3444

Output:

3444

UPDATE#2: I could'nt post the code in a comment so...

IF la(load address) and li(load immediate) both translate to the same instruction i-e loading the literal into #a0 then explain Line 3 from the code segment below.

      .text


      li #v0 4
>>3   la #a0 msg  #This loads the address of the label 'msg in #a0' not the label itself    
      syscall





      .data

       msg: .asciiz "This is a long string that can't be saved in the register!"


Answers

how could syscall know that in #a0 is the address of the variable or the variable itself

It doesn't. System call 1 in SPIM/MARS always prints the value in $a0.

li $a0,3444 and la $a0,3444 are translated into the same thing (some instruction that loads the value 3334 into register $a0, such as ori $a0, $0, 3334).

By : Michael


Depends on how accurate you want the speedtest to be, the larger the file the more accurate it is. But this can be a big annoyance/data hog for the user.

The big number appears because it's in bytes, to get Mb/s you need to do Your result / 1024^2.



Disable attribute only associates button and input filelds, the thing you want to do here is , event.preventDefault . It will work like disable, but it will depend upon your coding, if you want to show it disabled, you have to add add via jquery



This video can help you solving your question :)
By: admin