hw6_A09 - ECE2801 Homework#6 Submitted by ECE Box Date...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE2801 Homework #6 Submitted by:__________________________________ ECE Box #:____________ Date:_______________________________ Question Grade 1 20 2 -- 10 3 -- 20 4 --20 Total:
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ECE2801 Homework #6 More Assembly and Mixed Language Programming (Due Tuesday 10/13/09 At the BEGINNING of class) PLEASE (NEATLY) SHOW ALL WORK ! Comment all code well. Do not make the grader guess what you are doing! All code should be typed. To ensure proper grading and return, attach the cover sheet to the front of your homework References : Class Notes, MSP430 User's Guide Ch. 3, 7 and IAR EW Assembly Reference Guide (all available on class website) 1. (20 pts) Write code segments in MSP430 assembly that implement the indicated functionality. Comment you code well listing any assumptions made. In each part, you may assume that the variables listed have been properly declared in memory already. a) Here assume X and Y are unsigned 8-bit integers and Z is an unsigned 16 bit integer. What operation does this code perform? Z = 0; for (i=0; i < Y; i++) { Z = X+Z; } b) Assume L, M and N represent 16-bit signed integers. Place the smallest in R9. 2. (10 pts) Write a PUBLIC function in MSP430 assembly that implements the Pythagorean theorem A 2 + B 2 = C 2 C A B Make A and B 16-bit integers.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern