📚

Guide to ARM Assembly on Raspberry Pi

May 9, 2025

Introduction to Computer Organization: ARM Assembly Language Using the Raspberry Pi

General Overview

This document provides a comprehensive guide to computer organization, focusing on ARM assembly language, particularly using the Raspberry Pi platform. Authored by Robert G. Plantz, it covers a wide range of topics from basic concepts to advanced programming exercises.

Contents Overview

Front Matter

  • Colophon: Information about the book's publication.
  • Acknowledgements: Credits to contributors and supporters.
  • Preface: Introduction to the book's purpose and content.

Chapter 1: Introduction

  • Efficient Use of This Book: Guidelines on how to effectively navigate and utilize the book.
  • Computer Subsystems: Overview of different computer subsystems.
  • How Subsystems Interact: Explanation of interactions between subsystems.
  • Setting Up Your Raspberry Pi: Instructions for preparing the Raspberry Pi for development.

Chapter 2: Data Storage Formats

  • Bits and Groups of Bits: Introduction to data representation in bits.
  • Mathematical Equivalence of Binary and Decimal: Relationship between binary and decimal systems.
  • Unsigned Decimal to Binary Conversion: Conversion techniques.
  • Memory: Understanding memory storage.
  • Using C Programs to Explore Data Formats: Practical exploration of data formats using C.
  • Examining Memory With a Debugger: Debugging memory.
  • Storing Characters: ASCII and character storage.
  • Low-level Character Handling: Advanced handling of characters.
  • Accessing the GPIO in C: Programming GPIO ports.

Chapter 3: Computer Arithmetic

  • Addition and Subtraction: Basic arithmetic operations.
  • Arithmetic Errors with Unsigned Integers: Common errors and how to handle them.
  • Signed Integers and Overflow: Handling overflow in signed integers.

Chapter 4: Basic Data Types

  • C/C++ Basic Data Types: Understanding data types in programming.
  • Hexadecimal to Integer Conversion: Conversion methods.
  • Bitwise Logical Operations: Logical operations in C.

Chapter 5: Boolean Algebra

  • Boolean Algebra Operations: Basic operations and properties.
  • Canonical Forms: Standard forms of Boolean expressions.
  • Boolean Function Minimization: Techniques to simplify Boolean functions.

Chapter 6: Logic Gates

  • Crash Course in Electronics: Basic principles of electronics.
  • CMOS Transistors: Understanding transistors.
  • NAND and NOR Gates: Functionality of basic logic gates.

Chapter 7: Logic Circuits

  • Combinational Logic Circuits: Design and analysis of combinational circuits.
  • Programmable Logic Devices: Using programmable devices.

Chapter 8: Central Processing Unit

  • Overview: General functions of a CPU.
  • CPU Registers and Memory Interaction: How the CPU uses registers and interacts with memory.
  • Program Execution in the CPU: Execution process.
  • Using gdb to View Registers: Debugging with gdb.

Chapter 9: Programming in Assembly Language

  • Program Organization: Structuring assembly programs.
  • Creating and Linking Programs: Assembling and linking processes.

Chapter 10: Structure of the main Function

  • Passing Arguments in Registers: Argument passing mechanisms.
  • Stack Management: Handling the stack in functions.
  • Local Variables on the Stack: Storing variables locally.

Chapter 11: Instruction Details

  • Addressing Modes: Various addressing techniques.
  • Branching and Machine Code: Implementing branching in machine code.

Chapter 12: Program Flow Constructs

  • Repetition and Binary Decisions: Implementing loops and conditional statements.

Chapter 13: Writing Your Own Functions

  • Passing and Accessing Arguments: Handling function arguments.

Chapter 14: Bit Operations; Multiplication and Division

  • Logical Instructions and Shifting Bits: Bit operations in assembly language.

Chapter 15: Data Structures

  • Arrays and structs: Working with data structures in C.

Chapter 16: Fractional Numbers

  • Fractional Values in Binary: Representing fractions in binary.
  • Floating Point Format: Understanding floating-point representation.

Chapter 17: Interrupts and Exceptions

  • CPU Features and Interrupts: Handling exceptions and interrupts.

Chapter 18: Input/Output

  • I/O Interfacing and Ports: Techniques for managing input and output operations.

Chapter 19: General Purpose Input/Output (GPIO) Device

  • GPIO Memory and Connections: Using GPIOs for hardware interfacing.

Back Matter

  • GNU make: Building programs using make.
  • Hints and Solutions: Solutions to selected exercises.
  • Bibliography: References and further reading.

Index

A comprehensive index is provided covering terms and topics from A to Z with references to sections, paragraphs, items, and subsections for detailed navigation.


These notes provide an overview of the key content and organization of the document, serving as a guide for study or review of ARM assembly and computer organization with Raspberry Pi.