Use Mars Simulator Write Execute Mips Assembly Code Using Pseudoinstrucions Add Arithmetic Q37062427

Use the MARS simulator to write and execute MIPS assembly codewith using only :(NO pseudoinstrucions)

#   add   –   arithmetic add
#   sub   –   arithmeticsubtract
#   and   –   bitwise and
#   or   –   bitwise or
#   slt   –   set on less than
#   nor   –   bitwise nor
#   addi   –   add with immediatedata

#Example Exercise:  
#   Initial Variable Values: A = 50; B = 100;C = 150;
#   Assignment statement to perform: C = A + B -C;

addi $16, $0, 50   #A = 50;
addi $17, $0, 100   #B = 100;
addi $18, $0, 150   #C = 150;
add $13, $16, $17   #Temp = A + B;
sub $18, $13, $18   #C = A +

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.