Data Science \ MIPS Instruction Set

Question

  1. Given the following code in a higher-level language. Convert it into MIPS code. Please assume that a is stored in register $s0, b is stored in register $s1, c is stored in register $s2, d is stored in register $s3 and e are stored in register $s4. Starting address of memory location A is stored in register $s7.

    You may only use the following instructions:

    add $s1,$s2,$s3

    sub $s1,$s2,$s3

    addi $s1,$s2,const

    lw $s1,const($s2)

    sw $s1,const($s2)

    sll $s1,$s2,shft

    srl $s1,$s2,shft

    bne $s3, $s4, label

    beq $s3, $s4, label

    j   label

Details
Attachments
Purchase An Answer Below

Have a similar question?