Assembly code to initialize an array of 50 numbers in memory at run time

Lab Project Details
 Implementing the knowledge of HCS12 Assembly and microcontroller.
 Learning the use of different hardware capabilities of the Dragon EVB.
Project Rules
 The lab project counts for 35% of lab grade.
 Use of only Assembly Language is allowed.
 This project is to be done in a group of two students.
 Performance of groups in the project will be only their own, students are not allowed to copy the code and strategies used by other groups.
 Students can ask the TA for help but the help provided will be very limited, as this project is the final evaluation for this lab.
 Students can download the Code Warrior on their personal computers and work at home or off campus. They can test their codes on the Dragon EVB during the regular lab sessions.
 If any students want to use the lab facility other than lab sessions, he/she can contact the TA during office hours.
 Projects will be graded during the last lab session.
 5 % credit is for a project report which will also be collected during the last lab session.
 Codes should be properly commented.
 Remember Google is your best friend and Book is the best resource.

Part 1 (80% marks)
Your task is to write assembly code to initialize an array of 50 numbers in memory. Each number of the array should be a multiple of the first number ‘x’ (where 1 <= x <= 10). For example if x=5, the array should be {5, 10, 15, 20, 25, … , 245, 250}. Once the array is initialized, the next task is to search for a number ‘y’ in the array using ‘Binary Search’ algorithm. The way Binary Search algorithm works is following:
 Input: Sorted array of numbers; Number to be searched called ‘y’
1. Calculate the midpoint index of the array by taking mean of the index of the first and the last array elements. The element at mid-point index is called ‘m’.
2. If the element at the midpoint index is the desired element, the search stops by returning the index of the desired element.
3. If m is greater than y ignore the part of the array after m (including m) for further search. If m is less than y ignore the part of the array before m (including m) for further search.
4. In any case, repeat steps 1, 2, and 3 on the remaining elements of the array. Continue till an element is found or the array indexes to be searched are exhausted.
Figure 1 shows flow-chart for Binary Search algorithm.
Figure 1. Flow Chart for Binary Search
Your task is to implement binary search algorithm in assembly code for any random number ‘y’. While the algorithm is working, each midpoint number should be displayed on the Seven Segment Display units available on the Dragon EVB. Moreover, there should be a constant delay of 2 seconds between each update on the Seven Segment Displays. If the number being searched is present in the array the algorithm would finally stop with the number being displayed on the seven segment display. In case, the number is not in the array, your code should finally show all zeros on seven segment display (a special code indicating that the number being searched is not in the array). Your code should be generic and work for any value of y and x (within the allowed range of 1 to 10).

Part 2 (20% marks)
In part 1, the numbers x and y will be initialized statically. In part 2, your task is to modify the code from part 1 such that the numbers x and y are initialized at run time. You will have to use DIP switches of Port H to initialize each of these numbers. You can use one of the four available push buttons (SW2-SW5) to determine when your code should read each number configured on dip switches.

Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.

Use the order calculator below and get ordering with now! Contact our live support team for any assistance or inquiry.

Type of paper Academic level Subject area
Number of pages Paper urgency Cost per page:

Purchase Guarantee

Why ORDER at

  • Educated and experienced writers.
  • Quality, Professionalism and experience.
  • Original Content writing.
  • Best customer support.
  • Affordable Pricing on orders.
  • Thorough research.
  • Ontime delivery of finished work.
  • 100% plagiarism free papers.

Reasonable Prices

  • To get the best quality papers isn’t cheap so don’t trust extremely low prices.
  • We can’t claim that we have unreasonably low prices because low prices equal to low quality.
  • Our prices are good and they balance with the quality of our work.
  • We have a Moneyback guarantee.

Original and Quality work

  • Our writers are professionals and they write your paper from scratch and we don’t encourage copy pasting.
  • All writers are assessed and they have to pass our standards for them to work with us.
  • Plagiarism is an offence and it’s never tolerated in our company.

Native Writers plus Researchers

  • Our writers are qualified and excellent and will guarantee the best performance in your order.
  • Our team has writers who have master's and PhD qualifications who can handle any assignment
  • We have the best standards in essay writing.

We have been in business for over 7 syears

  • We have always served our customers from all over the world and they have continued to order with us.
  • We value our customers since they have trusted us to do their assignments.
  • We are competent in our writing gained from experience over the years
  • Our company has 24/7 Live Support.

You will get

  •  Custom Admission Essay written by competent professional English writers.
  •  Free revisions according to our revision policy if required
  •  Paper format:  275 words per page, Times New Roman font and size 12, doublespaced text and1 inch margin
  •  On time delivery and direct order download
  •  Privacy guaranteed

We can help you:

  •  acquire a comprehensive professional presentation.
  •  get a unique and remarkable content as per your instructions.
  •  Get an additional portion that can be included to your existing presentation;
  •  turn your work in to an eyecatching presentation with well communicated ideas.
  •  improve your presentation to acquire the best professional standards.