Question: HCS12 Microcontroller: mc9s12dg256 The microcontroller chip used by Dragon12-plus2 board Please use CodeWarrior to write an assembly program to do the following: The starting address

HCS12 Microcontroller: mc9s12dg256

The microcontroller chip used by Dragon12-plus2 board

Please use CodeWarrior to write an assembly program to do the following:

The starting address of your main program is at $4000. Your program must declare two variables called MyReading and MyNumber.

Reserve one byte for MyReading without an initial value, and initialize MyNumber with the initial value of $25.

The program must read from DIP switches and put the reading in MyReading, add the value from MyNumber to this reading (not hard-coded $25, in other words, your program should still work correctly if you change the initial value of MyNumber to a different number, for example, $12), and displays the sum using the LEDs.

Your program must do this continuously forever.

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!