Writing program using arm instructions - sort the numbers

Assignment Help Assembly Language
Reference no: EM131850570

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

Reference no: EM131850570

Questions Cloud

Determining the body mass index : Two events A and B are mutually exclusive if A = {a subject has a flu} and B = {a subject is male}
Review and summarize two scholarly resources : Review and summarize two scholarly resources (not including your text) related to the nursing care model you observed in the practice setting.
Good mental and physical health : Good nutrition is the key to good mental and physical health. Eating a balanced diet is an important part of good health for everyone.
Ways to determine ideal body weight : What are some other ways to determine your ideal body weight? How different are the various methods for determining your ideal body weight?
Writing program using arm instructions - sort the numbers : TSN1101 – Computer Architecture and Organization - Write a program in ARM Assembly Language Program to check 2 Sets of temperature readings
Hazard to the food supply : How we should educate ourselves to be able to distinguish between "local" and "organic"
Discuss the different treatment models : Did they seem connected? How was AA servicing them? Was there cohesiveness in the group? How was the time used?
What is the bond macaulay duration : The bond has a yield-to-maturity of 4% and is currently priced at $103 per 100 of par. What is the bond’s Macaulay duration?
Breakdown of glucose for energy : The coenzyme TPP plays a critical role in the breakdown of glucose for energy. Which water-soluble vitamin is part of the TPP complex?

Reviews

len1850570

2/6/2018 12:53:55 AM

I need solution for Question 1 part b only. Sort the numbers above in ascending order. (Hint: Modify the subroutine in part [a] by checking the flag values after the compare operation)

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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