logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Write a program in 68K assembly code that satisfies the following specifications:

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Q3. Pattern Finding and Cumulative program. (5 points)

Write a program in 68K assembly code that satisfies the following specifications:

1. Your program should start at the memory location $1000 (hint: use the ORG directive).

2. Take a one byte hexadecimal value from user input and save the value at address $A000 (hint: you can consider this input a target value). You should not hardcode the inputs. You may ignore sanity check on corner cases, but assume user inputs are always in an expected format.

3. Read each byte data stored in memory between the addresses $6000 and $8000 and compare it to the (byte) data at address $A000 (hint: you can consider the memory between $6000 and $8000 an array).

4. Please define a LONGWORD variable called address Addr1. In the specified memory range, if the data at address $A000 is found, the longword address of the data in memory is saved into variable Addr1. If it fails to find the data within the specified memory range ($6000 and $8000), then put Addr1 = $6000, which is similar to the idea of "error code" or "invalid index" in your C++ code.

5. Please define a WORD variable called address Addsum. Add a series of bytes stored in the 512 consecutive memory locations beginning at address Addr1, no matter you find the target data or not. Save the sum value into Addsum.

6. There is a chance that the sum might exceed $FFFF, (exceeding the range of word value), so you will also need to store the carry bit if an overflow occurs. Store the carry bit as a BYTE variable called CarryBit.

7. Print the Addr1, Addsum and CarryBit in the output window.

 

(5/5)
Attachments:

Expert's Answer

982 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

982 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

690 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

514 Answers

Hire Me
expert
Husnain SaeedComputer science

689 Answers

Hire Me
expert
Atharva PatilComputer science

962 Answers

Hire Me

Get Free Quote!

309 Experts Online