Stanford / Engineering

How a Code Snippet is Translated into Assembly Instructions

By Jerry Cain | Computer Science III: Programming Paradigms Lecture 9 of 27

GRADED BY 10 USERS grade it
get flash player

Lecture Description

How a Code Snippet is Translated into Assembly Instructions, Store, Load, and ALU Operations, Assembly Optimizations for 4-Byte Addresses, Context-Insensitive Code Translation, Overriding the 4-Byte Default in Assembly Instructions, Translating a For Loop into Assembly, Using Branch Instructions and the PC Register, Pointer/Array Arithmetic in Assembly, Unconditional Branch Instructions (Jumps), How a 4-Byte Assembly Instruction is Encoded in Memory

Course Description

Topics include: Advanced memory management features of C and C++; the differences between imperative and object-oriented paradigms; the functional paradigm (using LISP) and concurrent programming (using C and C++); brief survey of other modern languages such as Python, Objective C, and C#.

Prerequisites: Programming and problem solving at the Programming Abstractions level. Prospective students should know a reasonable amount of C++. You should be comfortable with arrays, pointers, references, classes, methods, dynamic memory allocation, recursion, linked lists, binary search trees, hashing, iterators, and function pointers. You should be able to write well-decomposed, easy-to-understand code, and understand the value that comes with good variable names, short function and method implementations, and thoughtful, articulate comments.

Related Resources

Transcript

Course Index

  1. Introduction to Programming Paradigms Course
  2. Data Types - Interpretations
  3. Converting Between Types of Different Sizes and Bit Representations Using Pointers
  4. Creating a Generic Swap Function for Data Types of Arbitrary Size
  5. Generic Lsearch - Prototype
  6. Integer Stack Implementation - Constructor and Destructor
  7. Problems with Ownership of Memory
  8. Heap Management - How Information about Allocations are Stored in the Heap
  9. How a Code Snippet is Translated into Assembly Instructions
  10. More Detail about Activation Records - Layout of Memory During a Function Call
  11. Moving from C Code Generation to C++ Code Generation: Basic Swap Example
  12. Preprocessing Commands
  13. Review of Compilation Process of a Simple Program
  14. Sequential Programming vs. Concurrent Programming
  15. Transitioning from Sequential Programming to Concurrent Programming in the Ticket Sale Example
  16. Semaphores
  17. Review of the Dining Philosopher Problem
  18. Ice Cream Store Problem
  19. Introduction to the Functional Paradigm (Scheme)
  20. Car-Cdr Recursion Problem
  21. Introduction to the Kawa Development Environment: Evaluation of Expressions
  22. Writing a Recursive Power Set Function in Scheme
  23. Scheme Memory Model
  24. Overarching Features of Python
  25. Python Object Model
  26. XML Processing and Python
  27. Introduction to Haskell
Leave Feedback