100% found this document useful (1 vote)
6 views

Raspberry Pi Operating System Assembly Language 4th Edition Bruce Smith download

The document provides information about the 'Raspberry Pi Operating System Assembly Language' 4th Edition by Bruce Smith, including links to download the book and related titles. It contains a detailed table of contents covering various topics in assembly language programming for Raspberry Pi. Additionally, it includes acknowledgments, a dedication, and information on source code availability.

Uploaded by

odowdsewim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
6 views

Raspberry Pi Operating System Assembly Language 4th Edition Bruce Smith download

The document provides information about the 'Raspberry Pi Operating System Assembly Language' 4th Edition by Bruce Smith, including links to download the book and related titles. It contains a detailed table of contents covering various topics in assembly language programming for Raspberry Pi. Additionally, it includes acknowledgments, a dedication, and information on source code availability.

Uploaded by

odowdsewim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Raspberry Pi Operating System Assembly Language

4th Edition Bruce Smith pdf download

https://ebookmeta.com/product/raspberry-pi-operating-system-
assembly-language-4th-edition-bruce-smith/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Raspberry Pi Assembly Language Programming 1st Edition


Stephen Smith

https://ebookmeta.com/product/raspberry-pi-assembly-language-
programming-1st-edition-stephen-smith/

RP2040 Assembly Language Programming: ARM Cortex-M0+ on


the Raspberry Pi Pico 1st Edition Stephen Smith

https://ebookmeta.com/product/rp2040-assembly-language-
programming-arm-cortex-m0-on-the-raspberry-pi-pico-1st-edition-
stephen-smith/

Raspberry Pi Cookbook, 4th Edition (Second Early


Release) Simon Monk

https://ebookmeta.com/product/raspberry-pi-cookbook-4th-edition-
second-early-release-simon-monk/

Healing his Shattered Heart A Historical Regency


Romance Novel Carol Colyer

https://ebookmeta.com/product/healing-his-shattered-heart-a-
historical-regency-romance-novel-carol-colyer/
Higher Education Computer Science: A Manual of
Practical Approaches 2nd Edition Jenny Carter

https://ebookmeta.com/product/higher-education-computer-science-
a-manual-of-practical-approaches-2nd-edition-jenny-carter/

Petitions and Power 1st Edition Xing Ying

https://ebookmeta.com/product/petitions-and-power-1st-edition-
xing-ying/

A New Vision for Center Based Engineering Research 1st


Edition And Medicine Engineering National Academies Of
Sciences

https://ebookmeta.com/product/a-new-vision-for-center-based-
engineering-research-1st-edition-and-medicine-engineering-
national-academies-of-sciences/

180 Days of High Frequency Words for Second Grade


Practice Assess Diagnose 1st Edition Adair Solomon

https://ebookmeta.com/product/180-days-of-high-frequency-words-
for-second-grade-practice-assess-diagnose-1st-edition-adair-
solomon/

A Century of Weird Fiction 1832 1937 Disgust


Metaphysics and the Aesthetics of Cosmic Horror 1st
Edition Jonathan Newell

https://ebookmeta.com/product/a-century-of-weird-
fiction-1832-1937-disgust-metaphysics-and-the-aesthetics-of-
cosmic-horror-1st-edition-jonathan-newell/
Python For Financial Analysis From Zero to Hero 1st
Edition Van Der Post

https://ebookmeta.com/product/python-for-financial-analysis-from-
zero-to-hero-1st-edition-van-der-post/
Table of Contents

Using this eBook

Acknowledgements

Dedication

About the Author

Table of Contents

1. Introduction

Imagination Unlimited

Start Experimenting

GNU C Compiler

Learn by Example

What Will You Learn?

Fourth Edition and Compatibility

Raspberry Pi OS

What About 64-bit?

Keyboard Computing

The Significance of ARM

Raspberry Pi Through the Ages

Compute Modules

