Question: I am having trouble with exercise and using the HCS12 Microcontrollers, and Embedded Systems, 1st Edition with the Freescale: CodeWarrior software. It was hard to
I am having trouble with exercise and using the HCS12 Microcontrollers, and Embedded Systems, 1st Edition with the Freescale: CodeWarrior software. It was hard to connect the textbook to the A, C bit, and the H bytes/L bytes to figure out what is the right variable to entered. I need help to solve this problem and due tomorrow?
Number 1, number 2, and number 3 is tied to the instruction function of the ADDA and other instruction like the INC that adds 1 to the memory location specified by the operand. Note that C is not affected even if value FF is incremented to 00. To create variables with character strings as initial values, we use DC.B = Define Constant Byte.' Which ties with the Mynumber but it works between the instruction like the INC H_Byte, Case1 ADDA number2, and BCC Case2. Does this help? If you need, information for the instruction let me know?
Given question: Determine the execution of each instruction to enter the variable into the A, C-bit(Carry flag), H-byte and L-byte section?
| After executing the Instruction of | A | C-bit (carry flag) | H_Byte M[$1006] | L_Byte M[$1007] |
| Before the execution | $CB | 0 | uu | uu |
| After CLRA | ||||
| After STAA H_Byte | ||||
| After ADDA number1 | ||||
| After BCC Case1 | ||||
| After INC H_Byte | ||||
| After Case1 ADDA number2 | ||||
| After BCC Case2 | ||||
| After INC H_Byte | ||||
| After Case2 ADDA number3 | ||||
| After BCC Case3 | ||||
| After INC H_Byte | ||||
| After Case3 ADDA number4 | ||||
| After BCC Case4 | ||||
| After INC H_Byte | ||||
| After STAA L_Byte | ||||
| After Here BRA Here |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
