Question: 3. Design and Implementation of an Assembly Program Based on what you have learned so far, design and implement a program that completes the following

 3. Design and Implementation of an Assembly Program Based on what

3. Design and Implementation of an Assembly Program Based on what you have learned so far, design and implement a program that completes the following task Suppose you went to a book store and you bought 4 EE books with the prices of 102, 93, 87 and 95 respectively; 3 CpE books with the prices of 95, 92 and 89 respectively; 2 math books with the prices of 88 and 96 respectively. Please design a program to calculate the average price of all the books, i.e. (102+93+87+95+95+92+89+88+96 (4+3+2). Please design your program such that you will use all of the following addressing modes in your code: inherent addressing mode; immediate addressing mode (ex.: for the book prices); index addressing mode (ex.: for saving the book prices into memory) and extended addressing mode (ex.: for storing the results). Notice the numbers used in the above equation are decimal mumbers. Please also note that the addition of multiple 8-bit numbers may result in a large mumber out of the range of an 8-bit mumber. In this case, 16-bit addition instruction can be used, for example, ABX (or ABY) can be used to add an 8-bit number from Accumulator A to Regtster X (or add an 8-bit mumber from Accumulator B to Register Y a Please store your code in memory locations starting from $2000. b) Please store your EE data (the EE book prices) in memory locations starting from $3000 with the first byte accounting for the number of EE books, and other bytes accounting for the actual EE book prices; as shown below: Memory 003000 66 5D 57 SF uu uu uu leiw uuu 003008 uu uu uu uu uu uu uu ua uauuuau Please do the same thing Jor the CpE data in memory locations starting from 53010, c) After you finish the calculations, please store the results (average book price) in memory locations starting from $3030 Your program is: e

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!