Notation in Use

Table Terminology

Centre for Computing History

Companion Website and Free Books

2. Starting Out

Numbers with Meaning

ARM Instructions

The Transformation Process

Why Machine Code?

Language Levels

Into Orbit

RISC and Instruction Sets

Assembler Structure

Error Of Your Ways

Cross Compilers

The Raspberry Pi ARM Chips(s)


3. First Time Out

The Command Line

Creating A Source File

Come to the Execution

Assembler Errors

The Components

Lack of _start

Linking Files

Tidying Up

A Comment on Comments

Geany Programmer's Editor

4. Bits of a RISC Machine

Binary to Decimal

Binary to Hex

Hex to Decimal and Back

Binary Addition

Subtraction

Twos Complement Numbers

When Twos Don't Add Up

Desktop Calculator

5. ARM Arrangements

Word Lengths

Byte and Word Accessed Memory

Registers

R15 - Program Counter

Current Program Status Register

Bits and Flags

Setting Flags

S Suffix

R14: The Link Register

R13: The Stack Pointer

6. Data Processing

Addition Instructions

Subtraction

Multiplication

Divide Arrives

Move Instructions

Compare Instructions

Ordering Numbers
7. ROS Ins and Outs

SWI and SVC Commands

Writing to the Screen

Reading from the Keyboard

eax and Others

8. Logical Operations

Logical AND

Logical OR

Logical EOR

Logical Instructions

ORR to Convert Character Case

Bit Clear with BIC

Flag Tests

System Call Registers

9. Conditional Execution

Single Flag Condition Codes

EQ: Equal

NE: Not Equal

VS: Overflow Set

VC: Overflow Clear

MI: Minus Set

PL: Plus Clear

CS: Carry Set (HS: Higher or Same)

CC: Carry Clear (LO: Lower)

AL: Always

NV: Never

Multiple Flag Condition Code

HI: Higher (Unsigned)

LS: Lower Than or Same (Unsigned)

GE: Greater or Equal (Signed)

LT: Less Than (Signed)

GT: Greater Than (Signed)

LE: Less Than or Equal To (Signed)

Mixing the S Suffix

10. Branch and Compare

Branch Instructions
The Link Register

Using Compare Instructions

Compare Forward Thinking

Branch Exchange

11. Shifts and Rotates

Logical Shifts

Logical Shift Right

Arithmetic Shift Right

Rotations

Extended Rotate

Uses of Shifts and Rotates

Immediate Constant Range

Top Move

12. Smarter Numbers

Long Multiplication

Long Accumulation

Division and Remainder

Smarter Multiplication

Much More Inside

13. Program Counter R15

Pipelining

Calculating Branches

14. Debugging with GDB

Frozen Cases

Assembling for GDB

The Disassembler

Breakpoints

Breakpoint Labels

Memory Dump

Shortcuts

GDB Make Options

15. Data Transfer

ADR Directive

Indirect Addressing

ADR and LDR

Pre-Indexed Addressing

Accessing Memory Bytes


Address Write Back

Post-Indexed Addressing

Byte Conditions

PC Relative Addressing

16. Block Transfer

Write Back

Block Copy Routine

17. Stacks

Push and Pull

Stack Growth

Stack Application

Framed Work

Frame Pointer

18. Directives and Macros

Data Storage Directives

Aligning Data

Macros

Including Macros

19. File Handling

File Permissions

20. Using libc

Using C Functions in Assembler

Source File Structure

Investigating the Executable

Number Input with Scanf

Getting This Information

21. Writing Functions

Function Standards

More Than Three

Preserving Links and Flags

Robust Print Routines

22. Disassembling C

GCC - The Swiss Army Knife


A Simple C Framework

Sourcing the Assembler

A printf Example

Frame Pointer Variables

Disassembling System Calls

23. GPIO Functions

Memory Mapping

The GPIO Controller

GPIO In and Outs

