lecture18 - FoundationsofEmbeddedSystems ATermFall2008

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

View Full Document Right Arrow Icon
Foundations of Embedded Systems A Term Fall 2008 Lecture #18:  Under the Hood--Introduction to MSP430 Assembly Language Reading for Today: User's Guide Ch 3.3 Reading for Next Class: User's Guide Ch 3.4 Lab #3 (on web) :                   Report due 10/7/2008 HW #5 (on web):                  Due  10/9/2008 The MSP430 doesn't actually speak C. ...    >> C is a higher level language – Useful to human programmers to efficiently capture           logic flow, arithmetic operations, etc. Program development steps in a typical development environment. ... Edit, Compile, Link, Load, Execute  Execute what?  What is actually stored in “Code Memory” Consider this simple C program void main()    int  a,b,c;       WDTCTL = WDTPW + WDTHOLD;     // Stop watchdog timer        a = 1002;    b = 47;    c = a+b;     Let's look at it in IAR Kickstart
Background image of page 1

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

View Full DocumentRight Arrow Icon
Microprocessors only understand their   MACHINE CODE.      >>  Machine codes  are binary codes that specify operations and operands OPCODE  source code  data size codes  destination code  Whether you start in C, C++ or ASM, the executable file can only contain machine  instructions    >> In MSP 430 Machine Instructions can be 2-6 bytes long    In C we can write a = a + b;            (Or,  a += b; ) A rough machine code translation – of the addition only --  might be >>  0101011100001000   =   ADD the word in R7 to the word in R8 and       leave the result in R8
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/27/2008 for the course ECE 2801 taught by Professor Jarvis during the Fall '08 term at WPI.

Page1 / 8

lecture18 - FoundationsofEmbeddedSystems ATermFall2008

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online