Homework Solution: Use the following program for this question. Assume the .data section starts at 0 times 10010000 and the .text sta…

    Use the following program for this question. Assume the .data section starts at 0x10010000 and the .text starts at 0x00400010, Notice for this problem the starting PC will NOT be the default value so if you just type the code into the assemble, your answers may not be correct. 1. data num: .word 7 globl .text main: main lui $t0, 0x1001 top: beg $s0, $0, end jal func add $s0, $s0, $t0 addi $s0, Şs0, -1 top bne $S0, $0, top end: func: sll $v0, $t1, 4 Şra r a. There are five labels in the code. What is the value of each label? b. What is the addressing mode for each instruction? There are 10 unique instructions c. Encode the program and give the machine code in hex. Be careful with the branch and jump instructions
    Use the following program for this question. Assume the .data section starts at 0 times 10010000 and the .text starts at 0 times 00400010, Notice for this problem the starting PC will NOT be the default value so if you just type the code into the assemble, your answers may not be correct. .data num: .word 7 .globl main .text main: lui $t0, 0 times 1001 top: lw $t1, 0 ($t0) beg $s0, $0, end jal func add $s0, $s0, $t0 addi $s0, $0, -1 j top bne $S0, $0, top end: func: sll $v0, $t1, 4 jr $ra a. There are five labels in the code. What is the value of each label? b. What is the addressing mode for each instruction? There are 10 unique instructions. c. Encode the program and give the machine code in hex. Be careful with the branch and jump instructions.

    Expert Answer

     
    a. The five lables of the code are following 1. Data 7

    Use the subjoined program coercion this investigation. Assume the .grounds minority starts at 0x10010000 and the .passage starts at 0x00400010, Referableice coercion this gist the starting PC accomplish NOT be the absence prize so if you impartial kind the edict into the collect, your replys may referable be reform. 1. grounds num: .promise 7 globl .passage deep: deep lui $t0, 0x1001 head: crave $s0, $0, purpose jal func infer $s0, $s0, $t0 inferi $s0, Şs0, -1 head bne $S0, $0, head purpose: func: sll $v0, $t1, 4 Şra r a. There are five marks in the edict. What is the prize of each mark? b. What is the inferressing legislation coercion each education? There are 10 uncommon educations c. Enedict the program and grant the record edict in hex. Be attentive with the scion and leap educations

    Use the subjoined program coercion this investigation. Assume the .grounds minority starts at 0 times 10010000 and the .passage starts at 0 times 00400010, Referableice coercion this gist the starting PC accomplish NOT be the absence prize so if you impartial kind the edict into the collect, your replys may referable be reform. .grounds num: .promise 7 .globl deep .passage deep: lui $t0, 0 times 1001 head: lw $t1, 0 ($t0) crave $s0, $0, purpose jal func infer $s0, $s0, $t0 inferi $s0, $0, -1 j head bne $S0, $0, head purpose: func: sll $v0, $t1, 4 jr $ra a. There are five marks in the edict. What is the prize of each mark? b. What is the inferressing legislation coercion each education? There are 10 uncommon educations. c. Enedict the program and grant the record edict in hex. Be attentive with the scion and leap educations.

    Expert Reply

     

    a. The five lables of the edict are subjoined

    1. Grounds 7

    2. Global Deep

    3. Deep

    4. Head

    5. Function

    b. The three basic legislations of inferressing are −

    1. Register inferressing

    2. Immediate inferressing

    3. Memory inferressing

    1. PDP-8

    2. PDP-10

    3. PDP 11

    4. VAX Educations

    5. Pentium Education Coercionmat

    6. ARM Education Coercionmats

    7. Thumb Education Set