Jones and bartlett publishers introduction to 80x86 assembly language and computer architecture feb 2001 ISBN 0763717738

713 102 0
Jones and bartlett publishers introduction to 80x86 assembly language and computer architecture feb 2001 ISBN 0763717738

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Introduction to 80x86 Assembly Language and Computer Architecture by Richard C ISBN:0763717738 Detmer Jones and Bartlett Publishers © 2001 (499 pages) This text prepares the student to program effectively in any programming language, to pursue advanced studies in computer design and architecture, and to learn more about system detail for specific computers Table of Contents Introduction to 80×86 Assembly Language and Computer Architecture Preface Representing Data in a Chapter 1 Computer Parts of a Computer Chapter 2 System Elements of Assembly Chapter 3 Language Chapter 4 - Basic Instructions Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 - Branching and Looping - Procedures - String Operations - Bit Manipulation - The Assembly Process - Floating-Point Arithmetic - Decimal Arithmetic - Input/Output Hexadecimal/ASCII Appendix A conversion Useful MS-DOS Appendix B Commands MASM 6.11 Reserved Appendix C Words 80x86 Instructions (by Appendix D Mnemonic) 80x86 Instructions (by Appendix E Opcode) Index List of Figures List of Exercises Back Cover Introduction to 80x86 Assembly Language and Computer Architecture offers students a hands-on introduction to assembly language and computer architecture Students learn about architecture in the classic sense, at the assembly language level of abstraction The text presents 80x86 assembly language in the same flat 32-bit address environment employed by current operating systems Features: Highlights 32-bit flat memory model and 32-bit instructions Emphasis on architecture; students learn about registers, memory addressing, hardware capabilities, and much more Reinforcement of high-level language concepts Early introduction to assembly language programming and Microsoft’s WinDbg debugger Introduction to 80×86 Assembly Language and Computer Architecture Richard C Detmer Middle Tennessee State University JONES AND BARTLETT PUBLISHERS World Headquarters Jones and Bartlett Publishers 40 Tall Pine Drive Sudbury, MA 01776 978-443-5000 info@jbpub.com http://www.jbpub.com Jones and Bartlett Publishers Canada 2406 Nikanna Road Mississauga, ON L5C 2W6 CANADA Jones and Bartlett Publishers International Barb House, Barb Mews London W6 7PA UK Copyright © 2001 Jones and Bartlett Publishers, Inc Cover Image © Stone/Peter Poulides Library of Congress Cataloging-in-Publication Data Detmer, Richard C Introduction to 80x86 Assembly Language and Computer Architecture / Richard Detmer p cm Includes index 0-7637-1773-8 Computer architecture Assembler language (Computer program language) I Title QA76.9.A73 D48 2001 004.2′2-dc21 00-069028 All rights reserved No part of the material protected by this copyright notice may be reproduced or utilized in any form, electronic or mechanical, including photocopying, recording, or any information storage or retrieval system, without written permission from the copyright owner Senior Acquisitions Editor: Michael Stranz Development and Product Manager: Amy Rose Production Assistant: Tara McCormick Production Coordination: Trillium Project Management Composition: Northeast Compositors, Inc Copyeditor: Sarah Corey Text Design: Dartmouth Publishing, Inc Cover Design: Kristin Ohlin Printing and Binding: Courier Westford Cover printing: John Pow Company This book was typeset in Quark 4.1 on a Macintosh G4 The font families used were Serifa, Frutiger, and Courier The first printing was printed on 50# Decision 94 Opaque 05 04 03 02 01 10 9 8 7 6 5 4 3 2 1 Dedicated to my mother, Emma Langenhop Detmer Baldwin Toombs and my uncle, Carl E Langenhop both of whom encouraged me to become a scholar Preface A computer can be viewed from many different levels Many people are interested only in using applications such as word processing or games A computer programmer, however, often sees the computer as an instrument to create new applications software A high-level language programmer's image of the computer is provided by the language compiler, which gives the impression that the computer stores object types like integer, real, and array of char in named memory locations, calculates values of expressions, calls procedures, executes while loops, and so forth However, an actual computer works at even lower levels This book emphasizes the architectural level, that is, the level defined by the machine instructions that the processor can execute Assembly-language instructions translate directly into machinelanguage instructions, so that when you write an assembly-language program, you gain an understanding of how the computer works at the machine-language level Although this book emphasizes the assembly-language/machinelanguage level of computer operations, it also looks at other levels For instance, it describes how high-level language concepts such as if statements are realized at the machine level It discusses some of the functions of the operating system It briefly describes the logic gates that are used at the hardware level It also looks at how assembly language is translated into machine language To program effectively at any level, programmers must understand certain fundamental principles at the machine level These apply to most computer architectures Introduction to 80x86 Assembly Language and Computer Architecture teaches these fundamental concepts: memory addressing, CPU registers and their uses representation of data in a computer in numeric formats and as character strings instructions to operate on 2's complement integers instructions to operate on individual bits instructions to handle strings of characters instructions for branching and looping coding of procedures: transfer of control, parameter passing, local variables, and preserving the environment for the calling program The primary architecture covered is the Intel 80x86 CPU family used in many personal computers However, almost every chapter includes information about other architectures, or about different computer levels Programming in assembly language and studying related concepts in Introduction to 80x86 Assembly Language and Computer Architecture prepares the student to program effectively in any programming language, to pursue advanced studies in computer design and architecture, or to learn more about system details for specific computers Text Organization and Content Much of the material in this book is based on my previous book, Fundamentals of Assembly Language Programming Using the IBM PC and Compatibles While teaching this material through the years, I have increasingly come to the conclusion that an assembly language course is the best place to introduce computer architecture to most students This book reflects a stronger emphasis on architecture than on programming It also concentrates on general concepts as opposed to the details of a particular computer system The minimal prerequisite for my assembly language class is a good understanding of a structured high-level language Chapters 3 through 6 and Chapter 8 form the core of my one-semester course I normally cover Chapters 1-8 thoroughly, Chapter 9 quickly, and then choose topics from Chapters 10-12 depending on time and resources available For instance, I sometimes introduce floating-point operations via in-line assembly statements in a C++ program Style and Pedagogy The text primarily teaches by example A complete assembly-language program is presented very early, in Chapter 3, and its components are carefully examined at a level that the student is able to understand Subsequent chapters include many examples of assembly language code along with appropriate explanations of new or difficult concepts The text uses numerous figures and examples Many series of "before" and "after" examples are given for instructions Examples are included that illustrate the use of a debugger These examples give the student a stronger sense of what is happening inside the computer Exercises appear at the end of each section Short-answer exercises reinforce understanding of the material just covered, and programming exercises offer an opportunity to apply the material to assembly-language programs Chapter 11: Decimal Arithmetic Figure 11.1: Packed BCD to ASCII conversion Figure 11.2: ASCII to packed BCD conversion Figure 11.3: Addition of non-negative packed BCD numbers Figure 11.4: Subtraction of non-negative packed BCD numbers Figure 11.5: General BCD addition procedure Figure 11.6: Unpacked BCD instructions Figure 11.7: Addition of two 8-byte unpacked BCD numbers Figure 11.8: Multiplication of unpacked BCD numbers Figure 11.9: Division of unpacked BCD numbers Chapter 12: Input/Output Figure 12.1: Console output using kernel32 functions Figure 12.2: Standard device numbers Figure 12.3: Console I/O using kernel32 functions Figure 12.4: Input/output procedures in IO.ASM Figure 12.5: Sequential file input using kernel32 functions Figure 12.6: Create a file from console input List of Exercises Chapter 1: Representing Data in a Computer Example Exercises 1.1 Exercises 1.2 Example Example Exercises 1.3 Exercises 1.4 Exercises 1.5 Chapter 2: Parts of a Computer System Exercises 2.1 Exercises 2.2 Exercises 2.3 Chapter 3: Elements of Assembly Language Exercises 3.1 Exercises 3.2 Exercises 3.3 Programming Exercises 3.3 Exercises 3.4 Exercises 3.5 Exercises 3.6 Exercises 3.7 Chapter 4: Basic Instructions Exercises 4.1 Exercises 4.2 Programming Exercises 4.2 Exercises 4.3 Programming Exercises 4.3 Exercises 4.4 Programming Exercises 4.4 Exercises 4.5 Chapter 5: Branching and Looping Exercises 5.1 Programming Exercise 5.1 Exercises 5.2 Programming Exercises 5.2 Exercises 5.3 Programming Exercise 5.3 Exercises 5.4 Programming Exercise 5.4 Exercises 5.5 Programming Exercises 5.5 Chapter 6: Procedures Example Example Exercises 6.1 Exercises 6.2 Programming Exercises 6.2 Exercises 6.3 Programming Exercises 6.3 Exercises 6.4 Programming Exercises 6.4 Exercises 6.5 Chapter 7: String Operations Exercises 7.1 Programming Exercises 7.1 Exercises 7.2 Programming Exercises 7.2 Exercises 7.3 Programming Exercises 7.3 Exercises 7.4 Programming Exercises 7.4 Chapter 8: Bit Manipulation Exercises 8.1 Programming Exercises 8.1 Exercises 8.2 Programming Exercises 8.2 Exercises 8.3 Programming Exercises 8.3 Exercises 8.4 Chapter 9: The Assembly Process Exercises 9.1 Exercises 9.2 Programming Exercises 9.2 Exercises 9.3 Programming Exercises 9.3 Exercises 9.4 Programming Exercises 9.4 Exercises 9.5 Chapter 10: Floating-Point Arithmetic Exercises 10.1 Programming Exercises 10.2 Programming Exercises 10.3 Programming Exercises 10.4 Chapter 11: Decimal Arithmetic Exercises 11.1 Programming Exercises 11.1 Exercises 11.2 Programming Exercises 11.2 Exercises 11.3 Programming Exercises 11.3 Chapter 12: Input/Output Programming Exercises 12.1 Exercises 12.2 Programming Exercises 12.2 Exercises 12.3 ... Back Cover Introduction to 80x86 Assembly Language and Computer Architecture offers students a hands-on introduction to assembly language and computer architecture Students learn about architecture in the... Early introduction to assembly language programming and Microsoft’s WinDbg debugger Introduction to 80×86 Assembly Language and Computer Architecture Richard C Detmer Middle Tennessee State University JONES AND BARTLETT PUBLISHERS. .. Detmer, Richard C Introduction to 80x86 Assembly Language and Computer Architecture / Richard Detmer p cm Includes index 0-7637-1773-8 Computer architecture Assembler language (Computer program language) I

