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.
"Sinopsis" puede pertenecer a otra edición de este libro.
Second Edition now available
I wish to thank the person who recently gave me some suggestions for improving my book. Getting feedback from readers is an important way for me to improve the book. I will be updating the book over the next few months and I will try to improve it as you have suggested.
There are instructions on page 8 of the book detailing how to assemble a program under Linux. I will try to elaborate on this more in the next version of the book. In the meantime I try to answer email sent to me as described in the preface. I will try to add more index entries to help guide people to the discussion of how to assemble.
Along with the new version of the book I provide a free integrated development environment - ebe. Ebe supports programming in Assembly, C/C++ and Fortran. High-level language support needs bit more work and I still need to add some essential features to ebe, but ebe makes it trivial for a person to enter, assemble, link and execute an assembly program. In fact you can load hello.asm from the ebe menu system, save it and execute it without typing. This is considerably easier typing Linux commands. I have been using ebe this spring for C++ programming and I have found it pretty easy to enter C++ code. I hope this adequately addresses the issue of assembling and linking, though I know that I can't foresee every problem which traps beginning assembly programmers. I will continue to try to answer questions emailed to me.
The other important issue pointed out by the reviewer is a lack of examples. There are examples in every chapter, but there is clearly room for more. I will try to add more examples.
Thanks again for reviewing my book. I hope I can remain at 3.7 or higher. I will try.
Computers have reached the limits of 32 bit CPUs. Nearly any computer will run efficiently with 8 GB of RAM which requires using a 64 bit operating system.
The latest Intel and AMD CPUs have more registers and more capabilities when running in 64 bit mode. Achieving high performance using SSE and AVX instructions dictates using or writing code in assembly language.
If you know C or C++, this book will expand your skills while clarifying exactly what your compiler does with your code.
The book progresses from simple concepts to loops, functions, arrays, structs, system calls and using C library functions. Advanced features include data structures in assembly and examples of high performance programming using SSE and AVX instructions.
"Sobre este título" puede pertenecer a otra edición de este libro.
(Ningún ejemplar disponible)
Si conoce el autor y el título del libro pero no lo encuentra en IberLibro, nosotros podemos buscarlo por usted e informarle por e-mail en cuanto el libro esté disponible en nuestras páginas web.Crear una petición