Hi, I'm new to assembly (usually program in C++), and in one of my classes, I need to find out what some assembly code does. Can you guys help me?
ADDI R1, R0, #1
SW R1, 2000(R0)
LOOP: LW R1, 2000(R0)
MULT R2, R1, #4
ADDI R3, R2, #5000
LW R4, 0(R3)
LW R5, 1500,(R0)
ADD R6, R4, R5
LW R1, 2000(R0)
MULT R2, R1, #4
ADDI R7, R2, #0
SW R6, 0(R7)
LW R1, 2000(R0)
ADDI R1, R1, #1
SW R1, 2000(R0)
LW R1, 2000(R0)
ADDI R8, R1, #-101
BNEZ R8, LOOP
thats all the code. I'm supposed to find out the value of the instruction count for this program. But, I can't figure it out.
Thanks for your help.
ADDI R1, R0, #1
SW R1, 2000(R0)
LOOP: LW R1, 2000(R0)
MULT R2, R1, #4
ADDI R3, R2, #5000
LW R4, 0(R3)
LW R5, 1500,(R0)
ADD R6, R4, R5
LW R1, 2000(R0)
MULT R2, R1, #4
ADDI R7, R2, #0
SW R6, 0(R7)
LW R1, 2000(R0)
ADDI R1, R1, #1
SW R1, 2000(R0)
LW R1, 2000(R0)
ADDI R8, R1, #-101
BNEZ R8, LOOP
thats all the code. I'm supposed to find out the value of the instruction count for this program. But, I can't figure it out.
Thanks for your help.