Ngày đăng: 26/03/2019, 17:10

Mục lục

  • Introduction to 80×86 Assembly Language and Computer Architecture

  • Instructor's Support

  • 1.3 2's Complement Representation for Signed Integers

  • 1.4 Addition and Subtraction of 2's Complement Numbers

  • 1.5 Other Systems for Representing Numbers

  • Chapter 2: Parts of a Computer System

    • 2.2 PC Hardware: The CPU

    • 2.3 PC Hardware: Input/Output Devices

    • 3.3 How to Assemble, Link, and Run a Program

    • 3.4 The Assembler Listing File

    • Chapter 4: Basic Instructions

      • 4.2 Integer Addition and Subtraction Instructions

      • 4.5 Addition and Subtraction of Larger Numbers

      • 4.6 Something Extra: Levels of Abstraction and Microcode

      • 5.2 Conditional Jumps, Compare Instructions, and if Structures

      • 5.4 for Loops in Assembly Language

      • Chapter 6: Procedures

        • 6.2 Procedure Body, Call and Return

        • 6.3 Parameters and Local Variables

        • 6.5 Other Architectures: Procedures Without a Stack

        • Chapter 7: String Operations

          • 7.2 Repeat Prefixes and More String Instructions

          • 7.4 Converting a 2's Complement Integer to an ASCII String

          • 7.5 Other Architectures: CISC versus RISC Designs

Tài liệu cùng người dùng

Tài liệu liên quan