{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lect8_notes - CTermSpring2008 Lecture#8:ExamReview...

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

View Full Document Right Arrow Icon
Foundations of Embedded Systems C Term Spring 2008 Lecture #8:  Exam Review Reading for Today: Review all reading and notes, User's Guide Ch 1,3.1-3.2,9 Reading for Next Class: User's Guide Ch 4,11 Lab #1 (on Web) :                  Report due 9/16/2008 in class HW #2 (on Web): Due NOW! EXAM #1 – 9 am on Friday 1/25/08! The exam will be closed book and notes but you may use the following: >> One  8.5 x 11”   sheet of notes (both sides) & a calculator -- You will need a  calculator for number conversions! -- I will provide ASCII table All cell phones, computers, PDAs, etc are to be OFF and inside a book bag What to study?? >> Lecture notes 1-7,  Reading, HW1 and HW2, Bonus Quizes 1 and 2 Basic C Instructions and Syntax : >> Know layout of C source file (Lecture 2) >> Some Data types (as they are defined in IAR Kickstart)   int      a;      // 16 bit signed (2's comp) integer float b;       // 32 bit in IAR char       c;     // 8 bit unsigned character unsigned int    d; // 16 bit unsigned integer  long int      e; // 32 bit signed integer double f; //  32 bit in IAR by default    int      arr[5];  // array of five 16 bit integers  >>  Array names   point  to the beginning of  a block of memory  where multiple values are  stored successively in memory –>  Convenient way to store and index groups of values
Image of page 1

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

View Full Document Right Arrow Icon
>> Standard C Operators: Math :    +  -  *  /  =  % (modulo) Unary :    ++   --   (also |=  &=  += etc.) Relational and Logical :   >   >=   <   <=   ==   !=   &&  | |   Bitwise :    &  (AND)    | (OR)    ^ (XOR)  >>  (R shift)   <<  (L shift)   ~ (NOT)    Brackets :  {    }  denotes a multi-line block of code (MUST match!)  >> Decisions, looping, etc:   if  (kk > 100)    kk = 0;       else             {                 z = 2*z+kk;               kk++; }            while  (j < 100  ) {                  /* Body of  loop  */               j++;       }  // end while     for (i = strt; i < end_pt; i++) {                  /* Body of loop. Do something  */ }   // end for i      --> The  “Forever Loop”  -- Never exits while  (1) {               /* Body of loop. Do something */ }  // end while (1) C is a  modular programming  language             >> Use  functions  to implement small blocks of code that can be used repeatedly   >> A C  main()  calls a series of smaller functions to complete a task >>  Execution of a C program ALWAYS starts at the beginning of    main() !
Image of page 2
  #define  MAX_SZ  100;   // Determines max value of an array
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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