Problem 3 Write a short program in 68K assembly language tha

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.

Solution

(#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

Problem #3 Write a short program in 68K assembly language that adds together the word values stored in memory location $000A300 through memory location $0000A30

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site