64 bit intel assembly language programming for linux

256 1.6K 0
64 bit intel assembly language programming for linux

Đ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

Đây là bộ sách tiếng anh cho dân công nghệ thông tin chuyên về bảo mật,lập trình.Thích hợp cho những ai đam mê về công nghệ thông tin,tìm hiểu về bảo mật và lập trình.

Introduction to 64 Bit Intel Assembly Language Programming for Linux [...]... D Sources for more information D 1 D.2 D.3 D 4 D.5 D.6 D 7 yasm user manual nasm user manual Dr Paul Carter's free assembly book 64 bit Machine Level Programming GDB Manual DDD Manual Intel Documentation 229 230 232 233 233 233 233 233 234 234 234 XIV CONTENTS Chapter 1 Introduction This book is an introduction to assembly language programming for the x86 -64 architecture... First, assembly language is the poster child for non-portable code Certainly every CPU has its own assembly language and ma;ny of them have more than one The most common example is the Intel CPU family along with the quite similar AMD CPU collection The latest versions of these chips can operate in 16 bit, 32 bit and 64 bit modes In each of these modes there are differences in the assembly language. .. can increase one's speed, it is probably twice as slow even for experts This makes it more expensive to write assembly code and adds to the cost of maintenance So what is good about assembly language? The typical claim is that assembly language is more efficient than high 1 1 WHY STUDY ASSEMBLY LANGUAGE? 3 level languages A skilled assembly language coder can write code which uses less CPU time and... A computer is a machine for processing bits A bit is an individual unit of computer storage which can take on 2 values: 0 and 1 We use computers to process information, but all the information is represented as bits Collections of bits can represent characters, numbers, or any other information Humans interpret these bits as information, while computers simply manipulate the bits 1.2 1 Bytes Modern... 1 4 Assembly language Very early in the history of computing ( 1950s) , programmers developed symbolic assembly languages This rapidly replaced the use of machine language, eliminating a lot of tedious work Machine languages are con­ sidered "first-generation" programming languages, while assembly lan­ guages are considered "second-generation" Many programs continued to be written in assembly language. .. is true that assembly language can offer performance benefits, it is unlikely to outperform C/C++ for most general purpose tasks Furthermore it takes intimate knowledge of the CPU to achieve these gains In this book we will point out some general strategies for writing efficient assembly programs One advantage of assembly language is that it can do things not pos­ sible in high level languages Examples... system, though not required for application programming So far we have seen that assembly language is much more difficult to use than higher level languages and only offers benefits in special cases to well-trained programmers What benefit is there for most people? The primary reason to study assembly language is to learn how a CPU works This helps when programming in high level languages Un­ derstanding... numbers The x86 -64 architecture supports 3 different varieties of floating point numbers: 32 bit, 64 bit and 80 bit numbers These numbers are stored in IEEE 754 format Below are the pertinent characteristics of these types: Variety float double long double Bits 32 64 80 Exponent 8 11 15 Exponent Bias 127 1023 1 6383 Fraction 23 52 64 Precision "'7 digits "'1 6 digits 19 digits The IEEE format treats... different lengths for the fields In each format the highest order bit is the sign bit A negative number has its sign bit set to 1 and the remaining bits are just like the corresponding positive number Each number has a binary exponent and a fraction We will focus on the float type to reduce the number of bits involved 31 30 sign bit 23 22 exponent value 0 The exponent for a float is an 8 bit field To allow... language The goal of this book is to teach general principles of assembly lan­ guage programming It targets people with some experience in program­ ming in a high level language (ideally C or C++), but with no prior exposure to assembly language Assembly language is inherently non-portable and this text focuses on writing code for the Linux operating system, due to the free availabil­ ity of excellent . Introduction to 64 Bit Intel Assembly Language Programming for Linux

Ngày đăng: 19/03/2014, 13:31

Từ khóa liên quan

Mục lục

  • Introduction to 64 Bit Intel Assembly Language Programming for Linux

  • Preface

  • Acknowledgements

  • Contents

  • Chapter 1: Introduction

    • 1.1 Why study assembly language?

    • 1.2 What is a computer?

      • 1.2.1 Bytes

      • 1.2.2 Program execution

      • 1.3 Machine language

      • 1.4 Assembly language

      • 1.5 Assembling and linking

      • Chapter 2: Numbers

        • 2.1 Binary numbers

        • 2.2 Hexadecimal numbers

        • 2.3 Integers

          • 2.3.1 Binary addition

          • 2.3.2 Binary multiplication

          • 2.4 Floating point numbers

            • 2.4.1 Converting decimal numbers to floats

            • 2.4.2 Converting floats to decimal

            • 2.4.3 Floating point addition

            • 2.4.4 Floating point multiplication

            • Chapter 3: Computer memory

              • 3.1 Memory mapping

              • 3.2 Process memory model in Linux

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

Tài liệu liên quan