Assembly Language StepbyStep Programming with DOS and Linux 2nd Ed [Electronic resources]

Jeff Duntemann

نسخه متنی -صفحه : 166/ 1
نمايش فراداده

Sitemap

Table of Contents

BackCover

Assembly Language Step-by-Step-Programming with DOS and Linux, Second Edition

Foreword

Introduction: "Why Would You Want to Do That?

Chapter 1: Another Pleasant Valley Saturday Understanding What Computers Really Do

Had This Been the Real Thing

Do Not Pass GO

Chapter 2: Alien Bases Getting Your Arms around Binary and Hexadecimal

Counting in Martian

Octal: How the Grinch Stole Eight and Nine

Hexadecimal: Solving the Digit Shortage

From Hex to Decimal and from Decimal to Hex

Arithmetic in Hex

Binary

Hexadecimal as Shorthand for Binary

Chapter 3: Lifting the Hood Discovering What Computers Actually Are

Switches, Transistors, and Memory

The Shop Foreman and the Assembly Line

The Box That Follows a Plan

Chapter 4: The Right to Assemble The Process of Making Assembly Language Programs

DOS and DOS files

Compilers and Assemblers

The Assembly Language Development Process

DEBUG and How to Use It

Chapter 5: NASM-IDE: A Place to Stand Give me a lever long enough, and a place to stand, and I will move the Earth.

NASM-IDE''''s Place to Stand

Using NASM-IDE''''s Tools

NASM-IDE''''s Editor in Detail

Other NASM-IDE Features

Chapter 6: An Uneasy Alliance The x86 CPU and Its Segmented Memory System

The Nature of Segments

16-Bit and 32-Bit Registers

The Three Major Assembly Programming Models

Reading and Changing Registers with DEBUG

Chapter 7: Following Your Instructions Meeting Machine Instructions up Close and Personal

Assembling and Executing Machine Instructions with DEBUG

Machine Instructions and Their Operands

Reading and Using an Assembly Language Reference

Rally Round the Flags, Boys!

Using Type Specifiers

Chapter 8: Our Object All Sublime Creating Programs that Work

The Bones of an Assembly Language Program

Assembling and Running EAT.ASM

One Program, Three Segments

Last In, First Out via the Stack

Using DOS Services through INT

Chapter 9: Dividing and Conquering Using Procedures and Macros to Battle Complexity

Boxes within Boxes

Using BIOS Services

Building External Libraries of Procedures

Creating and Using Macros

Chapter 10: Bits, Flags, Branches, and Tables Easing into Mainstream Assembly Programming

Bits Is Bits (and Bytes Is Bits)

Shifting Bits

Flags, Tests, and Branches

Assembly Odds ''''n Ends

Chapter 11: Stringing Them Up Those Amazing String Instructions

The Notion of an Assembly Language String

REP STOSW, the Software Machine Gun

The Semiautomatic Weapon: STOSW without REP

Storing Data to Discontinuous Strings

Chapter 12: The Programmer''''s View of Linux Tools and Skills to Help You Write Assembly Code under a True 32-Bit OS

Prerequisites-Yukkh!

NASM for Linux

What''''s GNU?

The make Utility and Dependencies

Understanding AT&T Instruction Mnemonics

Using the GNU Debugger

Your Work Strategy

Chapter 13: Coding for Linux Applying What You''''ve Learned to a True Protected Mode Operating System

Genuflecting to the C Culture

A Framework to Build On

The Perks of Protected Mode

Characters Out

Characters In

Be a Time Lord

Generating Random Numbers

Accessing Command-Line Arguments

Simple File I/O

Conclusion: Not the End, But Only the Beginning

Where to Now?

Stepping off Square One

Appendix A: Partial 8086/8088 Instruction Set Reference

Notes on the Instruction Set Reference

AAA Adjust AL after BCD Addition

ADC Arithmetic Addition with Carry

ADD Arithmetic Addition

AND Logical AND

BT Bit Test (386+)

CALL Call Procedure

CLC Clear Carry Flag (CF)

CLD Clear Direction Flag (DF)

CMP Arithmetic Comparison

DEC Decrement Operand

IMUL Signed Integer Multiplication

INC Increment Operand

INT Software Interrupt

IRET Return from Interrupt

J? Jump on Condition

JCXZ Jump If CX=0

JECXZ Jump If ECX=0

JMP Unconditional Jump

LEA Load Effective Address

LOOP Loop until CX/ECX=0

LOOPNZ/LOOPNE Loop While CX/ECX > 0 and ZF=0

LOOPZ/LOOPE Loop While CX/ECX > 0 and ZF=1

MOV Move (Copy) Right Operand into Left Operand

NEG Negate (Two''''s Complement; i.e., Multiply by −1)

NOP No Operation

NOT Logical NOT (One''''s Complement)

OR Logical OR

POP Pop Top of Stack into Operand

POPA Pop All 16-Bit Registers (286+)

POPF Pop Top of Stack into Flags

POPFD Pop Top of Stack into EFlags (386+)

PUSH Push Operand onto Top of Stack

PUSHA Push All 16-Bit GP Registers (286+)

PUSHAD Push All 32-Bit GP Registers (386+)

PUSHF Push 16-Bit Flags onto Stack

PUSHFD Push 32-Bit EFlags onto Stack (386+)

RET Return from Procedure

ROL Rotate Left

ROR Rotate Right

SBB Arithmetic Subtraction with Borrow

SHL Shift Left

SHR Shift Right

STC Set Carry Flag (CF)

STD Set Direction Flag (DF)

STOS Store String

SUB Arithmetic Subtraction

XCHG Exchange Operands

XOR Exclusive Or

Appendix B: Segment Register Assumptions for Real Mode Segmented Model

Appendix C: Web URLs for Assembly Programmers

Appendix D: Segment Register Assumptions

Appendix E: What''''s on the CD-ROM?

Index

Index_A

Index_B

Index_C

Index_D

Index_E

Index_F

Index_G

Index_H

Index_I

Index_J

Index_K

Index_L

Index_M

Index_N

Index_O

Index_P

Index_Q

Index_R

Index_S

Index_T

Index_U

Index_V

Index_W

Index_X

Index_Z

List of Figures

List of Tables