
Introduction
to 64 Bit Intel Assembly Language![]() Programming for Linux The era of 64 bit computing is now. You know your computer will run faster with more RAM than 4 GB and a 32 bit computer is limited to 4 GB. With a 64 bit CPU and a 64 bit operating system you can have more RAM - more RAM for programs and more RAM for buffer cache. Your computer will run faster. In addition to allowing your computer use more RAM, running your PC in 64 bit mode will enable the use of more registers. A PC running in 32 bit mode has 8 registers - with 2 of them tied up in the stack pointer and frame pointer. In 64 bit mode the CPU has 8 additional general purpose registers and 8 additional floating point registers. These additional registers allow compilers to perform better optimization and all function parameters to be placed in registers rather than being pushed on the stack. These new registers also help your computer run faster. "Introduction to 64 Bit Intel Assembly Language Programming for Linux" teaches only 64 bit programming. You might find other books which teach 16 bit programming and 32 bit programming with a dash of 64 bit programming. In 16 bit mode the assembly programmer uses segment registers routinely. There are still segment registers in 64 bit mode, but they are not generally used in assembly programming. It is my belief that the 64 bit mode (x86-64) is easier to cope with than either 16 bit or 32 bit mode. There are some extra instructions, but the basics are generally simplified. The additional registers make programming easier. With fewer registers there is a greater need to store intermediate data in memory. With 16 general purpose registers it requires a fairly complex algorithm to strain the register capacity. This is the second edition of my assembly book. The primary change to the book is the addition of ebe to the discussion. Examples is the book are frequently illustrated using windows from ebe. I suggest downloading the source code for the book and stepping through the programs with ebe as you read the book. Ebe is an acronym for "Easy Beginner Environment" and targets teaching assembly language. It is easy to use and makes learning assembly language easier. |

ebe - Integrated Development Environment
Ebe is an integrated development environment designed to make it easier to write and debug assembly language programs. To the right is an example of the source window in ebe with a short assembly program. The red background on the line number for line 7 indicates that there is a breakpoint on line 7. The light blue background on line 8 indicates that line 8 is the next instruction to execute while debugging.
Ebe supports programming in Assembly, C, C++ and Fortran. When you click of the Run button ebe runs the appropriate compiler or assembler and then starts running your program using the gdb debugger. You use the Next, Step, Continue and Stop buttons to control the execution of your program. You can view the registers in a register window and program variables in a data window. Ebe makes is easy for you to define variables based on labels in the code or addresses contained in registers.