Show how to perform 77 x 34 in the hcs12 store the

This preview shows page 25 - 29 out of 38 pages.

Question 5.Question :Show how to perform 77 x 34 in the HCS12. Store the result in a WORD-size variable called var1.Student Answer:LDAA #77 LDAB #34 MUL STD var1Instructor Explanation:LDAA #77LDAB #34MULSTD var1
Points Received:4 of 4Comments:Question 6.Question :Show how to perform 77 / 3 in the HCS12. Store the quotient in a WORD-size variable called result, and the remainder in a WORD-size variable called remainder.
Instructor Explanation:LDD #77LDX #3IDIV STY resultSTD remainderPoints Received:4 of 4Comments:Question 7.Question :How are the following decimal-signed numbers represented in HCS12?I. -12II. +127III. -128
Points Received:5 of 5Comments:These are the automatically computed results of your exam. Grades for essay questions, and comments from your instructor, are in the "Details" section below.Date Taken:5/28/2017Time Spent:46 min , 47 secsPoints Received:25 / 25 (100%)Question Type:# Of Questions:# Correct:Essay5N/AGrade Details - All Questions
Question 1.Question :Write a program to get eight-bit data from PORTA and send it to PORTB and PORTC. Make sure to define each port as input or output.
Points Received:5 of 5Comments:Question 2.Question :Write a program to toggle all bits of PORTA continuously by sending $55 and $AA to it.
Points Received:5 of 5Comments:Question 3.Question :Write a program to toggle PB3, PB7, and PB5 continuously without disturbing the rest of the bits. Assume that there is a delay procedure that you can call.
Explanation:HERE BSET PORTB, %10101000JSR DELAYBCLR PORTB, %10101000JSR DELAYBRA HEREPoints Received:5 of 5Comments:

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture