Question: Write a fully-commented program for the HC12 board, including appropriate directives and labels for memory operands and constants, called Arith.asm . The program should do

Write a fully-commented program for the HC12 board, including appropriate directives and labels for memory operands and constants, called Arith.asm. The program should do the following:

The program should start execution at address $1000.

Use directives to create an array of five unsigned decimal byte values: 50, 188, 63, 211, and 3 stored in contiguous memory at locations $2000$2004.

Calculate the unsigned Sum of the five numbers and store this word at memory location $2010~$2011.

Calculate the unsigned Average of the 5 numbers and store this byte in memory after the sum.

Subtract the Average from the Sum and store the unsigned Difference (word) in memory after the Average.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!