Book Image

Mastering Assembly Programming

By : Alexey Lyashko
3 (1)
Book Image

Mastering Assembly Programming

3 (1)
By: Alexey Lyashko

Overview of this book

The Assembly language is the lowest level human readable programming language on any platform. Knowing the way things are on the Assembly level will help developers design their code in a much more elegant and efficient way. It may be produced by compiling source code from a high-level programming language (such as C/C++) but can also be written from scratch. Assembly code can be converted to machine code using an assembler. The first section of the book starts with setting up the development environment on Windows and Linux, mentioning most common toolchains. The reader is led through the basic structure of CPU and memory, and is presented the most important Assembly instructions through examples for both Windows and Linux, 32 and 64 bits. Then the reader would understand how high level languages are translated into Assembly and then compiled into object code. Finally we will cover patching existing code, either legacy code without sources or a running code in same or remote process.
Table of Contents (12 chapters)
Free Chapter
1
Intel Architecture

What this book covers

Chapter 1, Intel Architecture, provides a brief insight into the Intel architecture, covering processor registers and their usage.

Chapter 2, Setting Up a Development Environment, contains detailed instructions on setting up a development environment for programming in Assembly.

Chapter 3, Intel Instruction Set Architecture (ISA), introduces you to the instruction set of Intel processors.

Chapter 4, Memory Addressing Modes, gives an overview of the many memory addressing modes supported by Intel processors.

Chapter 5, Parallel Data Processing, is dedicated to the Intel architecture extensions that add support for parallel processing of multiple data.

Chapter 6, Macro Instructions, provides an introduction to one of the most powerful features of modern assemblers--their support for macro instructions.

Chapter 7, Data Structures, helps us organize data properly as there isn't much that we can do with it.

Chapter 8, Mixing Modules Written in Assembly and Those Written in High-Level Languages, gives a description of the various methods of interfacing our Assembly code with the outer world.

Chapter 9, Operating System Interface, gives you a way to discover how programs written in Assembly may interact with Windows and Linux operating systems.

Chapter 10, Patching Legacy Code, attempts to show the basics of patching existing executables, which is an art in itself.

Chapter 11, Oh, Almost Forgot, covers a few things that did not fit into any of the preceding chapters but are, nevertheless, interesting and may even be important.