ARM ASSEMBLY LANGUAGE Hohl Hinds EDITION Fundamentals and Techniques SECOND 0 0 0 0 9 1

ARM ASSEMBLY LANGUAGE Hohl Hinds EDITION Fundamentals and Techniques SECOND 0 0 0 0 9 1

Computer Science and Engineering Hohl Hinds ARM ASSEMBLY ARM ASSEMBLY “Assembly language programming is still the best way to learn about the internals of processors and this is one of a very few books that teaches that skill for ARM® processors. It covers the necessary material in a well-organized manner. Updated for newer versions of ARM processors, it adds good material on floating-point arithmetic that was missing from the first edition.” —Ronald W. Mehler, California State University, Northridge, USA “This text retains the ease of using the ARM7TDMI while moving the Fundamentals and Techniques student [or reader] into the more capable Cortex-M4. …The addition of the Cortex-M4 makes this a much stronger text.” —Ralph Tanner, Western Michigan University, Kalamazoo, USA Delivering a solid introduction to assembly language and embedded systems, ARM Assembly Language: Fundamentals and Techniques, Second Edition continues to support the popular ARM7TDMI, but also addresses the latest architectures from ARM, including Cortex™-A, Cortex-R, and Cortex-M processors—all of which have slightly different instruction sets, programmer’s models, and exception handling. Featuring three brand-new chapters, a new appendix, and expanded coverage of the ARM7™, this edition: LANGUAGE • Discusses IEEE 754 floating-point arithmetic and explains how to program with the IEEE standard notation • Contains step-by-step directions for the use of Keil™ MDK-ARM and Texas Instruments (TI) Code Composer Studio™ • Provides a resource to be used alongside a variety of hardware evaluation modules, such as TI’s Tiva Launchpad, STMicroelectronics’ iNemo and Discovery, and NXP Semiconductors’ Xplorer boards Written by experienced ARM processor designers, ARM Assembly Language: Fundamentals and Techniques, Second Edition covers the topics essential to writing meaningful assembly programs, making it an ideal textbook and professional reference. SECOND EDITION K22631 ISBN: 978-1-4822-2985-1 90000 9 781482 229851 K22631_COVER_final.indd 1 9/12/14 3:07 PM SECOND EDITION ARM ASSEMBLY LANGUAGE Fundamentals and Techniques SECOND EDITION ARM ASSEMBLY LANGUAGE Fundamentals and Techniques William Hohl Christopher Hinds ARM, Inc., Austin, Texas Boca Raton London New York CRC Press is an imprint of the Taylor & Francis Group, an informa business CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2015 by William Hohl and Christopher Hinds CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20140915 International Standard Book Number-13: 978-1-4822-2986-8 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit- ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright. com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com To our families Contents Preface......................................................................................................................xv Acknowledgments ...................................................................................................xxi Authors ................................................................................................................. xxiii Chapter 1 An Overview of Computing Systems ...................................................1 1.1 Introduction ...............................................................................1 1.2 History of RISC .........................................................................3 1.2.1 ARM Begins ................................................................5 1.2.2 The Creation of ARM Ltd. ...........................................7 1.2.3 ARM Today ..................................................................9 1.2.4 The Cortex Family ..................................................... 10 1.2.4.1 The Cortex-A and Cortex-R Families ......... 10 1.2.4.2 The Cortex-M Family ................................. 11 1.3 The Computing Device ............................................................12 1.4 Number Systems ......................................................................15 1.5 Representations of Numbers and Characters .......................... 18 1.5.1 Integer Representations .............................................. 18 1.5.2 Floating-Point Representations .................................. 21 1.5.3 Character Representations ..........................................23 1.6 Translating Bits to Commands ................................................24 1.7 The Tools .................................................................................25 1.7.1 Open Source Tools .....................................................27 1.7.2 Keil (ARM) ................................................................27 1.7.3 Code Composer Studio ...............................................28 1.7.4 Useful Documentation ................................................30 1.8 Exercises ..................................................................................30 Chapter 2 The Programmer’s Model .................................................................. 33 2.1 Introduction ............................................................................. 33 2.2 Data Types ............................................................................... 33 2.3 ARM7TDMI ...........................................................................34 2.3.1 Processor Modes ........................................................34 2.3.2 Registers ..................................................................... 35 2.3.3 The Vector Table ........................................................38 2.4 Cortex-M4 ................................................................................39 2.4.1 Processor Modes ........................................................40 2.4.2 Registers .....................................................................40 2.4.3 The Vector Table ........................................................42 2.5 Exercises .................................................................................. 43 vii viii Contents Chapter 3 Introduction to Instruction Sets: v4T and v7-M .................................45 3.1 Introduction .............................................................................45 3.2 ARM, Thumb, and Thumb-2 Instructions ..............................46 3.3 Program 1: Shifting Data.........................................................46 3.3.1 Running the Code ....................................................... 47 3.3.2 Examining Register and Memory Contents ...............49 3.4 Program 2: Factorial Calculation ............................................ 51 3.5 Program 3: Swapping Register Contents ................................. 53 3.6 Program 4: Playing with Floating-Point Numbers ..................54 3.7 Program 5: Moving Values between Integer and Floating- Point Registers ......................................................................... 55 3.8 Programming Guidelines ........................................................56 3.9 Exercises ..................................................................................57 Chapter 4 Assembler Rules and Directives .........................................................59 4.1 Introduction .............................................................................59 4.2 Structure of Assembly Language Modules .............................59 4.3 Predefined Register Names .....................................................63 4.4 Frequently Used Directives .....................................................63 4.4.1 Defining a Block of Data or Code ..............................63 4.4.1.1 Keil Tools ....................................................64 4.4.1.2 Code Composer Studio Tools .....................65 4.4.2 Register Name Definition ...........................................66 4.4.2.1 Keil Tools ....................................................66

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    448 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us