Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Assembly Language Step by Step Programming with DOS and Linux 2nd Ed 2000.pdf
Скачиваний:
156
Добавлен:
17.08.2013
Размер:
4.44 Mб
Скачать

Assembly Language Step-by-Step: Programming with

DOS and Linux, Second Edition

by Jeff Duntemann

ISBN:0471375233

John Wiley & Sons © 2000 (613 pages)

 

A “Lost World” journey into 16-bit assembler programming concepts and techniques.

<?xml version="1.0" encoding="ISO-8859-1"?>

Table of Contents

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

Chapter 2 - Alien Bases Getting Your Arms around Binary and Hexadecimal Chapter 3 - Lifting the Hood Discovering What Computers Actually Are

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

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.

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

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

Chapter 8 - Our Object All Sublime Creating Programs that Work

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

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

Chapter 11 - Stringing Them Up Those Amazing String Instructions

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

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

Conclusion - Not the End, But Only the Beginning

Appendix A - Partial 8086/8088 Instruction Set Reference

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

List of Figures

List of Tables

Back Cover

The bestselling guide to assembly language--now updated and expanded to include coverage of Linux.

This new edition of the bestselling guide to assembly programming now covers DOS and Linux! The Second Edition begins with a highly accessible overview of the internal operations of the Intel-based PC and systematically covers all the steps involved in writing, testing, and debugging assembly programs.

Expert author Jeff Duntemann then presents working example programs for both the DOS and Linux operating systems using the popular free assembler NASM. He also inlcudes valuable infomation on how to use procedures and macros, plus rare explanations of assembly-level coding for Linux, all of which combine to offer a comprehensive look at the complexitites of assembly programming for Intel processors.

Providing you with the foundation to create executable assembly language programs, this book:

Explains how to use NASM-IDE, a simple program editor and assembly-oriented development environment

Details the most used elements of the 86-family instruction set

Teaches about DEBUG, the single most useful tool you have as an assembly language programmer Examines the operations that machine instructions force the CPU to perform

Discusses the process of memory addressing

Covers coding for Linux

About the Author

Jeff Duntemann is the Editor-in-Chief of Visual Developer Techniques, the "Structured Programming" columnist for than twenty programming books.

magazine, former editor of Turbo Technix and PC Dr. Dobb’s Journal, and has written and edited more

Assembly Language Step-by-Step—Programming

with DOS and Linux, Second Edition

Jeff Duntemann

Wiley Computer Publishing John Wiley & Sons, Inc.

NEW YORK • CHICHESTER • WEINHEIM • BRISBANE • SINGAPORE • TORONTO

Publisher: Robert Ipsen

Editor: Cary Sullivan

Managing Editor: Micheline Frederick

Text Design & Composition: North Market Street Graphics

Designations used by companies to distinguish their products are often claimed as trademarks. In all instances where John Wiley & Sons, Inc., is aware of a claim, the product names appear in initial capital or ALL CAPITAL LETTERS. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration.

Copyright © 2000 by Jeff Duntemann.

All rights reserved.

Published by John Wiley & Sons, Inc.

Published simultaneously in Canada.

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 605 Third Avenue, New York, NY 10158-0012, (212) 850-6011, fax (212) 850-6008, E-Mail: <PERMREQ @ WILEY.COM>.

This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold with the understanding that the publisher is not engaged in professional services. If professional advice or other expert assistance is required, the services of a competent professional person should be sought.

Library of Congress Cataloging-in-Publication Data:

Duntemann, Jeff.

Assembly language step-by-step : programming with DOS and Linux / Jeff Duntemann.—2nd ed. p. cm.

Rev. ed. of: Assembly language, © 1992.

ISBN 0-471-37523-3 (paper/CD-ROM : alk. paper)

1. Assembler language (Computer program language)I. Duntemann, Jeff. Assembly language.II. Title.

QA76.73.A8 D88 2000 005.265—dc21 00-020611

10 9 8 7 6 5 4 3 2 1

To the eternal memory of Kathleen M. Duntemann, Godmother 1920–1999 who gave me books when all I could do was put teeth marks on them. There are no words for how much I owe you!

Acknowledgments

First of all, to the authors of the software that I am honored to provide by their permission on this book's CD-ROM:

Robert Anderton, author of NASM-IDE: www.inglenook.co.uk/nasmide/

Anthony Williams, author of ALINK: http://alink.home.dhs.org/

And, of course, the NASM team: Julian "Jules" Hall, Simon Tatham, H. Peter Anvin, John Fine, Kendall Bennet, Gary Clark, and Andrew Crabtree: www.web-sites.co.uk/nasm/

Because of their generosity, there is "nothing else to buy." Everything you need to program in assembly is right here on the CD-ROM for this book.

Abundant thanks also go to Bill Schindler, for teaching me the ways of the C library, and Michael Abrash, who has always has been the rock upon whom my knowledge of assembly language itself has been anchored.

Finally, to Carol, as always, for the sacramental friendship that has challenged me, shaped me, and redeemed me every day of our 30 years together and 23 years as spouses.