How many instructions are executed

Assignment Help Assembly Language
Reference no: EM13707993

Question 1: Suppose the subsequent assembly code for parts 1 and 2.

r1 = 99 Loop:

r1 = r1 - 1

if r1 > 0, goto Loop

halt

Part 1: During the execution of the above code, how many instructions are executed?

Part 2: Assuming a standard unicycle machine (CPI = 1) running at 100 KHz, how long will the above code take to complete?

Part 3: Add comments to the subsequent MIPS code and describe in one sentence what it computes. Suppose that $a0 and $a1 are used for the input and both initially contain the integers a and b, respectively. Suppose that $v0 is used for the output.

Will you write the code with less number of instructions? If yes, write the new code. Please minimize the instructions.

add $t0, $zero, $zero

Reference no: EM13707993

Questions Cloud

Section instance variables and encapsulation : What is the public interface of the counter class in section instance variables and encapsulation?
Write verilog testbench for universal shift register module : Write a Verilog testbench for Universal Shift Register module. The testbench will instantiate the USR, redefining its parameter to N = 4, generate a clock signal, and apply a stimulus sequence to the USR inputs.
Write a function that moves the largest item : Write a function that moves the largest item on a given linked list to be the final node on the list
Code a linked list with a node class : Code a linked list with a node class. The node class should keep a key and pointer as private variables. Make the needed getters and setters.
How many instructions are executed : describe in one sentence what it computes. Suppose that $a0 and $a1 are used for the input and both initially contain the integers a and b, respectively. Suppose that $v0 is used for the output.
Make a hangman game using the given parts : Make a Hangman game using the given parts
Write a program that creates an array of 200 random numbers : Write a program that creates an array of 200 random real numbers between 0 and 200.  Using the statistics library, calculate and output the following: mean, median, variance, standard deviation, maximum value, and minimum value.
Write a program that creates an array of 200 random numbers : Write a program that creates an array of 200 random real numbers between 0 and 200.  Using the statistics library, calculate and output the following: mean, median, variance, standard deviation, maximum value, and minimum value.
Difference between cyber-related crimes and cyber crimes : Summarize the difference between cyber-related crimes and cyber crimes. On cyber crimes, define cyber trespass, cyber vandalism and cyber privacy. On cyber-related crimes describe the difference between cyber-assisted and cyber-enhanced crimes.

Reviews

Write a Review

Assembly Language Questions & Answers

  Write a constant declaration named arraysize

Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of the array

  1 complete the following tables using hexadecimalnbsp

1. complete the following tables using hexadecimalnbsp numbers only

  Write a program that displays a single character

Description: Write a program that displays a single character at 100 random screen locations, with a delay factor of 100 milliseconds.Hint: set the console window screen height to 200 at runtime, and watch the scroll bar jump up and down.

  Use a loop with indirect or indexed addressing

Use a loop with indirect or indexed addressing to reverse the elements of the integer array in place. Do not copy the elements to any other array

  Program that requests n as input

Write a program that requests N as input and computes the left-hand and the right-hand sides of the equation, verifies that they are equal, and displays the result.

  Write an arm subroutine which will extract a substring

Write an ARM subroutine which will extract a substring from a string. You will need to use the library routine malloc to allocate memory for the new string. Use the pointers(a1,a2,a3) as stated below for writing ARM PROGRAM

  Create a program that uses ia-32 assembly language

create a program that usesIA-32 assembly language. It converts integers in the array X to its hex string ad save its to array Y in the respictive locations.

  Function which correctly sorts three

Write an x8086 HLA Assembly language program that implements a function which correctly sorts three parameters and returns a boolean value in AL which should be set to true if any swaps were performed to sort the sequence in increasing order.

  Implement a simple 32 bit calculator program

Operand A  and  Operand B  have to be  signed  32 bit integers. So an operand can be a negative number. For example, if you input is (-1 + 3), it should return 2. Operator  must be one of the characters(' + ', ' - ', ' * ', ' / ', ' % ')

  Write a program in assembly language which uses bios

write a program in assembly language which uses bios interrupt int 21 to read current system time and displays it on

  Write a hla assembly program

Write a HLA assembly program that Read 2 hex digits with the bits abccdddd. "a" is for determining if the person female or male(1 male, 0 female) "b" is for determining if the person student or not (1 yes, 0 no) "cc" is for determining which semes..

  Relative addressing mode is a special way

Relative addressing mode is a special way to specify operands. Which instructions are associated with the relative addressing mode? Why do you think it was called "relative" addressing mode? Hint: Use a search engine to find out about "portable code"

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd