Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

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.

"Warlight" by Michael Ondaatje
A dramatic coming-of-age story set in the decade after World War II, "Warlight" is the mesmerizing new novel from the best-selling author of "The English Patient." Learn more

Editorial Reviews

About the Author

Ray Seyfarth was born in Natchez, Mississippi in 1953. He went to public schools in Natchez and earned a B.S. degree in Mathematics from Delta State University in 1974. In 1978 he completed an M.S. degree in Mathematics from the University of Southern Mississippi. He worked for 5 years as a scientific programmer at NASA beginning in 1977. His work at NASA included Fortran and Assembly programming for remote sensing and image processing on a variety of 16 and 32 bit computers. In 1984 we returned to school at the University of Florida to study Computer Science. He completed his Ph.D. at Florida in 1989. From 1990 to 2012 Dr. Seyfarth taught Computer Science at the University of Southern Mississippi. He taught a wide variety of subjects and enjoyed learning new languages and algorithms. He retired from Southern Miss in 2012 and since retirement has spent his time writing, programming, woodworking and gardening.

Top customer reviews

There was a problem filtering reviews right now. Please try again later.

EDIT: The criticisms I had below still hold, but I've increased my rating from 2 to 4 stars. Oddly enough, right around page 50, the quality of the book dramatically improved. I haven't spotted errors, and it became substantially more readable. Overall, this book is pretty good way to get a decent idea of how to read and work with x86 64-bit assembly for Linux/OS X in only about 200 pages. I suspect that if I wanted to really become proficient with assembly, I'd need another, more comprehensive work. But I'm content with having the ability to read and understand assembly when I come across it, and this book is sufficient for that goal.-----------------------------------------------------------------------------------------------------------------------------------------

I am only about 50 pages in, and will update if my view changes.

Unfortunately, the book seems riddled with typos and mistakes. For instance, pages 32-35 on reading memory with ebe:-he completely changes several lines in the example program from what it was just a couple pages earlier, with no explanation for why, and then uses one of the changed lines as a breakpoint-in the "define variable" menu that he directs the reader to, he mentions a "size" parameter that can be adjusted. This parameter doesn't seem to exist in my system...and it doesn't even exist in the supporting screenshots in the book. What gives?-Attempting to follow his instructions, I am simply not seeing the same behavior

That being said, the information itself seems good, so I hope it gets better. I was really hoping for a good tutorial that would walk me through exercises. This seems to position itself that way, but if the examples aren't accurate then the utility of the book is substantially reduced.

I love this book so much, it's not funny. I just wish there were more of it.

Assembly programming is so exciting to me, I wish this book existed for the entire AMD64 instruction set.

Not for building your own OS, but rather for optimizing your existing programs with assembly. Shows how to view existing programs assembly code with objdump, shows how to interact with c or other compiled libraries, and how to write your own.

This book really made sense conceptually. This explains in straight forward language how processors and assembly language works. If you want to develop an understanding of assembly language this book is a good place to start. The code examples didn't seem to make sense. But after reading the book I was able to find a lot of program examples online and make sense of them. I would say this is a good book whether you are learning x86_64 assembly as a first language or you are an experienced programmer. It's also a fast read and stays interesting as far as programming books are interesting.

I bought this book to bring my 32-bit Intel assembly programming knowledge up to date. It does not disappoint. The text is clear and the author provides a very useful and free workbench (ebe) that lets you assemble your code, run it and debug it just like an IDE. The workbench lets you see the processor registers, the stack backtrace, variables and memory and many other things) all at the same time. I work almost exclusively on OS X and I couldn't get the workbench to work the first time I installed it, so I sent an email to the author and got a reply within the hour. After a couple of email exchanges, the problem was resolved (it was an issue with the installation of third party software, not the author's).

Very good read - and examples are very easy to customize and extend. If you already program for IOS but want to build super-fast routines that maximize the use of the 64 bit processor, this book is great to teach the fundamentals and get you going! Be warned that you do need to know a bit about programming... definitively not your starter book or even intermediary computing book...

I received a free copy of both versions (Windows, & (Linux, OS X ) ) in exchange for writing a review for them. This review applies to both. Both versions look like they have the same content in terms of what you learn about in 64-bit assembly.

1. just teaches 64-bit assembly programmingThese books are the only ones I found that do this. They contain other helpful info. & also non-64 bit stuff. They contain examples of assembly programs & screen-shots with info. that pertain to them.

2. learn about the ebe program which can be used for writing assembly programs; ebe is used a lot in this book.

Appendix A - Installing ebe for Linux, Mac, WindowsAppendix B - goes into ebe more ; major features of ebe

3. suitable for beginners & up4. nicely organized5. can write different C programs in assembly6. can call C functions from the assembly program ; also system calls , stream i/o7. can do high performance assembly

Cons:1. Certain parts (some in the learning info), (more in code, exercises) were difficult) Sobel Filter code (more info. in this review) some exercises- a. use advanced math b. difficulty understanding what to do

2. no solutions to any of the exercises

Suggestions:

explain the more difficult things better & with diagrams too if necessarysee if you can merge both versions of the book into 1 bookprovide solutions to the exercises

Some things not covered:how to call an assembly function from a C programhow OOP , multi-threading are translated in assembly

I don't know what values P16, P17 are but they would be invalid because with an input of 16 columns, output array should only contain 14 Sobel values. For every additional 16 columns, rbx increments by 14. The value 14 is used with addr 4001 to go to addr 4015 . As output array stores more values, it overwrites the values in [15] & [16] with correct values that are for P16, P17. OK

In my example, since there's only 16 columns, the values in [15] & [16] aren't overwritten but are left in the output array.Same issue if there's more than 1 output row. If let's say there were 2 output rows: output address for 2nd row is addr 4001 + 16 &(Row[1][1] ) which is [17] P18 OK

P16 = Row[0][15] P17 = Row[1][0]

P16 , P17 aren't overwritten.There would be 2 values per row in the output array that aren't overwritten.

39 The exponent field is ( 10000110 )65 However (if) you specify a ......114 The first parameter in a 64 bit Windows programs (is ) rcx ...129 The required space is 24 bytes, which (it) fits...132 Your program should read (and) accept....151 table mulpd , mulps - in effect column ,I think should say (multiply) not multiple161 The fifth parameter (is) placed...168 in main: (mov rbp, rsp)170 An example would be writing record number 10000 (to) a file....202 before 4. .......then look for the string in the hash table & print its value if (it's) there......213 ......use out -(of)-order232 There are also "update" files which (simply) .....237 You can ........allowing you to select (which) dock windows...242 right above Running a program : .....(including) an option delete them all.

------------------------------------------------------------------------------------------ Errata- (Linux, OS X) Book: (certain ones may also apply in the Windows book)left page number refers to (number field) at the top of the pdf page