Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program in 68000 assembly (no need to use the execution block) that will

ID: 659364 • 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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote