Question: hi, need help in writing Assembly language. Please hrlp me. 2 INTRODUCTION You are expected to work in groups of two and demonstrate their achievements

hi, need help in writing Assembly language. Please hrlp me.

2 INTRODUCTION

You are expected to work in groups of two and demonstrate their achievements to the Laboratory Teacher in week 3. You will be expected to be able to utilise the Atmel Studio 7.0 simulator / debugger to demonstrate and describe the operations occurring during the execution of the developed program. Marks will be awarded for developing a fully functional program. Furthermore, the knowledge gained during this laboratory will be examined with a series of specific questions in Laboratory Test 1 (Week 3). The aim of this laboratory is to create a short search algorithm that determines the smallest value in a list of 8-bit positive integers (values of 0 255). The tasks require your group to write the search algorithm in ATmega32 assembler and debug it via the integrated simulator. Note that no additional hardware is required for this laboratory session. For reference, the search algorithm to be initially developed can be described with pseudo-code as: for i = 0 to 63 do

{ if tble[i] < smallest_so_far then

{ smallest_so_far := tble[i]; Smallest_locn := i; }

} EEET2256 Introduction to Embedded Systems Introduction to Assembler using Atmel Studio 7.0

3 DESIGN AND IMPLEMENTATION

A simple template project has been created which contains the table to be analysed. The sample project can be found on the Canvas website under Laboratory 1. It is suggested that the template is downloaded to your local hard drive and then project modified from there. Open the project and ensure that the assembler code is displayed. The required tasks are as follows:

a) Once the template has been opened begin to create your program. The outer loop of the pseudocode algorithm should be implemented first. At this stage you will need to demonstrate that the code can transfer sequential bytes (entries) from the table in memory and place them in a register. Once confirmed operational, demonstrate this to your laboratory teacher and proceed to the next step.

b) An algorithm can now be created to find the smallest entry in the table. You will need to examine how to perform conditional branching (see the ATmega32A Instruction Set summary document available on the Canvas website). Additional details of the branch instructions are provided further within this document (Section 4).

c) Extra credit: Conceptually extend the code developed in Section 3b to determine the location and value of the largest number in the table. To do so, what additional operations need to be performed and how does the code need to be changed? For an additional 2% credit (maximum grade of 102%) determine how to maintain the extra two variables you would need and describe the algorithm.

d) Extra credit: For an additional 10% credit (maximum grade of 112%) implement (in code) the additional changes discussed in Section 3c. and demonstrate it to your teacher. 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!