Write a program in 68000 assembly (no need to use the execution block) that will
ID: 659369 • Letter: W
Question
Write a program in 68000 assembly (no need to use the execution block) that will do the following:
Find the position of a given number in a series of Longwords. You may assume that D4 holds the number you are looking for, A0 is the address of the first Longword, and D5 holds the maximum amount of numbers to read. The answer should be stored in D0. If the number was not found, store -1 instead.
e.g. If in memory you had numbers x, y, z (in that order) and you were looking for y, you should store the number 1 in D0
Explanation / Answer
ADD D0, -1
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.