Building the Code

Other GPIO Functions

GPIO Pins Explained

24. Floating-Point

VFP Architecture

The Register File

Managing and Printing

Assembling and Debugging VFP with GDB

Load, Store and Move

Precision Conversion

Vector Arithmetic

25. VFP Control Register

Conditional Execution

Scalar and Vector Operations

Which Type of Operator?

Len and Stride

26. Neon

Neon Assembler

Neon Instructions and Data Types

Addressing Modes

VLD and VST in their Stride

Load of Others

Neon Intrinsic

Neon Arrays

Order Correctly

Matrix Math

Multi Matrix

Macro Matrix Example


27. Thumb Code

Differences

Assembling Thumb

Accessing High Registers

Stack Operators

Single and Multi-Register

Functions in Thumb

ARMv7 Thumb Instructions

28. Unified Language

Thumb Changes

New A32 Instructions

Compare by Zero

Assembling UAL

29. Exception Handing

Modes of Operation

Vectors

Register Arrangements

Exception Handling

MRS and MSR

Interrupts When?

Your Interrupt Decisions

Returning from Interrupts

Writing Interrupt Routines

30. System on a Chip

The ARM Chip & Instruction Sets

Co-processors

Pipeline

Memory & Caches

The GPU

ARMv8 Overview

Raspberry Pi OS 64-Bit

In Summary

Archimedes Principle

A. ASCII Character Set

B. ARM Instruction Set

Load/Store Suffixes

Compare and Test Instructions


Branch Instructions

Arithmetic Instructions

Logical Instructions

Data Movement Instructions

C. RPi OS Syscalls
Using this eBook

I love eBooks! Loaded onto my Kindle Paperwhite I can take my favourite books with me, in

my pocket, wherever I go and have immediate access to them when and where I want. An

eBook copy of any Ken Follett book is much easier to manage than the oft 800-odd page hard-

back equivalent.

As far as technical books go, it may sometimes not be as straightforward as when reading a

novel. Because eBooks are a one size fits all entity, it makes formatting them for all possible

instances difficult. In fact, it is a lot easier to format a print book than an eBook.

Long program listings, especially which contain copious comments can be unwieldly in an

eBook. Thus, I would strongly advise downloading the source code for the programs and

scrutinising these at the relevant point. There are several tables and figures, and in many cases,

you can click on the highlighted corner to display the table full screen.

Figure. eBook open on Raspberry Pi Desktop, along with appropriate program.


Acknowledgements

Thanks go to Richard Khoury for his help with the C segments within this book and the finer

art of using GCC and GDB. Thanks to Mike Ginns for the concepts of several programs listed

here. Some listings originate from his book Archimedes Assembly Language which was first

published by Dabs Press in 1988. (A key to how old the ARM is!) Also, I am grateful to Brian

Scallan, Steve Cirelli and Tony Palmer for their feedback and updates. I am also indebted to

the many readers who have written with suggestions to improve this book.

Michael B pointed out that the eBook 'Table of Contents' was missing Chapter 22! The

Chapter does indeed exist within the original eBook, just as a duplicate Chapter 21! This has

now been corrected.

Shelton Caruthers noted the programs in Chapter 20 contain some redundent code. This is

found at the '_exit:' labels in the code. This is never executed as the the PUSH and POP

instructions take care of the entry and exit process. I have not edited this in the code as it

stands.
This Book

Raspberry Pi Operating System Assembly Language Hands-on-Guide - Fourth Edition

© Bruce Smith

eBook editions 1 ,2 3, Previously published as Raspberry Pi Assembly Language Raspbian

ISBN 978-0-9923916-0-7 Fourth edition Revised and updated: March 2021 [0004], August

2021 [0004a].

ISBN: 978-0-6480987-4-4

Editor: Alan Ford Edits, Melanie Smith Cover: Sumit Shringi, Graphic Designer (Book Cover-

Design)

