Digital Library

Raspberry Pi Assembly Language Programming ARM Processor Coding - Maker Innovations Series (Stephen Smith) (z-library.sk, 1lib.sk, z-lib.sk)

Stephen Smith

Raspberry Pi Assembly Language Programming ARM Processor Coding - Maker Innovations Series (Stephen Smith) (z-library.sk, 1lib.sk, z-lib.sk)

Author Stephen Smith

C

Gain all the skills required to dive into the fundamentals of the Raspberry Pi hardware architecture and how data is stored in the Pi’s memory. This book provides you with working starting points for your own projects while you develop a working knowledge of Assembly Language programming on the Raspberry Pi. You'll learn how to interface to the Pi’s hardware including accessing the GPIO ports. The book covers the basics of code optimization as well as how to inter-operate with C and Python code, so you'll develop enough background to use the official ARM reference documentation for further projects. With Raspberry Pi Assembly Language Programming as your guide, you'll study how to read and reverse engineer machine code and then apply those new skills to study code examples and take control of your Pi’s hardware and software both. For this New Edition Since the original edition, the Raspberry Pi OS has moved to 64-bits. The operating system has been revamped along with several new versions of the Raspberry Pi hardware. The new edition is 64-bit, based on the latest Raspberry Pi OS and hardware, and incorporates reader feedback from the first edition. What You'll Learn Program basic ARM 64-Bit Assembly Language Interface with the various hardware devices on the Raspberry Pi Comprehend code containing Assembly Language Use the official ARM reference documentation Who This Book Is For Coders who have already learned to program in a higher-level language like Python, Java, C#, or C and now wish to learn Assembly Language programming.

