Book description
The eagerly anticipated new edition of the bestselling introduction to x86 assembly language
The long-awaited third edition of this bestselling introduction to assembly language has been completely rewritten to focus on 32-bit protected-mode Linux and the free NASM assembler. Assembly is the fundamental language bridging human ideas and the pure silicon hearts of computers, and popular author Jeff Dunteman retains his distinctive lighthearted style as he presents a step-by-step approach to this difficult technical discipline.
He starts at the very beginning, explaining the basic ideas of programmable computing, the binary and hexadecimal number systems, the Intel x86 computer architecture, and the process of software development under Linux. From that foundation he systematically treats the x86 instruction set, memory addressing, procedures, macros, and interface to the C-language code libraries upon which Linux itself is built.
Serves as an ideal introduction to x86 computing concepts, as demonstrated by the only language directly understood by the CPU itself
Uses an approachable, conversational style that assumes no prior experience in programming of any kind
Presents x86 architecture and assembly concepts through a cumulative tutorial approach that is ideal for self-paced instruction
Focuses entirely on free, open-source software, including Ubuntu Linux, the NASM assembler, the Kate editor, and the Gdb/Insight debugger.
Includes an x86 instruction set reference for the most common machine instructions, specifically tailored for use by programming beginners
Woven into the presentation are plenty of assembly code examples, plus practical tips on software design, coding, testing, and debugging, all using free, open-source software that may be downloaded without charge from the Internet.
Table of contents
- Copyright
- About the Author
- Credits
- Acknowledgments
- Introduction: "Why Would You Want to Do That?"
- 1. Another Pleasant Valley Saturday
- 2. Alien Bases
- 3. Lifting the Hood
- 4. Location, Location, Location
-
5. The Right to Assemble
- 5.1. Files and What's Inside Them
- 5.2. Text In, Code Out
-
5.3. The Assembly Language Development Process
- 5.3.1. The Discipline of Working Directories
- 5.3.2. Editing the Source Code File
- 5.3.3. Assembling the Source Code File
- 5.3.4. Assembler Errors
- 5.3.5. Back to the Editor
- 5.3.6. Assembler Warnings
- 5.3.7. Linking the Object Code File
- 5.3.8. Linker Errors
- 5.3.9. Testing the .EXE File
- 5.3.10. Errors versus Bugs
- 5.3.11. Are We There Yet?
- 5.3.12. Debuggers and Debugging
- 5.4. Taking a Trip Down Assembly Lane
-
6. A Place to Stand, with Access to Tools
-
6.1. The Kate Editor
- 6.1.1. Installing Kate
- 6.1.2. Launching Kate
- 6.1.3. Configuration
- 6.1.4. Kate Sessions
-
6.1.5. Kate's File Management
- 6.1.5.1. Filesystem Browser Navigation
- 6.1.5.2. Adding a File to the Current Session
- 6.1.5.3. Dropping a File from the Current Session
- 6.1.5.4. Switching Between Session Files in the Editor
- 6.1.5.5. Creating a Brand-New File
- 6.1.5.6. Creating a Brand-New Folder on Disk
- 6.1.5.7. Deleting a File from Disk (Move File to Trash)
- 6.1.5.8. Reloading a File from Disk
- 6.1.5.9. Saving All Unsaved Changes in Session Files
- 6.1.5.10. Printing the File in the Editor Window
- 6.1.5.11. Exporting a File As HTML
- 6.1.6. Adding Items to the Toolbar
- 6.1.7. Kate's Editing Controls
- 6.1.8. Using Kate While Programming
- 6.2. Linux and Terminals
- 6.3. Using Linux Make
- 6.4. The Insight Debugger
-
6.1. The Kate Editor
- 7. Following Your Instructions
- 8. Our Object All Sublime
- 9. Bits, Flags, Branches, and Tables
- 10. Dividing and Conquering
-
11. Strings and Things
- 11.1. The Notion of an Assembly Language String
- 11.2. REP STOSB, the Software Machine Gun
- 11.3. The Semiautomatic Weapon: STOSB without REP
- 11.4. MOVSB: Fast Block Copies
- 11.5. Storing Data to Discontinuous Strings
- 11.6. Command-Line Arguments and Examining the Stack
- 11.7. String Searches with SCASB
-
12. Heading Out to C
- 12.1. What's GNU?
- 12.2. Linking to the Standard C Library
- 12.3. Formatted Text Output with printf()
- 12.4. Data In with fgets() and scanf()
- 12.5. Be a Time Lord
- 12.6. Understanding AT&T Instruction Mnemonics
- 12.7. Generating Random Numbers
- 12.8. How C Sees Command-Line Arguments
- 12.9. Simple File I/O
- Conclusion: Not the End, But Only the Beginning
-
A. Partial x86 Instruction Set Reference
- A.1. Notes on the Instruction Set Reference
- A.2. AAA: Adjust AL after BCD Addition
- A.3. ADC: Arithmetic Addition with Carry
- A.4. ADD: Arithmetic Addition
- A.5. AND: Logical AND
- A.6. BT: Bit Test
- A.7. CALL: Call Procedure
- A.8. CLC: Clear Carry Flag (CF)
- A.9. CLD: Clear Direction Flag (DF)
- A.10. CMP: Arithmetic Comparison
- A.11. DEC: Decrement Operand
- A.12. DIV: Unsigned Integer Division
- A.13. INC: Increment Operand
- A.14. INT: Software Interrupt
- A.15. IRET: Return from Interrupt
- A.16. J?: Jump on Condition
- A.17. JCXZ: Jump If CX = 0
- A.18. JECXZ: Jump If ECX = 0
- A.19. JMP: Unconditional Jump
- A.20. LEA: Load Effective Address
- A.21. LOOP: Loop until CX/ECX = 0
- A.22. LOOPNZ/LOOPNE: Loop While CX/ECX > 0 and ZF = 0
- A.23. LOOPZ/LOOPE: Loop While CX/ECX > 0 and ZF = 1
- A.24. MOV: Move (Copy) Right Operand into Left Operand
- A.25. MOVS: Move String
- A.26. MOVSX: Move (Copy) with Sign Extension
- A.27. MUL: Unsigned Integer Multiplication
- A.28. NEG: Negate (Two's Complement; i.e., Multiply by −1)
- A.29. NOP: No Operation
- A.30. NOT: Logical NOT (One's Complement)
- A.31. OR: Logical OR
- A.32. POP: Pop Top of Stack into Operand
- A.33. POPA/POPAD: Pop All GP Registers
- A.34. POPF: Pop Top of Stack into 16-Bit Flags
- A.35. POPFD: Pop Top of Stack into EFlags
- A.36. PUSH: Push Operand onto Top of Stack
- A.37. PUSHA: Push All 16-Bit GP Registers
- A.38. PUSHAD: Push All 32-Bit GP Registers
- A.39. PUSHF: Push 16-Bit Flags onto Stack
- A.40. PUSHFD: Push 32-Bit EFlags onto Stack
- A.41. RET: Return from Procedure
- A.42. ROL: Rotate Left
- A.43. ROR: Rotate Right
- A.44. SBB: Arithmetic Subtraction with Borrow
- A.45. SHL: Shift Left
- A.46. SHR: Shift Right
- A.47. STC: Set Carry Flag (CF)
- A.48. STD: Set Direction Flag (DF)
- A.49. STOS: Store String
- A.50. SUB: Arithmetic Subtraction
- A.51. XCHG: Exchange Operands
- A.52. XLAT: Translate Byte via Table
- A.53. XOR: Exclusive Or
- B. Character Set Charts
Product information
- Title: Assembly Language Step-by-Step: Programming with Linux®, Third Edition
- Author(s):
- Release date: October 2009
- Publisher(s): Wiley
- ISBN: 9780470497029
You might also like
book
The Art of Assembly Language, 2nd Edition
Assembly is a low-level programming language that's one step above a computer's native machine language. Although …
book
Introduction to 80x86 Assembly Language and Computer Architecture, 3rd Edition
A Revised and Updated Edition of the Authoritative Text This revised and updated Third Edition of …
book
Linux Assembly Language Programming
Master x86 assembly language from a Linux perspective! Essential information for creating Linux device drivers How …
book
Programming with 64-Bit ARM Assembly Language: Single Board Computer Development for Raspberry Pi and Mobile Devices
Mastering ARM hardware architecture opens a world of programming for nearly all phones and tablets including …