All Trademarks and Registered Trademarks are hereby acknowledged. Within this Hands On

Guide the term BBC refers to the British Broadcasting Corporation. Raspberry Pi and the

Raspberry Pi logos are registered trademarks of the Raspberry Pi Foundation.

Raspberry Pi OS Assembly Language: Hands On Guide is not endorsed by the Raspberry Pi

Foundation.

All rights reserved. No part of this book (except brief passages quoted for critical purposes) or

any of the computer programs to which it relates may be reproduced or translated in any form,

by any means mechanical electronic or otherwise without the prior written consent of the

copyright holder.

Disclaimer: Whilst every effort has been made to ensure that the information in this publication

(and any programs and software) is correct and accurate, the author and publisher can accept

no liability for any consequential loss or damage, however caused, arising as a result of the

information printed in this book and on any associated websites. Because neither BSB nor the

author have any control over the way in which the contents of this book is used, no warranty is

given or should be implied as to the suitability of the advice or programs for any given

application. No liability can be accepted for any consequential loss or damage, however caused,

arising as a result of using the programs or advice printed in this book.


Source Code

Source code and supplementary material referenced in this book is available to readers via the

author's website at: www.​


brucesmith.info. Published by BSB. www.brucesmith.info.
Dedication

Dedicated to all the health care workers, nurses, doctors and carers around the world. To the

ones that gave their all in a time of need during the pandemic. Their memory will be embedded

into our hearts for years to come. Thank you.


Another Random Scribd Document
with Unrelated Content
The Project Gutenberg eBook of Index of the
Project Gutenberg Works of Booth Tarkington
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: Index of the Project Gutenberg Works of Booth Tarkington

Author: Booth Tarkington

Editor: David Widger

