-
出版商:
CreateSpace Independ
-
出版日期:
2014-06-30
-
售價:
$910
-
貴賓價:
9.5 折
$864
-
語言:
英文
-
頁數:
270
-
裝訂:
Paperback
-
ISBN:
1484921909
-
ISBN-13:
9781484921906
-
相關分類:
Assembly
商品描述
This is the third edition of this assembly language programming textbook introducing programmers to 64 bit Intel assembly language. The primary addition to the third edition is the discussion of the new version of the free integrated development environment, ebe, designed by the author specifically to meet the needs of assembly language programmers. The new ebe is a C++ program using the Qt library to implement a GUI environment consisting of a source window, a data window, a register, a floating point register window, a backtrace window, a console window, a terminal window and a project window along with 2 educational tools called the "toy box" and the "bit bucket". The source window includes a full-featured text editor with convenient controls for assembling, linking and debugging a program. The project facility allows a program to be built from C source code files and assembly source files. Assembly is performed automatically using the yasm assembler and linking is performed with ld or gcc. Debugging operates by transparently sending commands into the gdb debugger while automatically displaying registers and variables after each debugging step. Additional information about ebe can be found at http://www.rayseyfarth.com. The second important addition is support for the OS X operating system. Assembly language is similar enough between the two systems to cover in a single book. The book discusses the differences between the systems. 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 automatically from the ebe IDE 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 internally to compile C programs. The book starts early emphasizing using ebe to debug programs, along with teaching equivalent commands using gdb. Being able to single-step assembly programs is critical in learning assembly programming. Ebe makes this far easier than using gdb directly. 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. 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. A companion web site, http://www.rayseyfarth.com, has a collection of PDF slides which instructors can use for in-class presentations and source code for sample programs.
商品描述(中文翻譯)
這是這本組合語言程式設計教科書的第三版,介紹程式設計師使用64位元Intel組合語言。第三版的主要新增內容是討論作者專門設計的免費整合開發環境ebe的新版本,以滿足組合語言程式設計師的需求。新的ebe是一個使用Qt庫實現的C++程式,提供一個圖形使用者介面(GUI),包括源碼視窗、數據視窗、暫存器、浮點暫存器視窗、回溯視窗、控制台視窗、終端視窗和專案視窗,還有兩個教育工具,稱為「玩具箱」和「位元桶」。源碼視窗包含一個功能齊全的文本編輯器,提供方便的控制項來組合、連結和除錯程式。專案功能允許從C源碼檔案和組合源碼檔案建立程式。組合過程是自動進行的,使用yasm組合器,連結則使用ld或gcc。除錯過程透過透明地將命令發送到gdb除錯器,同時在每個除錯步驟後自動顯示暫存器和變數。關於ebe的更多資訊可以在http://www.rayseyfarth.com找到。第二個重要的新增內容是對OS X作業系統的支援。兩個系統之間的組合語言相似度足夠高,可以在一本書中涵蓋。書中討論了這些系統之間的差異。這本書旨在作為對於在C或C++等高階程式語言有經驗的程式設計師的第一本組合語言書籍。組合程式設計是使用yasm組合器自動從ebe IDE在Linux作業系統下進行的。這本書主要教導如何撰寫與C程式相容的組合碼。讀者將學會如何從組合語言呼叫C函數,以及從C呼叫組合函數,並撰寫完整的組合語言程式。內部使用gcc編譯器來編譯C程式。這本書一開始就強調使用ebe來除錯程式,並教導使用gdb的等效命令。能夠逐步執行組合程式對於學習組合程式設計至關重要。使用ebe比直接使用gdb要容易得多。這本書的重點包括使用Linux系統調用和C庫進行輸入/輸出程式設計、在組合語言中實現數據結構以及高效能的組合語言程式設計。書的早期章節依賴於使用除錯器來觀察程式行為。在一章有關函數的章節後,使用者準備使用C庫中的printf和scanf來執行I/O。數據結構的章節涵蓋了單向鏈表、雙向循環鏈表、哈希表和二叉樹。所有這些數據結構都有測試程式。還有一章關於優化技術和三章針對特定優化的內容。一章涵蓋如何有效地計算數組中的1位元,最有效的版本使用最近引入的popcnt指令。另一章則涵蓋使用SSE指令來創建Sobel濾波算法的高效實現。最後一章高效能程式設計討論計算兩個數組中數據的相關性。有一個AVX實現,在Core i7 CPU的單核心上達到20.5 GFLOPs。伴隨的網站http://www.rayseyfarth.com提供了一系列PDF幻燈片,供講師用於課堂演示,以及示範程式的源碼。