Format PDF
Size 9.6 MB
12
Views
0
Downloads
0.00
Total Donations
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
Raspberry Pi Assembly Language Programming MAKER INNOVAT IONS SER I ES ARM Processor Coding — Second Edition — Stephen Smith
Page 2
Maker Innovations Series
Page 3
Jump start your path to discovery with the Apress Maker Innovations series! From the basics of electricity and components through to the most advanced options in robotics and Machine Learning, you’ll forge a path to building ingenious hardware and controlling it with cutting-edge software. All while gaining new skills and experience with common toolsets you can take to new projects or even into a whole new career. The Apress Maker Innovations series offers projects-based learning, while keeping theory and best processes front and center. So you get hands-on experience while also learning the terms of the trade and how entrepreneurs, inventors, and engineers think through creating and executing hardware projects. You can learn to design circuits, program AI, create IoT systems for your home or even city, and so much more! Whether you’re a beginning hobbyist or a seasoned entrepreneur working out of your basement or garage, you’ll scale up your skillset to become a hardware design and engineering pro. And often using low- cost and open-source software such as the Raspberry Pi, Arduino, PIC microcontroller, and Robot Operating System (ROS). Programmers and software engineers have great opportunities to learn, too, as many projects and control environments are based in popular languages and operating systems, such as Python and Linux. If you want to build a robot, set up a smart home, tackle assembling a weather-ready meteorology system, or create a brand-new circuit using breadboards and circuit design software, this series has all that and more! Written by creative and seasoned Makers, every book in the series tackles both tested and leading-edge approaches and technologies for bringing your visions and projects to life. More information about this series at https://link.springer.com/ bookseries/17311.
Page 4
Raspberry Pi Assembly Language Programming ARM Processor Coding Second Edition Stephen Smith
Page 5
Raspberry Pi Assembly Language Programming: ARM Processor Coding, Second Edition ISBN-13 (pbk): 979-8-8688-1873-8 ISBN-13 (electronic): 979-8-8688-1874-5 https://doi.org/10.1007/979-8-8688-1874-5 Copyright © 2025 by Stephen Smith This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Miriam Haidara Development Editor: James Markham Project Manager: Jessica Vakili Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a Delaware LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on the Github repository: https://github.com/Apress/Raspberry-Pi- Assembly-Language-Programming-Second-Edition. For more detailed information, please visit https://www.apress.com/gp/services/source-code. If disposing of this product, please recycle the paper. Stephen Smith Gibsons, BC, Canada
Page 6
This book is dedicated to my beloved wife and editor, Cathalynn Labonté-Smith.
Page 7
(This page has no text content)
Page 8
(This page has no text content)
Page 9
(This page has no text content)
Page 10
(This page has no text content)
Page 11
(This page has no text content)
Page 12
(This page has no text content)
Page 13
(This page has no text content)
Page 14
(This page has no text content)
Page 15
(This page has no text content)
Page 16
xvii About the Author Stephen Smith is a software architect, located in Gibsons, BC, Canada. He’s been developing software since high school, or way too many years to record. He is an expert in artificial intelligence and Assembly Language programming, earned his Advanced HAM Radio License, and enjoys mountain biking, hiking, and nature photography. He volunteers for Sunshine Coast Search and Rescue. He is the author of Programming with 64-Bit ARM Assembly Language, RP2040 Assembly Language Programming, and RISC-V Assembly Language Programming, all published by Apress. Also, he writes his popular technology blog, at smist08.wordpress.com.
Page 17
xix Stewart Watkiss is a keen maker, programmer, and author of Learn Electronics with Raspberry Pi. He studied at the University of Hull, where he earned a master’s degree in electronic engineering, and more recently at Georgia Institute of Technology, where he earned a master’s degree in computer science. Stewart also volunteers as a STEM Ambassador, helping teach programming and physical computer to schoolchildren and at Raspberry Pi events. He has created a number of resources using Pygame Zero, which he makes available on his website (www.penguintutor.com). About the Technical Reviewer
Page 18
xxi Acknowledgments No book is ever written in isolation. I want to especially thank my wife, Cathalynn Labonté-Smith, for her support, encouragement, and expert editing. I also want to thank all the good folk at Apress who made the whole process easy and enjoyable. A special shout-out to Jessica Vakili, my coordinating editor, who kept the whole project moving quickly and smoothly. Thanks to Stewart Watkiss, my technical reviewer, who helped make this a far better book.
Page 19
xxiii Introduction To really learn how a computer works, learning Assembly Language is a great way to get into the nitty-gritty details. The popularity and low cost of the Raspberry Pi provides an ideal platform to learn advanced concepts in computing. Even though the Raspberry Pi is inexpensive and credit card-sized, it is still a sophisticated computer with a quad-core processor, a floating-point coprocessor, and a NEON parallel processing unit. What is learned about the Raspberry Pi is directly relevant to any device with an ARM processor, which includes nearly every cell phone and tablet. In fact, by volume, the ARM processor is the number one processor today. This book covers how to program the Raspberry Pi at the lowest level, operating as close to the hardware as possible. This book teaches the format of the instructions, how to put them together into programs, and provides details on the binary data formats being operated on. It describes how to program the floating-point processor as well as the NEON parallel processor. It gives instructions on how to program the GPIO ports to interface to custom hardware, to experiment with electronics connected to your Raspberry Pi. All that is needed is a Raspberry Pi running the 64-bit version of the Raspberry Pi OS. This will provide all the tools needed to learn Assembly Language programming. This is the low cost of entry of running open source software including the Raspberry Pi OS version of Linux and the GNU Assembler. This book contains many working programs that can be played with and used as a starting point or working examples to study. The only way to learn programming is by doing, so don’t be afraid to experiment, as it’s the only way to learn.
Page 20
xxiv Even if Assembly Language programming isn’t used in day-to-day life, knowing how the processor works at the Assembly Language level and knowing the low-level binary data structures will make the reader a better programmer in all other areas. Knowing how the processor works allows the writing of more efficient C code and can even help with Python programming. The book is designed to be followed in sequence, but there are chapters that can be skipped or skimmed; for instance, if uninterested in interfacing to hardware, skip Chapter 8, “Programming GPIO Pins,” or Chapter 11, “Floating-Point Operations,” if numerical computing is irrelevant. I hope you enjoy this introduction to Assembly Language, and learning it for one processor family will help with mastering any other processor architecture encountered throughout your career. Introduction to the Second Edition The first edition of this book was written six years ago using a Raspberry Pi 3 with 1Gig of RAM. At that time, Raspberry’s operating system was called Raspbian, and it was 32-bit; since then, a lot has changed in the Raspberry Pi world. This edition was written using a Raspberry Pi 5 with 8Gig of RAM and an SSD drive using the 64-bit version of the renamed Raspberry Pi OS. The changes from the first edition are quite extensive, because everything is for 64-bit programming now, including • The GPIO section is updated to cover the Raspberry Pi 5’s RP1 I/O processor. • All screenshots are retaken for the newer Raspberry Pi OS style. InTroduCTIon
The above is a preview of the first 20 pages. Register to read the complete e-book.

Support Author

0.00
Total Amount (¥)
0
Donation Count
Please enter an amount Minimum ¥1

You will be redirected to Alipay to complete payment, then return here.

Recommended for You

Loading recommended books...
Failed to load, please try again later
Back to List