What is the code-warrior simulation result showing register


Please use either call-by-value or call-by-reference method to transfer your subroutine input/output parameters.

Your code shall be able to compute the above calculations for the following five sets of test data M and N, at least.

M

$5C

$42

$36

$6A

$88

N

$14

$26

$38

$42

$6E

a) Please store the source data M in the memory locations starting from $2000 to $2004 using data directives.

b) Please store the source data N in the memory locations starting from $2010 to $2014 using data directives.

c) Please store the result data Z in the memory locations starting from $2020 to $2029.

Please provide the following answers in your test submission.

a) Did you choose Call-by-value or Call-by-reference method for this task?

b) What shall be the correct answer to this test program?

M

$5C

$42

$36

$6A

$88

N

$14

$26

$38

$42

$6E

Z

 

 

 

 

 

c) What is your assembly program?

d) What is the code-Warrior simulation result (showing register and memory contents from address $ 2000 to $ 202F) before subroutine calculations?

e) What is the Code-Warrior simulation result (showing register and memory contents from address $2000 to $202F) after subroutine calculations?

PULA
PULY
PULB

Part C: Design and Implementation of Assembly Language Programs

This section asks you to design and implement assembly language programs that complete specific tasks.

Please design your program efficiently and implement your code in Code Warrior to test it.

For this part, please include appropriate comments in your assembly program.

Task 1: Use loop and stack operations to move data from one memory location to another memory location while reversing the order of data. For this task, please design a program that is able to copy data from one memory location to another memory location and reverse the order of data.

Test your code using the following test case:

Move six bytes of data from memory location $2100 to memory location $2120.

a) The following six hexadecimal data: $61, $A8, $43, $76, $B6 and $2F shall be stored in memory locations starting from $2100 before you test your program.

b) After your program is executed, the following six hexadecimal data $2F, $B6, $76, $43, $A8 and $61 shall be stored in memory locations starting from $2120. Please notice this list of data is in reverse order comparing to the original data set.

c) You must use two loops with stack operations in the loop (one loop for pushing data onto stack; and another loop for pulling data off the stack) in your program to complete this data transfer.

Please provide the following answers in your test submission.

a) What is your assembly program for this task?

b) What is the Code-Warrior simulation result (showing register and memory contents from address $2100 to $213F) before moving the data?

c) What is the Code-Warrior simulation result (showing register and memory contents from address $2100 to $213F) after moving the data?

Task 2: Use subroutine to complete certain arithmetic operations

For this task, design an assembly program with a subroutine that is able to complete the following calculation:

Z = (M + N x 3)/2 - 4 ;

Where a) Z is a 16-bit unsigned number to be stored into memory locations starting from M [$2020];
b) M is an 8-bit unsigned number to be retrieved from memory locations starting from M [$2000];
c) N is an 8-bit unsigned number to be retrieved from memory locations starting from M [$20 I 0];

Request for Solution File

Ask an Expert for Answer!!
Other Engineering: What is the code-warrior simulation result showing register
Reference No:- TGS01411596

Expected delivery within 24 Hours