Question: ECE 242-Assignment #5 Fall 2017 Write an MC68000 assembly language program that will Add six unsigned word sized values in registers A3 and D2, and

ECE 242-Assignment #5 Fall 2017 Write an MC68000 assembly language program that will Add six unsigned word sized values in registers A3 and D2, and memory locations $500, $502, $530, and $536 storing the sum in the memory longword at address $400 Compute the one's complement of the long word value in register D2, storing the result in the memory longword at address $420 Compute the two's complement of the long word value in register D2, storing the result in the memory longword at address $430 o o o Assume that the data values are in registers A3 and D2, and in memory locations $500 through $540 when the program starts. Do not destroy these original values or any part of them. Each data value of bit 15. Thus each total may require a longword. Be sure to include these carry bits whenever they occur Place the first instruction of your program at memory at address $3000. Use the ORG and END assembler directives wher Include comments relating to the entire program (global" comments) to specify your name, the course number, date, and purpose/structure/approach of the progranm occupies one word, but any addition may generate a carry out e appropriate Save your program, naming it using your name Assemble your program. If there are any syntax errors, correct them and reassemble Start the simulator, load your program, initialize the PC register (to what "value?), and put the following data into registers A3 and D2, and the memory words at locations $500 $502, $530, and $534 Before After A3:1 2 34 5 6 7 8 1 23 4 5 6 7 8 D F 0 9 A C B D F $400 $420 $430 $500:2 8 E A 4 $530: A 5 9 C 0 5 5 8 0 0 0 2 3 7 C 1 1 20 F 6 5 3 4 1 20 F 6 5 3 5 5 5 9 C 0 5 5 8 2 B 8 E A 4 2 B 8 3 9 3 5 43 8 3 9 3 $2000 Program Instructions Program Instructions The above table on right indicates expected results (verify yourself by hand). Run your program and check the longwords at memory locations $400, $420, and $430 with above table. Also, check the A3, D2, and the memory locations to be sure that they are not altered If your results are incorrect, find the error(s) in your program, paying particular attention to each carry out of bit 15. Edit the original file, and return to above step of starting the simulator. If your results are correct, run the program again with different test data of your choice by reinitializing the appropriate registers and memory locations. Do not Submit your program (.X68) file along with results obtained by running your program with the appropriate naming guidelines as a hard copy in the class prior to the submission date ECE 242-Assignment #5 Fall 2017 Write an MC68000 assembly language program that will Add six unsigned word sized values in registers A3 and D2, and memory locations $500, $502, $530, and $536 storing the sum in the memory longword at address $400 Compute the one's complement of the long word value in register D2, storing the result in the memory longword at address $420 Compute the two's complement of the long word value in register D2, storing the result in the memory longword at address $430 o o o Assume that the data values are in registers A3 and D2, and in memory locations $500 through $540 when the program starts. Do not destroy these original values or any part of them. Each data value of bit 15. Thus each total may require a longword. Be sure to include these carry bits whenever they occur Place the first instruction of your program at memory at address $3000. Use the ORG and END assembler directives wher Include comments relating to the entire program (global" comments) to specify your name, the course number, date, and purpose/structure/approach of the progranm occupies one word, but any addition may generate a carry out e appropriate Save your program, naming it using your name Assemble your program. If there are any syntax errors, correct them and reassemble Start the simulator, load your program, initialize the PC register (to what "value?), and put the following data into registers A3 and D2, and the memory words at locations $500 $502, $530, and $534 Before After A3:1 2 34 5 6 7 8 1 23 4 5 6 7 8 D F 0 9 A C B D F $400 $420 $430 $500:2 8 E A 4 $530: A 5 9 C 0 5 5 8 0 0 0 2 3 7 C 1 1 20 F 6 5 3 4 1 20 F 6 5 3 5 5 5 9 C 0 5 5 8 2 B 8 E A 4 2 B 8 3 9 3 5 43 8 3 9 3 $2000 Program Instructions Program Instructions The above table on right indicates expected results (verify yourself by hand). Run your program and check the longwords at memory locations $400, $420, and $430 with above table. Also, check the A3, D2, and the memory locations to be sure that they are not altered If your results are incorrect, find the error(s) in your program, paying particular attention to each carry out of bit 15. Edit the original file, and return to above step of starting the simulator. If your results are correct, run the program again with different test data of your choice by reinitializing the appropriate registers and memory locations. Do not Submit your program (.X68) file along with results obtained by running your program with the appropriate naming guidelines as a hard copy in the class prior to the submission date
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