Release date: August 18, 2018 [eBook #57721]


Most recently updated: February 25, 2021

Language: English

Credits: Produced by David Widger

*** START OF THE PROJECT GUTENBERG EBOOK INDEX OF THE


PROJECT GUTENBERG WORKS OF BOOTH TARKINGTON ***
INDEX OF THE PROJECT
GUTENBERG WORKS OF
BOOTH TARKINGTON

Compiled by David Widger


CONTENTS
Click on the ## before each title to view a
linked
table of contents for each of the twelve
volumes.

Click on the title itself to open the original


online file.

## THE FLIRT

## PENROD

## THE CONQUEST OF CANAAN

## ALICE ADAMS

## THE TURMOIL

## PENROD AND SAM

## SEVENTEEN

## MONSIEUR BEAUCAIRE

## HIS OWN PEOPLE


## RAMSEY MILHOLLAND

## THE TWO VANREVELS

## THE GUEST OF QUESNAY

## THE BEAUTIFUL LADY

## BEASLEY'S CHRISTMAS PARTY

## HARLEQUIN AND COLUMBINE

## IN THE ARENA

## THE MAGNIFICENT AMBERSONS

## THE GENTLEMAN FROM INDIANA

THE MAN FROM HOME

GENTLE JULIA

## LORDS OF THE HOUSETOPS


TABLES OF CONTENTS OF
VOLUMES

THE FLIRT
By Booth Tarkington

CONTENTS
THE FLIRT
CHAPTER ONE
CHAPTER TWO
CHAPTER THREE
CHAPTER FOUR
CHAPTER FIVE
CHAPTER SIX
CHAPTER SEVEN
CHAPTER EIGHT
CHAPTER NINE
CHAPTER TEN
CHAPTER ELEVEN
CHAPTER TWELVE
CHAPTER THIRTEEN
CHAPTER FOURTEEN
CHAPTER FIFTEEN
CHAPTER SIXTEEN
CHAPTER SEVENTEEN
CHAPTER EIGHTEEN
CHAPTER NINETEEN
CHAPTER TWENTY
CHAPTER TWENTY-ONE
CHAPTER TWENTY-TWO
CHAPTER TWENTY-THREE
CHAPTER TWENTY-FOUR
CHAPTER TWENTY-FIVE

PENROD
By Booth Tarkington

CONTENTS

CHAPTER I A BOY AND HIS DOG

CHAPTER II ROMANCE

CHAPTER III THE COSTUME

CHAPTER IV DESPERATION

CHAPTER V THE PAGEANT OF THE TABLE ROUND

CHAPTER VI EVENING

CHAPTER VII EVILS OF DRINK

CHAPTER VIII SCHOOL

CHAPTER IX SOARING

CHAPTER X UNCLE JOHN

CHAPTER XI FIDELITY OF A LITTLE DOG

CHAPTER XII MISS RENNSDALE ACCEPTS

CHAPTER XIII THE SMALLPOX MEDICINE


CHAPTER XIV MAURICE LEVY'S CONSTITUTION

CHAPTER XV THE TWO FAMILIES

CHAPTER XVI THE NEW STAR

CHAPTER XVII RETIRING FROM THE SHOW


BUSINESS

CHAPTER XVIII MUSIC

CHAPTER XIX THE INNER BOY

CHAPTER XX BROTHERS OF ANGELS

CHAPTER XXI RUPE COLLINS

CHAPTER XXII THE IMITATOR

CHAPTER XXIII COLOURED TROOPS IN ACTION

CHAPTER XXIV "LITTLE GENTLEMAN”

CHAPTER XXV TAR

CHAPTER XXVI THE QUIET AFTERNOON

CHAPTER XXVII CONCLUSION OF THE QUIET


AFTERNOON

CHAPTER XXVIII TWELVE

CHAPTER XXIX FANCHON

CHAPTER XXX THE BIRTHDAY PARTY


CHAPTER XXXI OVER THE FENCE

THE CONQUEST OF CANAAN

BY
BOOTH TARKINGTON
CONTENTS
CHAPTER
I. ENTER CHORUS
II. A RESCUE
III. OLD HOPES
IV. THE DISASTER
V. BEAVER BEACH
VI. "YE'LL TAK' THE HIGH ROAD AND I'LL TAK'
THE LOW ROAD"
VII. GIVE A DOG A BAD NAME
VIII. A BAD PENNY TURNS UP
IX. OUTER DARKNESS
X. THE TRYST
XI. WHEN HALF-GODS GO
XII. TO REMAIN ON THE FIELD OF BATTLE IS
NOT ALWAYS A VICTORY
XIII. THE WATCHER AND THE WARDEN
XIV. WHITE ROSES IN A LAW-OFFICE
XV. HAPPY FEAR GIVES HIMSELF UP
XVI. THE TWO CANAANS
XVII. MR. SHEEHAN'S HINTS
XVIII. IN THE HEAT OF THE DAY
XIX. ESKEW ARP
XX. THREE ARE ENLISTED
XXI. NORBERT WAITS FOR JOE
XXII. MR. SHEEHAN SPEAKS
XXIII. JOE WALKS ACROSS THE COURT-HOUSE
YARD
XXIV. MARTIN PIKE KEEPS AN ENGAGEMENT
XXV. THE JURY COMES IN
XXVI. "ANCIENT OF DAYS"

ALICE ADAMS
By Booth Tarkington

CONTENTS

CHAPTER I
CHAPTER II
CHAPTER III
CHAPTER IV
CHAPTER V
CHAPTER VI
CHAPTER VII
CHAPTER VIII
CHAPTER IX
CHAPTER X
CHAPTER XI
CHAPTER XII
CHAPTER XIII
CHAPTER XIV
CHAPTER XV
CHAPTER XVI
CHAPTER XVII
CHAPTER XVIII
CHAPTER XIX
CHAPTER XX
CHAPTER XXI
CHAPTER XXII
CHAPTER XXIII
CHAPTER XXIV
CHAPTER XXV

THE TURMOIL
A NOVEL
By Booth Tarkington

1915.

CONTENTS

CHAPTER I
CHAPTER II
CHAPTER III
CHAPTER IV
CHAPTER V
CHAPTER VI
CHAPTER VII
CHAPTER VIII
CHAPTER IX
CHAPTER X
CHAPTER XI
CHAPTER XII
CHAPTER XIII
CHAPTER XIV
CHAPTER XV
CHAPTER XVI
CHAPTER XVII
CHAPTER XVIII
CHAPTER XIX
CHAPTER XX
CHAPTER XXI
CHAPTER XXII
CHAPTER XXIII
CHAPTER XXIV
CHAPTER XXV
CHAPTER XXVI
CHAPTER XXVII
CHAPTER XXVIII
CHAPTER XXIX
CHAPTER XXX
CHAPTER XXI
CHAPTER XXXII
CHAPTER XXXIII
PENROD AND SAM
By Booth Tarkington

CONTENTS

CHAPTER I. PENROD AND SAM

CHAPTER II. THE BONDED PRISONER

CHAPTER III. THE MILITARIST

CHAPTER IV. BINGISM

CHAPTER V. THE IN-OR-IN

CHAPTER VI. GEORGIE BECOMES A MEMBER

CHAPTER VII. WHITEY

CHAPTER VIII. SALVAGE

CHAPTER IX. REWARD OF MERIT

CHAPTER X. CONSCIENCE

CHAPTER XI. THE TONIC

CHAPTER XII. GIPSY

CHAPTER XIII. CONCERNING TROUSERS


CHAPTER XIV. CAMERA WORK IN THE JUNGLE

CHAPTER XV. A MODEL LETTER TO A FRIEND

CHAPTER XVI. WEDNESDAY MADNESS

CHAPTER XVII. PENROD'S BUSY DAY

CHAPTER XVIII. ON ACCOUNT OF THE WEATHER

CHAPTER XIX. CREATIVE ART

CHAPTER XX. THE DEPARTING GUEST

CHAPTER XXI. YEARNINGS

CHAPTER XXII. THE HORN OF FAME

CHAPTER XXIII. THE PARTY

CHAPTER XXIV. THE HEART OF MARJORIE JONES

SEVENTEEN
A Tale Of Youth And Summer Time And The Baxter Family
Especially William
By Booth Tarkington

CONTENTS

SEVENTEEN

I. -- WILLIAM
II. -- THE UNKNOWN
III. -- THE PAINFUL AGE
IV. -- GENESIS AND CLEMATIS
V, -- SORROWS WITHIN A BOILER
VI. -- TRUCULENCE
VII. -- MR. BAXTER'S EVENING CLOTHES
VIII. -- JANE
IX. -- LITTLE SISTERS HAVE BIG EARS
X. -- MR. PARCHER AND LOVE
XI. -- BEGINNING A TRUE FRIENDSHIP
XII. -- PROGRESS OF THE SYMPTOMS
XIII. -- AT HOME TO HIS FRIENDS
XIV. -- TIME DOES FLY
XV. -- ROMANCE OF STATISTICS
XVI. --THE SHOWER
XVII. --JANE'S THEORY
XVIII. -- THE BIG, FAT LUMMOX
XIX. -- "I DUNNO WHY IT IS"
XX. -- SYDNEY CARTON
XXI. -- MY LITTLE SWEETHEARTS
XXII. -- FORESHADOWINGS
XXIII. -- FATHERS FORGET
XXIV. -- CLOTHES MAKE THE MAN
XXV. -- YOUTH AND MR. PARCHER
XXVI. -- MISS BOKE
XXVII. -- MAROONED
XXVIII. -- RANNIE KIRSTED
XXIX. -- "DON'T FORGET!"
XXX. -- THE BRIDE-TO-BE

MONSIEUR BEAUCAIRE
by Booth Tarkington

You might also like