Skip to main content
\(\newcommand{\doubler}[1]{2#1} \newcommand{\binary}{\mathtt} \newcommand{\hex}{\mathtt} \newcommand{\octal}{\mathtt} \newcommand{\prog}{\mathtt} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)
Introduction to Computer Organization:
ARM Assembly Language Using the Raspberry Pi
Robert G. Plantz
Contents
Index
Prev
Up
Next
Contents
Prev
Up
Next
Front Matter
Colophon
Acknowledgements
Preface
1
Introduction
Efficient Use of This Book
Computer Subsystems
How the Subsystems Interact
Setting Up Your Raspberry Pi
2
Data Storage Formats
Bits and Groups of Bits
Exercises
Mathematical Equivalence of Binary and Decimal
Exercises
Unsigned Decimal to Binary Conversion
Exercises
Memory
Exercises
Using C Programs to Explore Data Formats
Programming Exercises
Examining Memory With a Debugger
Programming Exercise
Storing Characters
Programming Exercise
Low-level Character Handling
Programming Exercises
Accessing the GPIO in C
3
Computer Arithmetic
Addition and Subtraction
Exercises
Arithmetic Errors—Unsigned Integers
Signed Integers
Exercises
Arithmetic Errors—Signed Integers
Exercises
4
Basic Data Types
C/C++ Basic Data Types
Hexadecimal to Integer Conversion
Programming Exercise
Bitwise Logical Operations
Programming Exercise
Other Codes.
5
Boolean Algebra
Boolean Algebra Operations
Exercises
Canonical (Standard) Forms
Exercise
Boolean Function Minimization
Exercises
6
Logic Gates
Crash Course in Electronics
CMOS Transistors
NAND and NOR Gates
Exercise
7
Logic Circuits
Combinational Logic Circuits
Programmable Logic Devices
Sequential Logic Circuits
Designing Sequential Circuits
Memory Organization
8
Central Processing Unit
Overview
CPU Registers
CPU Interaction with Memory
Program Execution in the CPU
Using
gdb
to View the CPU Registers
Programming Exercises
9
Programming in Assembly Language
Program Organization
First Assembly Language Instructions
Creating a Program in Assembly Language
Programming Exercises
Assemblers and Linkers
10
Structure of the
main
Function
Passing Arguments in Registers
The Stack
Stack Management In a Function
Programming Exercise
Local Variables on the Stack
Programming Exercise
Data Storage in Memory
11
Instruction Details
Addressing Modes
The Assignment Operator
Machine Code, Assignment
Branching
Machine Code, Branching
Assembler Listings
12
Program Flow Constructs
Repetition
Programming Exercises
Binary Decisions
Programming Exercise
13
Writing Your Own Functions
Overview of Passing Arguments
Accessing Arguments in a Function
Programming Exercises
14
Bit Operations; Multiplication and Division
Logical Instructions
Programming Exercise
Shifting Bits
Programming Exercises
Multiplication
Division
Programming Exercises
15
Data Structures
Arrays
Programming Exercise
Records (
struct
s)
struct
s as Function Arguments
Programming Exercise
struct
s as C++ Objects
Programming Exercise
16
Fractional Numbers
Fractional Values in Binary
Programming Exercise
Fixed Point Fractional Values
Floating Point Format
IEEE 754
Exercises
Floating-Point Hardware
17
Interrupts and Exceptions
CPU Features
Supervisor Call
Interrupts
Error Condition
18
Input/Output
Memory Timing
I/O Device Timing
Bus Timing
I/O Interfacing
I/O Ports
Programming Exercise
19
General Purpose Input/Output (GPIO) Device
GPIO I/O Memory
GPIO Connections
Programming Exercise
Back Matter
A
Using GNU
make
to Build Programs
B
Hints and Solutions to Selected Exercises
Bibliography
Index
Authored in PreTeXt
A
Using GNU
make
to Build Programs
B
Hints and Solutions to Selected Exercises
Bibliography
Index