Introduction to 64 Bit Intel Assembly Language Programming for Linux

0
(0)

Introduction to 64 Bit Intel Assembly Language Programming for Linux
 

  • Author:Ray Seyfarth
  • Length: 252 pages
  • Edition: 1
  • Publisher: CreateSpace Independent Publishing Platform
  • Publication Date: 2011-10-24
  • ISBN-10: 1466470038
  • ISBN-13: 9781466470033
  • Sales Rank: #5241053 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    This book is an assembly language programming textbook introducing programmers to 64 bit Intel assembly language. The book is intended as a first assembly language book for programmers experienced in high level programming in a language like C or C++. The assembly programming is performed using the yasm assembler (much like the nasm assembler) under the Linux operating system. The book primarily teaches how to write assembly code compatible with C programs. The reader will learn to call C functions from assembly language and to call assembly functions from C in addition to writing complete programs in assembly language. The gcc compiler is used for C programming. The book starts early emphasizing using the gdb debugger to debug programs. Being able to single-step assembly programs is critical in learning assembly programming. Highlights of the book include doing input/output programming using the Linux system calls and the C library, implementing data structures in assembly language and high performance assembly language programming. A companion web site has a collection of PDF slides which instructors can use for in-class presentations and source code for sample programs. Early chapters of the book rely on using the debugger to observe program behavior. After a chapter on functions, the user is prepared to use printf and scanf from the C library to perform I/O. The chapter on data structures covers singly linked lists, doubly linked circular lists, hash tables and binary trees. Test programs are presented for all these data structures. There is a chapter on optimization techniques and 3 chapters on specific optimizations. One chapter covers how to efficiently count the 1 bits in an array with the most efficient version using the recently-introduced popcnt instruction. Another chapter covers using SSE instructions to create an efficient implementation of the Sobel filtering algorithm. The final high performance programming chapter discusses computing correlation between data in 2 arrays. There is an AVX implementation which achieves 20.5 GFLOPs on a single core of a Core i7 CPU.

    Table of Contents

    Chapter 1: Introduction
    Chapter 2: Numbers
    Chapter 3: Computer memory
    Chapter 4: Memory mapping in 64 bit mode
    Chapter 5: Registers
    Chapter 6: A little bit of math
    Chapter 7: Bit operations
    Chapter 8: Branching and looping
    Chapter 9: Functions
    Chapter 10: Arrays
    Chapter 11: Floating point instructions
    Chapter 12: System calls
    Chapter 13: Structs
    Chapter 14: Using the C stream I/O functions
    Chapter 15: Data structures
    Chapter 16: High performance assembly programming
    Chapter 17: Counting bits in an array
    Chapter 18: Sobel filter
    Chapter 19: Computing Correlation

    Appendix A: Using gdb
    Appendix B: Using scanf and printf
    Appendix C: Using macros in yasm
    Appendix D: Sources for more information

    中文:

    书名:Introduction to 64 Bit Intel Assembly Language Programming for Linux

    本书是一本汇编语言编程教科书,向程序员介绍64位英特尔汇编语言。这本书是为有高级编程经验的程序员编写的第一本汇编语言书籍,如C或C++。汇编编程是在Linux操作系统下使用YASM汇编程序(与NASM汇编程序非常相似)执行的。这本书主要教授如何编写与C程序兼容的汇编代码。除了用汇编语言编写完整的程序外,读者还将学习从汇编语言调用C函数和从C调用汇编函数。GCC编译器用于C语言编程。这本书一开始就强调使用gdb调试器来调试程序。能够单步编写汇编程序是学习汇编编程的关键。该书的亮点包括使用Linux系统调用和C库进行输入/输出编程,用汇编语言实现数据结构和高性能汇编语言编程。一个配套的网站有一组PDF幻灯片,教师可以用来进行课堂演示和示例程序的源代码。本书的前几章依赖于使用调试器来观察程序行为。在函数一章之后,用户准备使用C库中的printf和scanf来执行I/O。数据结构一章介绍了单链表、双链表、哈希表和二叉树。给出了针对所有这些数据结构的测试程序。其中有一章是关于优化技术的,有三章是关于具体优化的。其中一章介绍了如何使用最近引入的Popcnt指令以最高效的形式高效地计算数组中的1位。另一章介绍使用SSE指令创建Sobel过滤算法的有效实现。高性能编程的最后一章讨论了计算两个数组中的数据之间的相关性。有一个AVX实现,它在酷睿i7CPU的单核上实现了20.5GFLOPS。

    Table of Contents

    Chapter 1: Introduction
    第二章:数字
    第三章:计算机内存
    第4章:64位模式下的内存映射
    第5章:登记册
    第六章:一点数学知识
    Chapter 7: Bit operations
    第8章:分支和循环
    第九章:职能
    第十章:数组
    第11章:浮点指令
    Chapter 12: System calls
    第13章:结构
    第14章:使用C流I/O函数
    第15章:数据结构
    第16章:高性能汇编语言编程
    第17章:计算数组中的位数
    Chapter 18: Sobel filter
    Chapter 19: Computing Correlation

    Appendix A: Using gdb
    附录B:使用scanf和printf
    附录C:在YASM中使用宏
    附录D:更多信息来源

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册