Description
For sophomore-level courses in Assembly Language Programming in Computer Science, Embedded Systems Design, Real-Time Analysis, Computer Engineering, or Electrical Engineering curricula. Requires prior knowledge of C, C++, or Java.
Allows instructors to easily introduce embedded systems into an already packed curriculum, and provides a way to cover the procedural style still necessary in upper-division courses.
This book is intended to provide a highly motivating context in which to learn procedural programming languages. The ultimate goal of this text is to lay a foundation that supports the multi-threaded style of programming and high-reliability requirements of embedded software. It presents assembly the way it is most commonly used in practice – to implement small, fast, or special-purpose routines called from a main program written in a high-level language such as C. Students not only learn that assembly still has an important role to play, but their discovery of multi-threaded programming, preemptive and non-preemptive systems, shared resources, and scheduling helps sustain their interest, feeds their curiosity, and strengthens their preparation for subsequent courses on operating systems, real-time systems, networking, and microprocessor-based design.
Table of Contents
- Part 1 Introduction
- WHAT IS AN EMBEDDED SYSTEM?
- WHAT’S UNIQUE ABOUT THE DESIGN GOALS FOR EMBEDDED SOFTWARE?
- What Does “Real-Time” Mean?
- What Does “multithreading” mean?
- HOW POWERFUL ARE EMBEDDED PROCESSORS?
- WHAT PROGRAMMING LANGUAGES ARE USED?
- HOW IS BUILDING AN EMBEDDED APPLICATION DIFFERENT?
- HOW BIG ARE TYPICAL EMBEDDED PROGRAMS?
- PROBLEMS
- Part 2 Data Representation
- FIXED-PRECISION BINARY NUMBERS
- POSITIONAL NUMBER SYSTEMS
- Binary-to-Decimal Conversion
- Decimal-to-Binary Conversion
- Hexadecimal — A Shorthand for Binary
- Fixed Precision, Rollover and Overflow
- BINARY REPRESENTATION OF INTEGERS
- Signed Integers
- Positive and Negative Representations of the Same Magnitude
- Interpreting the Value of a 2’s-Complement Number
- Changing the Sign of Numbers with Integer and Fractional Parts
- Binary Addition and Subtraction
- Range and Overflow
- BINARY REPRESENTATION OF REAL NUMBERS
- Floating-Point Real Numbers
- Fixed-Point Real Numbers
- ASCII REPRESENTATION OF TEXT
- BINARY-CODED DECIMAL (BCD)
- PROBLEMS
- Part 3 Implementing Arithmetic
- 2’s Complement and hardware complexity
- MULTIPLICATION AND DIVISION
- Signed vs. Unsigned Multiplication
- Shifting Instead of Multiplying or Dividing by Powers of 2
- Multiplying by an Arbitrary Constant
- Dividing by an Arbitrary Constant
- ARITHMETIC FOR FIXED-POINT REALS
- Fixed-Point Using a Universal 16.16 Format
- Fixed-Point Using a Universal 32.32 Format
- Multiplication of 32.32 Fixed Point Reals
- Example: Multiplying two 4.4 Fixed Point Reals
- PROBLEMS
- Part 4 Getting the Most Out of C
- Integer Data Types
- Integer Range and the Standard Header File LIMITS.H
- BOOLEAN Data Types
- Mixing Data Types
- Manipulating Bits in Memory
- Testing Bits
- Setting, Clearing, and Inverting Bits
- Extracting Bits
- Inserting Bits
- Manipulating Bits in INPUT/OUTPUT PORTS
- Write-Only I/O Devices
- I/O Devices Differentiated by Reads Versus Writes
- I/O Devices Differentiated by Sequential Access
- I/O Devices Differentiated by Bits in the Written Data
- Accessing Memory-Mapped I/O Devices
- Accessing Data Using a Pointer
- Arrays, Pointers, and the “Address of” Operator
- Structures
- Packed Structures
- Bit Fields
- Variant Access
- Casting the Address of an Object
- Using Unions
- Problems
- Part 5 Programming in Assembly
- Part 1: Computer Organization
- Memory
- Data Alignment
- The Central Processing Unit (CPU)
- Other Registers
- The Fetch-Execute Cycle
- Input/Output (I/O)
- Introduction to the ARM® CortexTM- M3 V7M Architecture
- Internal Organization
- Instruction Pipelining
- Memory Model
- Bit-Banding
- ARM ASSEMBLY LANGUAGE
- Instruction Formats and Operands
- Translating Assembly into Binary
- Problems
- Part 6 Programming in Assembly
- Part 2: Data Manipulation
- LOADING CONSTANTS INTO REGISTERS
- LOADING MEMORY DATA INTO REGISTERS
- STORING DATA FROM REGISTERS TO MEMORY
- CONVERTING SIMPLE C ASSIGNMENT STATEMENTS INTO ARM ASSEMBLY
- MEMORY ADDRESS CALCULATIONS
- MEMORY ADDRESSING EXAMPLES
- Translating C Pointer Expressions to Assembly
- Translating C Subscript Expressions to Assembly
- Translating Structure References to Assembly
- STACK INSTRUCTIONS
- DATA PROCESSING INSTRUCTIONS
- Updating the Flags in the APSR
- Arithmetic Instructions
- Bit Manipulation Instructions
- Shift Instructions
- Bitfield Manipulation Instructions
- Miscellaneous Bit, Byte and Halfword Instructions
- PROBLEMS
- Part 7 Programming in Assembly
- Part 3: Control Structures
- INSTRUCTION SEQUENCING
- IMPLEMENTING DECISIONS
- Conditional Branch Instructions
- If-Then and If-Then-Else Statements
- Compound Conditionals
- The “If-Then” (IT) Instruction
- IMPLEMENTING LOOPS
- Speeding Up Array Access
- IMPLEMENTING FUNCTIONS
- Function Call and Return
- Register Usage
- Parameter Passing
- Return Values
- Temporary Variables
- Preserving Registers
- PROBLEMS
- Part 8 Programming in Assembly
- Part 4: I/O Programming
- THE CORTEX-M3 I/O HARDWARE
- Interrupts and Exceptions
- Thread and Handler Modes
- Entering the Exception Handler
- Returning from the Exception Handler
- Latency Reduction
- Priorities and Nested Exceptions
- SYNCHRONIZATION, TRANSFER RATE, AND LATENCY
- BUFFERS AND QUEUES
- Double Buffering
- ESTIMATING I/O PERFORMANCE CAPABILITY
- Polled Waiting Loops
- Interrupt-Driven I/O
- Direct Memory Access
- Comparison of Methods
- PROBLEMS
- Part 9 Concurrent Software
- FOREGROUND/BACKGROUND SYSTEMS
- Thread State and Serialization
- Managing Latency
- Interrupt Overrun
- Moving Work into the Background
- MULTI-THREADED PROGRAMMING
- Concurrent Execution of Independent Threads
- Context Switching
- Non-preemptive (Cooperative) Multithreading
- Preemptive Multithreading
- SHARED RESOURCES AND CRITICAL SECTIONS
- Disabling Interrupts
- Disabling Task Switching
- Spin Locks
- Mutex Objects
- Semaphores
- PROBLEMS
- Part 10 Scheduling
- THREAD STATES
- PENDING THREADS
- CONTEXT SWITCHING
- ROUND-ROBIN SCHEDULING
- PRIORITY-BASED SCHEDULING
- Resource Starvation
- Priority Inversion
- The Priority Ceiling Protocol
- The Priority Inheritance Protocol
- ASSIGNING PRIORITIES
- Deadline-Driven Scheduling
- Rate-Monotonic Scheduling
- DEADLOCK
- WATCHDOG TIMERS
- PROBLEMS
- Part 11 Memory Management
- OBJECTS IN C
- SCOPE
- Refining Local Scope
- Refining Global Scope
- LIFETIME
- AUTOMATIC ALLOCATION
- Storage Class “Register”
- STATIC ALLOCATION
- THREE PROGRAMS TO DISTINGUISH STATIC FROM AUTOMATIC
- Object Creation
- Object Initialization
- Object Destruction
- DYNAMIC ALLOCATION
- Fragmentation
- Memory Allocation Pools
- AUTOMATIC ALLOCATION WITH VARIABLE SIZE (alloca)
- Variable-Size Arrays
- RECURSIVE FUNCTIONS AND MEMORY ALLOCATION
- PROBLEMS
- Part 12 Shared Memory
- RECOGNIZING SHARED OBJECTS
- REENTRANT FUNCTIONS
- READ-ONLY DATA
- Type Qualifier “const”
- CODING PRACTICES TO AVOID
- Functions That Keep Internal State in Local Static Objects
- Functions That Return the Address of a Local Static Object
- ACCESSING SHARED MEMORY
- The Effect of Processor Architecture
- Read-Only and Write-Only Access
- Type Qualifier “volatile”
- PROBLEMS
- Part 13 System Initialization
- MEMORY LAYOUT
- THE CPU AND VECTOR TABLE
- C RUN-TIME ENVIRONMENT
- Copying Initial Values from Non-Volatile Memory into the Data Region
- Zeroing Uninitialized Statics
- Setting Up a Heap
- SYSTEM TIMER
- OTHER PERIPHERAL DEVICES
Additional information
| Weight | 0.331 kg |
|---|
Only logged in customers who have purchased this product may leave a review.
Related Products









Reviews
There are no reviews yet.