Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Assembly Expert

Programming Exercise

1. Perform the following operations by writing programs using ARM instructions.

34,25,15,23,45,64,56,23

a. Sort the numbers above in descending order using bubble sort.

b. Sort the numbers above in ascending order. (Hint: Modify the subroutine in part [a] by checking the flag values after the compare operation)

The following questions are to be included in the report only.

2. Write a program in ARM Assembly Language Program to check 2 Sets of temperature readings.

Input: 2 sets of temperature readings (1 set has 6 readings, both sets are located at 2 different contiguous sets of memory addresses)
Output:
- Store ‘AAH' if all the temperature reading of the 1st set is higher that the corresponding readings of the 2nd set.
- Store ‘BBH' if any one of the readings in the 1st set is lower than its corresponding reading of the 2nd set.
- Store ‘CCH' if any one of the readings in the 1st set is equal to its corresponding reading of the 2nd set.

3. Write a program to perform Binary to BCD conversion in ARM Assembly Language.

Input: 8-bit binary number.

Output: BCD equivalent. Store in consecutive memory addresses.

Process:
- Step 1: If the number is less than 100, go to Step 2, else subtract 100 repeatedly (divide by 100) repeatedly until remainder is less then 100. Quotient is the most significant BCD digit, BCD3.
- Step 2: If the number is less than 10, go to Step 3, else subtract 10 repeatedly (divide by 10) repeatedly until remainder is less than 10. Quotient is BCD2.
- Step 3: The remainder from Step 2 is BCD3.

4. Assume that a processor employs a memory address register (MAR), a memory buffer register (MBR), a program counter (PC), and an instruction register (IR). List the symbolic sequence of micro-operations for the fetch cycle.

5. Your ALU can add its two input registers, and it can logically complement the bits of either input register, as well as increment the value of either input registers, but it cannot subtract. Numbers are to be stored in two's complement representation. List the micro- operations your control unit must perform to cause a subtraction. (Consider the instruction SUB R1, X, which subtracts the contents of location X from the contents of register R1, and places the result in R1.)

6. In caches, direct mapping is one of the mapping functions used. What is the advantage and disadvantage of this technique?

7. An I/O module is used to link external devices to the computer. What are the FIVE major requirements for an I/O module?

8. Suppose an 8-bit data word stored in memory is 01000011. Using the Hamming algorithm, determine what check bits would be stored in memory with the data word. Show how you got your answer.

Attachment:- programming exercise.rar

Assembly, Programming

  • Category:- Assembly
  • Reference No.:- M92678928
  • Price:- $40

Guranteed 36 Hours Delivery, In Price:- $40

Have any Question?


Related Questions in Assembly

Really need to find a correct answer to this questionwrite

Really need to find a correct answer to this question: Write a MIPS assembly program that can search for a number that is entered by a user in an array with 20 integer number. Make sure it also prints the index of the ar ...

Question a sequence string of one-byte ascii characters is

Question : A sequence (string) of one-byte ASCII characters is stored at memory location $600 onward. A second sequence of equal length is stored at memory location $700 onward. Each sequence ends with the character $0 ( ...

Task 1using masm sdk write an assembly language program

TASK 1 Using MASM SDK, write an assembly language program which converts an integer inputted via the console to binary. Your program should be well commented and well formatted. TASK 2 Using MASM SDK, write an assembly l ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As