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

Problem #3 Write a short program in 68K assembly language that adds together the

ID: 2314858 • Letter: P

Question

Problem #3

Write a short program in 68K assembly language that adds together the word values stored in memory location $000A300 through memory location $0000A30F (inclusive) and stores the result in memory location $0000A310. You should submit your listfile of your program. It is not necessary to submit an electronic copy of your program. Just the listfile, properly formatted.

Problem #4

Repeat problem #3 in Z80 assembly language. The problem will be slightly different. The numbers to be added are byte values located in memory starting at 0100H and going to 010FH (inclusive). Store the result in memory location 0110H.

Explanation / Answer

(#3)

To save the word values we have to use MOVE.W

Example is:

MOVE.W (a2),d1 – it stores contents of memory addressed by a2 into data register d1.

for given question, the command is

org $0000A30F

clr.W d0

MOVE.W $100,D1

MOVE.W $100,D2

ADD.W (D1,D2) 0000A310

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