`
`The
`
`
`S-DOS® ,
`L‘ Encyclopedla
`
`
`
`
`
`
`
`Foreword, Bill Gates
`General Editor, Ray Duncan
`
`OLYMPUS EX. 1010 -1/1582
`
`OLYMPUS EX. 1010 - 1/1582
`
`
`
`
`MS-DO
`
`EnCyclopedia
`
`OLYMPUS EX. 1010 - 2/1582
`
`OLYMPUS EX. 1010 - 2/1582
`
`
`
`
`
`Published by
`Microsoft Press
`A Division of Microsoft Corporation
`16011 NE 56th Why, Box 97017, Redmond, Washington 98073—9711?
`Copyright © 1988 by Microsoft Press
`All rights reserved. No part ofthe contents of this book
`may be reproduced or transmitted in any form or by any means
`without the written permission of the publisher.
`
`Library of Congress Cataloging in Publication Data
`The MS-DOS encyclopedia : versions 1.0 through 3.2 /
`editor, Ray Duncan.
`p.
`cm.
`Includes indexes.
`
`1. MS—DOS (Computer operating system)
`11. Microsoft Press.
`QA?6.76.063MT4
`005.4'46-dc19
`iSBN 155615-1748
`
`1988
`
`I. Duncan. Ray, 1952—
`
`83—21452
`CIP
`
`Printed and bound in the United States ofAmerica.
`
`123456739RMRM321098
`
`Distributed to the book trade in the
`United States by Harper 3: Row.
`Distributed to the book trade in
`
`Canada by General Publishing Company. Ltd.
`Distributed to the book trade outside the
`
`United States and Canada by Penguin Books Ltd.
`
`Penguin Books Ltd. Harmondsworth, Middlesex, England
`Penguin Books Australia Ltd.. Ringwood. Victoria, Australia
`Penguin Books NZ. Ltd., 182-190 Wairau Road, Auckland 10, New Zealand
`
`British Cataloging in Publication Data available
`
`iBM®. IBM AT®, P5f2®. and TopView® are registered trademarks of International Business Machines Corporation.
`GW—BASIC®, Microsoft®, MSG), MS‘DOS®, SOFTCARD®, and XENIXtE are registered trademarks of
`Microsoft Corporation.
`
`Microsoft Press gratefully acknowledges permission to reproduce material listed below.
`Page 4: Courtesy The Computer Museum.
`Pages 5, 11, 42: Intel 4004. 8008, 8080, 8086, and 80286 microprocessor photographs. Courtesy Intel Corporation.
`Page I3: Reprinted from PopularEiectrom'cs, january 1975 Copyright © 1975 Ziff Communications Company.
`Page 15: Reprinted with permission of Rod Brock.
`Page 16: Reprinted with permission of The Seattle Times Copyright © 1983.
`Pages 19, 34, 42: IBM PC advertisements and photographs of the PC, PC/XT, and PC/AT reproduced with
`permission oflnternational Business Machines Corporation Copyright © 1981. 1982, 1984. All rights reserved.
`Page 21: “Big IBM's Little Computer” Copyright © 1981 by The New York Times Company. Reprinted by
`. permission.
`“IBM Announces New Microcomputer System” Reprinted with permission of infoWbrld Copyright © 1981.
`"IBM really gets personal" Reprinted with permission of Personal Computing Copyright © 1981.
`“Personal Computer from IBM” Reprinted from DATAMATION Magazine, October 1981 Copyright © by Cahners
`Publishing Company.
`"IBM’s New Line Likely to Shake up the Market for Personal Computers“ Reprinted by permission of The Wall
`Streetjournal Copyright © Dow Jones 8: Company, Inc. 1981. All Rights Reserved.
`Page 36: "Irresistible DOS 3.0” and “The Ascent of DOS" Reprinted from PC Techfournal,
`December 1984 and October 1986. Copyright © 1984, 1986 Ziff Communications Company.
`“MS—DOS 2.00: A Hands-On Tutorial" Reprinted by permission of PC World from Volume 1, issue 3, March 1983,
`published at 501 Second Street, Suite 600, San Francisco, CA 9410?.
`
`Special thanks to Bob O'Rear, Aaron Reynolds, and Kenichi ikeda.
`
`OLYMPUS EX. 1010 - 3/1582
`
`OLYMPUS EX. 1010 - 3/1582
`
`
`
`Encyclopedia Staff
`
`Editor-in-Chief: Susan Lammers
`
`Editorial Director: Patricia Pratt
`
`Senior Editor: Dorothy L. Shattuck
`
`Senior Technical Editor: David L. Rygrnyr
`
`Special Projects Editor: Sally A. Brunsman
`
`Editorial Coordinator: Sarah Hersack
`
`Associate Editors and Technical Editors:
`
`Pamela Beason, Ann Becherer, Bob Combs,
`Michael Halvorson, Jeff Hinsch, Dean Holmes,
`Chris Kinata, Gary Masters, Claudette Moore,
`Steve Ross, Roger Shanafelt, Eric Stroo,
`Lee,Thomas, JoAnne Woodcock
`
`Copy Chief: Brianna Morgan. Proofreaders:
`Kathleen Atkins, Julie Carter, Elizabeth
`Eisenhood, Matthew Eliot, Patrick Forgette,
`Alex Hancock, Richard Isomaki, Shawn Peck,
`Alice Copp Smith
`
`Editorial Assistants: Wallis Bolz, Charles Brod,
`Stephen Brown, Pat Erickson, Debbie Kern, Susanne
`Mthoton, Vihn Nguyen, Cheryl VanGeystel
`
`Index: Shane-Armstrong Information Services
`
`Production: Larry Anderson, Jane Bennett, Rick
`Bourgoin, Darcie S. Furlan, Nick Gregoric, Peggy
`Herman, Lisa Iversen, Rebecca Johnson, Ruth Pettis,
`Russell Steele, Jean Trenary, Joy Ulskey
`
`Marketing and Sales Director: James Brown
`
`Director of Production: Christopher D. Banks
`
`Publisher: Min S. Yee
`
`OLYMPUS EX. 1010 - 4/1582
`
`OLYMPUS EX. 1010 - 4/1582
`
`
`
`
`
`Contributors
`
`Duncan received a BA. in Chemistry from the University of Califor—
`Bay Duncan, General Editor
`nia, Riverside, and an MD. from the University of California, Los Angeles, and subsequently received
`specialized training in Pediatrics and Neonatology at the Cedars-Sinai Medical Center in Los Angeles. He
`has written many articles for personal computing magazines, including BYTE, PC Magazine, Dr: Dobb’s
`Journal, and Softahh/PC. and is the author of the Microsoft Press book AdmncedMS—DOS. He is the
`founder of Laboratory Mierosystems Incorporated, a software house specializing in FORTH interpreters
`and compilers.
`
`Bostwick holds a 3.5. in Physics from the University of California, Los Angeles, and
`Steve Basin-id:
`has over 20 years' experience in scientific and commercial data processing. He is president of Query
`Computing Systems, Inc., a software firm specializing in the Creation of systems for applications that
`interface microcomputers with specialized hardware. He is also an instructor for the UCLA Extension
`Department of Engineering and Science and helped design their pepulat Microprocessor Hardware and
`Software Engineering Certificate Program.
`
`Born and raised in Orange County. California, Burgoyne began programming in
`Keith Enigma
`1974 on IBM 570 mainframes. In 1979, he began developing microcomputer products for Apples,
`TRS—Bfls, Ataris, Commodores, and lBM PCs. He is presentlyr Senior Systems Engineer at Local Data of
`Torrance, California, which is a maior producer of IBM 31?4/3274 and System 5X protocol conversion
`products. His previous writing credits include numerous user manuals and tutorials.
`
`Byers is the author of the bestselling Eueryman’s Database Primer. He is presently
`Robert/I. Byers
`involved with the Emerald Bay database proiecr with RSPI and Migent, Inc.
`
`During 11 years working with personal computers, Hogan has been a software devel-
`Mom Hogan
`oper, a programmer, a technical writer, a marketing manager, and a lecturer. He has written six books,
`numerous magazine articles, and four manuals. Hogan is the author of the forthcoming Microsoft Press
`book PC Progra mmer's Son rcebook.
`
`Kyle has 23 years” experience in computing. Since 196?, he has been a systems program-
`fim Kyle
`mer with strong telecommunications orientation. His interest in microcomputers dates from 1975. He is
`currently M15 Administrator for BTI Systems, inc, the OEM Division of BancTec Inc, manufacturers of
`MICR equipment for the banking industry. He has written 14 books and numerous magazine articles
`(mostly on ham radio and hobby electronics) and has been primary Forum Administrator for Computer
`Language Magazine‘s CLMFORUM on CompuServe since early 1985.
`
`Letwin is ChiefArchitoct, Systems Software, Microsoft Corporation. He is the author
`Gordon Letwin
`of inside 05/2, published by Microsoft Press.
`
`Petzold holds an MS. in Mathematics from Stevens Institute of Technology. Before
`diaries Pemfd
`launching his writing career, he worked 10 years in the insurance industry, programming and teaching
`programming on [BM mainframes and PCs. He is the author of the Microsoft Press book Programming
`Windows 2.0, a contributing editor to PC Magazine, and a frequent contributor to the Microsoft Systems
`journal
`
`Rabinowitz has been a programmer for 11 years. He is presently chief program-
`Chip Rabinowitz
`mer for Productivity Solutions, a microcomputer consulting firm based in Pennsylvania, and has been
`Forum Administrator for the CompuServe MICROSOFT SIG since 1986.
`
` E
`
`{-
`'
`
`Contributors
`
`vii
`
`
`
`
`
`OLYMPUS EX. 1010 - 5/"1'523‘2‘
`
`OLYMPUS EX. 1010 - 5/1582
`
`
`
`Jim Tomldn
`Tomlin holds a 13.5. and an MS. in Mathematics, He has programmed at Boeing,
`Microsoft, and Opcon and has taught at Seattle Pacific University. He now heads his own company in
`Seattle, which specializes in PC systems programming and industrial machine vision applications.
`Richard Wilton Wilton has programmed extensively in PL/l, FORTRAN, FORTH, C, and several
`assembly languages. He is the author of Programmer’s Guide to PC {BPS/2 Video Systems, published
`by Microsoft Press.
`
`Van Wolverton
`
`A professional writer since 1963, Wolverton has had bylines as a newspaper reporter,
`editorial writer, political columnist, and technical writer. He is the author of Running MS—DOS and
`Supercharging MS—DOS, both published by Microsoft Press.
`
`William Wong Wong holds engineering and computer science degrees from Georgia Tech and
`Rutgers University. He is director of PC Labs and president of Logic Fusion, Inc. His interests include
`operating systems, computer languages, and artificial intelligence. He has written numerous magazine
`articles and a book on MS-DOS.
`
`JoAnne Woodcock Woodcock, a former senior editor at Microsoft Press, has been a writer for
`Encyclopaedm Britannica and a freelance and project editor on marine biological studies at the
`University of Southern California. She is co-editor (with Michael Halvorson) of XENDf at Work and
`co—author (with Peter Rinearson) of Microsoft Word Style Sheets, both published by Microsoft Press.
`
`Special Technical Advisor
`Mark Zbikowski
`
`Technical Advisors
`
`Paul Allen
`Steve Ballmer
`Reuben Borman
`Rob Bowman
`John Butler
`Chuck Carroll
`Mark Chamberlain
`David Chell
`Mike Colee
`Mike Courtney
`Mike Dryfoos
`Rachel Duncan
`Kurt Ec khardt
`Eric Evans
`Rick Farmer
`Bill Gates
`
`Michael Geary
`Bob Griffin
`Doug Hogarth
`James W. Johnson
`Kaamel Kermaani
`Adrian King
`Reed Koch
`James Landowski
`Chris Larson
`Thomas Lennon
`Dan Lipkie
`Marc McDonald
`Bruce McKinney
`Pascal Martin
`Estelle Mathers
`Bob Matthews
`
`David Melin
`Charles Mergentimc
`Randy Nevin
`Dan Newell
`Tani Newell
`David Norris
`Mike O’Leary
`Bob O’Rear
`Mike Olsson
`Larry Osterman
`Ridge Ostling
`Sunil Pai‘
`Tim Paterson
`Gary Perez
`Chris Peters
`Charles Petzold
`
`John Pollock
`Aaron Reynolds
`Darryl Rubin
`_
`Ralph Ryan
`Karl Schulmeisters
`Rajen Shah
`Barry Shaw
`Anthony Short
`Ben Slivka
`Jon Smirl
`Betty Stillmaker
`John Stoddard
`Dennis Tillman
`. Greg Whitten
`Natalie Yount
`Steve Zeck
`
`am’a’a‘
`
`'T‘LA llf‘ nnn n.-4ar_14‘_4 J,- 7
`
`OLYMPUS EX. 1010 - 6/1582
`
`OLYMPUS EX. 1010 - 6/1582
`
`
`
`Contents
`
`Foreword by Bill Gates
`
`Preface by Ray Duncan
`Introduction
`
`5
`
`,
`
`Section I: The Development of MS—DOS
`
`Section II: Programming in the MS-DOS Environment
`Part A: Structure of MS-DOS
`
`xi ' '
`
`xv
`xvii
`
`1
`
`47
`
`Article 1: An Introduction to MS-DOS 51
`
`The Components of MS-DOS 61
`Article 2:
`Article 3: MS—DOS Storage Devices 85
`
`Part B: Programming for MS-DOS
`
`Structure of an Application Program 107
`Article 4:
`Article 5: Character Device Input and Output 149
`Article 6:
`Interrupt-Driven Communications 167
`Article 7:
`File and Record Management 247
`Article 8: Disk Directories and Volume Labels 279
`
`Article 9: Memory Management 297
`Article 10: The MS-DOS EXEC Function 521
`
`Part C: Customizing MS-DOS
`
`Article 11: Terminate-and-Stay—Resident Utilities 347
`Article 12: Exception Handlers 385
`Article 13: Hardware Interrupt Handlers 409
`Article 14: Writing MS—DOS Filters 429
`Article 15: Installable Device Drivers 447
`
`Part D: Directions of MS-DOS
`
`Article 16: Writing Applications for Upward Compatibility 489
`Article 17: Windows 499
`
`Part E: Programming Tools
`
`1
`
`Article 18: Debugging in the MS-DOS Environment 541
`Article 19: Object Modules 643
`Article 20: The Microsoft Object Linker 701
`
`Content:
`
`1395
`
`OLYMPUS EX. 1010 - 7/1582
`
`OLYMPUS EX. 1010 - 7/1582
`
`
`
`723
`
`961
`
`1175
`
`1431
`
`Section 111: User Commands
`
`Introduction 725
`
`User commands are listed in alphabetic order. This section includes ANSI.SYS,
`BATCH, CONFIG.SYS, DRIVERSYS,~ EDLIN, RAMDRIVESYS, and VDISKSYS.
`
`Section IV: Programming Utilities
`
`Introduction 963
`
`CREF 967
`EXEZBIN 971
`EXEMOD 974
`EXEPACK 977
`LIB 980
`LINK 987
`MAKE 999
`MAPSYM 1004
`MASM 1007
`
`Microsoft Debuggers:
`
`DEBUG 1020
`SYMDEB 1054
`CodeVieW 1157
`
`Section V: System Calls
`
`Introduction 1177
`
`System calls are listed in numeric order.
`
`Appendixes
`
`Appendix A: MS-DOS Version 5.5 1453
`Appendix B:
`Critical Error Codes 1459
`.
`Appendix C:
`Extended Error Codes 1461
`Appendix D:
`ASCII and IBM Extended ASCII Character Sets 1465
`Appendix E:
`EBCDIC Character Set 1469
`Appendix F:
`ANSISYS Key and Extended Key Codes 1471
`Appendix G:
`File Control Block (FCB) Structure 1475
`Appendix H:
`Program Segment Prefix (P5P) Structure 1477
`Appendix I:
`8086/8088/80286/80386 Instruction Sets 1479
`Appendix]:
`Common MS—DOS Filenarne Extensions 1485
`Appendix K:
`Segmented (New) .EXE File Header Format 1487
`Appendix L:
`Intel Hexadecimal Object File Format 1499
`Appendix M:
`8086/8088 Software Compatibility Issues 1507
`Appendix N: An Object Module Dump Utility 1509
`Appendix 0:
`IBM PC BIOS Calls 1513
`
`Tho MCDDC Fnrvrlnhorh’fl
`
`OLYMPUS EX. 1010 - 8/1582
`
`OLYMPUS EX. 1010 - 8/1582
`
`
`
`Indexes
`
`1531
`
`Subject 1535
`Commands and System Calls 1565
`
`”nu 10m in
`OLYMPUS EXT1010 - 9/1582
`
`OLYMPUS EX. 1010 - 9/1582
`
`
`
`
`
`Foreword
`
`Microsoft’s MS—DOS is the most popular piece of software in the world. It runs on more
`than 10 million personal computers worldwide and is the foundation for at least 20,000
`applications —the largest set of applications in any computer environment. As an industry
`standard for the family of 8086—based microcomputers, MS-DOS has had a central role in
`the personal computer revolution and is the most significant and enduring factor in fur-
`thering Microsoft’s original vision— a computer for every desktop and in every home. The
`challenge of maintaining a single operating system over the entire range of 8086ba5ed
`microcomputers and applications is incredible, but Microsoft has been committed to meet-
`ing this challenge since the release of MS-DOS in 1981. The true measure of our success
`in this effort is MS-DOS‘s cominued prominence in the microcomputer industry.
`
`Since MS—DOS’s creation, more powerful and much-improved computers have entered the
`marketplace, yet each new version of MS—DOS reestablishes its position as the foundation
`for new applications as well as for old. To explain this extraordinary prominence, we must
`look to the origins of the personal computer industry. The three most significant factors in
`the creation of MS-DOS were the compatibility revolution, the development of Microsoft
`BASIC and its widespread acceptance by the personal computer industry, and IBM’s deci-
`sion to build a computer that incorporated 16bit technology.
`
`The compatibility revolution began with the Intel 8080 microproceSsor. This technolog-
`ical breakthrough brought unprecedented Opportunities in the emerging microcomputer
`industry, promising continued improvements in power, speed, and cost of desktop com-
`puting. In the minicornputer market, every hardware manufacturer had its own special
`instruction set and Operating system, so software developed for a specific machine was in-
`compatible with the machines of other hardware vendors. This specialization also meant
`tremendous duplication of effort‘each hardware vendor had to write language compilers,
`databases, and other development tools to fit its particular machine. Microcomputers
`based on the 8080 microprocessor promised to change all this because different manu—
`facturers would buy the same chip with the same instruction set.
`
`From 1975 to 1981 (the 8—bit era of microcomputing), Microsoft convinced virtually
`every personal computer manufacturer—Radio Shack, Commodore, Apple, and dozens
`of others—4:0 build Microsoft BASIC into its machines. For the first time, one common lan-
`guage cut across all hardware vendor lines. The success of our BASIC demonstrated the
`advantages of compatibility: To their great benefit, users were finally able to move appli-
`cations from one vendor‘s machine to another.
`
`M03t machines produced during this early period did not have a built-in disk drive.
`Gradually, however, floppy disks, and later fixed disks, became less expensive and more
`common, and a number of disk-based programs, including WordStar and dBASE, entered
`the market. A standard disk operating system that could accommodate these develop-
`ments became extremely important, leading Lifeboat, Microsoft, and Digital Research all to
`support CP/M—SU, Digital Research’s 8080 D08.
`
`xiii
`Foreword
`IIIIA‘AIFI I_\I AAA“ AAIAL-nh
`
`
`
`
`
`
`OLYMPUS EX. 1010 - 10/1582
`
`OLYMPUS EX. 1010 - 10/1582
`
`
`
`3,5'.3
`
`The 8-bit era proved the importance of having a multiple-manufacturer standard that
`permitted the free interchange of programs. It was important that software designed for
`the new 16-bit machines have this same advantage. No personal computer manufacturer in
`1980 could have predicted with any accuracy how quickly a third—party software industry
`would grow and get behind a strong staridard— a standard that would be the software
`industry’s lifeblood. The intricacies of how MS—DOS became the most common 16bit
`operating system, in part thr0ugh the work we did for IBM, is not the key point here. The
`key point is that it was inevitable for a popular operating system to emerge for the 16-bit
`machine, just as Microsoft’s BASIC had prevailed on the 8—bit systems.
`
`It Was overwhelmingly evident that the personal computer had reached broad acceptance
`in the market when Time in 1982 named the personal computer “Man of the Year.” MS—
`DOS was integral to this acceptance and pOpularity, and we have continued to adapt
`MS-DOS to support more powerful computers without sacrificing the compatibiiity that is
`essential to keeping it an industry standard; The presence of the 80386 microprocessor
`guarantees that continued investments in Intel-architecture software will be worthwhile.
`
`our goal with The MS—DOS Enqxiopedia is to provide the most thorough and accessible
`resource available anywhere for MS—DOS programmers. The length of this book is many
`times greater than the source listing of the first version of MS-DOS -—evidence of the
`growing complexity and sophistication of the operating system. The encyclopedia will be
`especially useful to software developers faced with preserving continuity yet enhancing
`the portability of their applications.
`
`Our thriving industry is committed to exploiting the advantages offered by the protected
`mode introduced with the 80286 microprocessor and the virtual mode introduced with the
`80386 microprocessor. MS-DOS will continue to play an integral part in this effort. Faster
`and more powerful machines running Microsoft OS/2 mean an exciting future of multi-
`tasking systems, networking, improved levels of data protection, better hardware memory
`management for multiple applications, stunning graphics systems that can display an inno-
`vative graphical user interface, and communication subsystems. MS-DOS version 3, which
`runs in real mode on 80286-based and 80586—based machines, is a vital link in the Family
`API of 08/2. Users will continue to benefit from our commitment to improved operating-
`system performance and usability as the future unfolds.
`
`Bill Gates
`
`W's:
`
`Tho Mtnnc Fmrqmlnfladl'r!
`
`OLYMPUS EX. 1010 -11/1582
`
`OLYMPUS EX. 1010 - 11/1582
`
`
`
`
`
`
`
`_ Preface In the space of six years, MS-DOS has become the most widely used computer operating
`
`system in the world, running on more than 10 million machines. It has grown, matured,
`and stabilized into a flexible, easily extendable system that can support networking,
`graphical user interfaces, nearly any peripheral device, and even CD ROMS containing
`massive amounts of On-line information. MS—DOS will be with us for many years to come
`as the platform for applications that run on low—cost, 8086/8088—based machines.
`
`Not surprisingly, the success of MS—DOS has drawn many writers and publishers into its
`orbit. The number of books on MS—DOS and its commands, languages, and applications
`dwarfs the list of titles for any other operating system. Why, then, yet another book on
`MS-DOS? And what can we say about the operating system that has not been said already?
`
`First, we have written and edited The MS-DOSEncyciopedfa with one audience in mind:
`the community of working programmers. We have therefore been free to bypass elemen-
`tary subjects such as the number of bits in a byte and the interpretation of hexadecimal
`numbers. Instead, we have emphasized detailed technical explanations, working code ex—
`amples that can be adapted and incorporated into new applications, and a systems view of
`even the most common MS—DOS commands and utilities.
`
`Second, because we were not subject to size restrictions, we have explored topics in depth
`that other MS—DOS books mention only briefly, such as exception and error handling,
`interruptdriven communications, debugging strategies, memory management, and install-
`able device drivers. We have commissioned definitive articles on the relocatable object
`' modules generated by Microsoft language translators, the operation of the Microsoft Ob-
`ject Linker, and terminate-and—stay-resident utilities. We have even interviewed the key
`developers of MS—DOS and drawn On their files and bulletin boards to offer an entertain—
`ing, illustrated account of the origins of Microsoft‘s standard-setting operating system.
`
`Finally, by combining the viewpoints and experience of non—Microsoft programmers and
`writers, the expertise and resources of MicrOsoft software developers, and the publishing
`know—how of Microsoft Press, we have assembled a unique and comprehensive reference
`to MS—DOS services, commands, directives, and utilities. In many instances, the manu-
`scripts have been reviewed by the authors of the Microsoft tools described.
`
`We have made every effort during the creation of this book to ensure that its contents are
`timely and trustworthy. In a work of this Size, however, it is inevitable that errors and omis-
`sions will occur. If you discover any such errors, please bring them to our attention so that
`they can be repaired in future printings and thus aid your fellow programmers. To this
`end, Microsoft Press has established a bulletin board on MCI Mail for posting corrections
`and comments. Please refer to page xvi for more information.
`I
`
`Ray Duncan
`
`Preface
`OLYMPUS Ex.xio1o - 12/1582
`
`OLYMPUS EX. 1010 - 12/1582
`
`
`
`
`
`
`
`Introduction
`
`The MS—DOS Encyclopedia is the most comprehensive reference work available on
`Microsoft’s industry-standard operating system. Written for experienced microcomputer
`users and programmers, it contains detailed, version-specific information on, all the
`MS—DOS commands, utilities, and system calis, plus articles by recognized experts in
`specialized areas of MS—DOS programming. This wealth of material is organized into
`major topic areas, each with a format suited to its content. Special typOgraphic conven-
`tions are also used to clarify the material.
`
`Organization of the Book
`
`The MS-DOS Encyciopedia is organized into five major sections, plus appendixes. Each
`section has a unique internal organization; explanatory introductions are included where
`appropriate.
`
`Section I, The Development of MS—DO'S, presents the history of Microsoft’s standard-
`setting operating system from its immediate predecessors through version 5.2. Numerous
`photographs, anecdotes, and quotations are included.
`
`Section 11, Programming in the MS-DOS Environment, is divided into five parts: Structure
`of MS-DOS, Programming for MS-DOS, Customizing MS—DOS, Directions of MSDOS, and
`Programming Tools. Each part contains several articles by acknowledged experts on these
`topics. The articles include numerous figures, tables, and programming examples that pro-
`vide detail about the subject.
`
`Section III, User Commands, presents all the MS—DOS internal and external commands in
`alphabetic order, including ANSISYS, BATCH, CONFIGSYS, DRIVERSYS, EDLIN,
`RAMDRIVEBYS, and VDISKSYS. Each command is presented in a structure that allows
`the experienced user to quickly review syntax and restrictions on variables; the less
`experienced user can refer to the detailed discussion of the command and its uses. .
`
`Section IV, Programming Utilities, uses the same format as the User Commands section to
`present the Microsoft programming aids, including the DEBUG, SYMDEB, and CodeView
`debuggers. Although some of these utilities are supplied only with Microsoft language
`products and are not included on the MS-DQS system or supplemental disks, their use is
`intrinsic to programming for MS—DOS, and they are therefore included to create a corn-
`prehensive reference.
`
`In trndufin‘nfl
`
`xm’z‘
`
`OLYMPUS EX. 1010 - 13/1582
`
`OLYMPUS EX. 1010 - 13/1582
`
`
`
`_
`.- updates to The M's-DOS Encyclopedia.
`_
`Periodically, the 5141151 The MS—DOS EncyclopediaWill pnblish updates containing
`_ clarifications or corrections tothe information presented'In thiscurrent edition. To ob~ _
`tain inforrnation aboutreceiving these updates, please checlf: the appropriate box on the '
`buSine'ss reply card_in the back of.this book or send your name and address to: MS—DOS _
`'- Encyclopedia Update Information, c/o MicrosoftPress, 16011”NE $6thWay-g.Box 97017 '
`' RedmondWA 9807s9717.
`
`_
`
`'
`I
`
`-
`
`..
`._-I-
`Bulletin Board Servrce
`- Microsoft Press15 sponsoIing abulletinboardon MCI Mail.for postingandreceiving Cor.-
`rections and comments for TheMS—DOSEncyclopedia Touse thisservice,logo-1'1 toMCI
`- 'Mail and after reCeiving the prompt; type
`'
`-
`--
`-
`-
`-
`.
`-
`-
`-
`: VIEW cantata
`. The Bulktin Booedname promptwillbe displayedThen type I
`Mspksss cannery "
`I-to conned to the Microsoft Press bulletin boardAliSI:of the.indiwdual Microsoft Press
`- bulletin boards will be displayed, simplychooseMSPressDOSENC‘Ytoentertheen? -
`' cyclopediasbulletin board.
`.-
`-
`.
`.
`.
`..
`.
`..
`.
`.
`.
`
`'-
`
`I
`
`-
`
`-
`
`'
`
`.
`
`'
`'
`._
`"
`_ Specml Companion Disk Offer
`Microsoft Press has created a set ofvaluable,time saving compamon diskstoTkéMS-DOS '
`-' Encydopedi'a. They contain theroutines and functional programs that are listed_t__hroug_t_1—-I
`out this book—thousands of. lines of. executable code. Conveniently organIZed- these I
`disks Will save youhours of typing tinie and allowyouto Start using. thecode immediately.-
`The _cotnpanion disks _are only available direcrly- froIn"Microsoft Press. To order,- use the _
`special bindin card in the back ofthe book or send$4995 fereachset of disks plus sales
`tax if applicable and $5 50-per dishfor domestic postage andhandling, $800 per disk for
`I foreign orders, to} MiCrosoft Press,Attn: CornpanionDisk”Offer, 21919 20th Ave __SE., Box '_
`'3011, Bothell, WA 98041-3011 Please specify 5.25inch or3.S—inchformat. Payment mnst be
`in U.S funds You may pay by checkor mOney order (payable to Microsoft Press); or by
`_ American Express VISA, or MasterCard; please inelude-y_ou_r credit cardnumber and ex-
`piration date. All domestic orders are shipped 2nd day-Iair upon receipt of order by _
`'Microsoft
`-
`-
`-
`I
`
`_
`
`-
`
`. CA residents 5% plus local option tax,.CT 75%, FL 6% MA 5%, 311N696, MO4.225%,NY4% pluslocal
`. option tax WA_State 7.8%-
`..
`.
`.
`.
`
`xvi
`
`The 1145—1305 Encyclopedia
`
`OLYMPUS EX. 1010 - 14/1582
`
`OLYMPUS EX. 1010 - 14/1582
`
`
`
`
`
`
`
`
`
`Italic font indicates user-supplied variable names, procedure names in text, parameters
`whose values are to be supplied by the user, reserved words in the C programming lan-
`guage, messages and return values in text, and, occasionally, emphasis.
`
`A typographic distinction is made between lowercase l and the numeral} in both text and
`program listings.
`
`Cross—references appear in the form SECTION NAME: PART NAME, COMMAND NAME, OR IN—
`TERRUPT NUMBER: Article Name or Function Number.
`
`Color indicates user input and program examples.
`
`Terminology
`
`Although not an official IBM name, the term PC—DOS in this book means the IBM imple—
`mentation of MS—DOS. If PC—DOS is referenced and the information differs from that for
`
`the related MS-DOS version, the PC-DOS version number is included. To avoid confusion,
`the term D05 is never used without a modifier.
`
`The names of special function keys are spelled as they are shown on the IBM PC keyboard.
`In particular, the execute key is called Enter, not Return. When <Enter> is included in a
`user—entry line, the user is to press the Enter key at the end of the line.
`
`The common key combinations, such as Ctrl—C and Ctrl—Z, appear in this form when the
`actual key to be pressed is being discussed but are written as Control-C, Control-Z, and so
`forth when the resulting code is the true reference. Thus, an article might reference the
`Control—C handler but state that it is activated when the user presses Ctrl-C.
`
`Unless specifically indicated, hexadecimal numbers are used throughout. These numbers
`are always followed by the designation H (h in the code portions of program listings).
`Ranges of hexadecimal values are indicated with a dash —for example, 07—0AH.
`
`The notation (more) appears in italic at the bottom of program listings and tables that are
`continued on the next page. The complete caption or table title appears on the first page
`of a continued element and is designated Continued on subsequent pages.
`
`Introduction
`
`xix
`
`OLYMPUS EX. 1010 - 15/1582
`
`OLYMPUS EX. 1010 - 15/1582
`
`
`
`Section V, System Calls, documents Interrupts 20H through 27H and Interrupt ZFH. The
`Interrupt 21H functions are listed in individual entries. This section, like the User Com-
`mands and Programming Utilities sections, presents a quick review of usage for the ex—
`perienced user and also provides extensive notes for the less—experienced programmer.
`
`The 15 appendixes provide quick-reference materials, including a summary of MS—DOS
`version 3. 3 the segmented (new) .EXE file header format an object file dump utility, and
`the Intel hexadecimal object file format Much of this materialIS organized into tables or
`bulleted lists for ease of use.
`The book includes two indexes —— one organized by subject and one organized by com—
`mand name or system-call number. The subject index provides comprehensive references
`to the indexed topic; the command index references only the major entry for the com-
`mand or system call.
`
`Program Listings
`
`The MS—DOS Encyclopedia contains numerous program listings in assembly language, C,
`and QuickBASIC all designed to run on the IBM PC family and compatibles. Most of these
`programs are complete utilities, some are routines that can be incorporated into function-
`ing programs Vertical ellipses are often used to indicate where additional code would be
`supplied by the user to create a more functional program All program listingsare heavily
`commented and are essentially self-documenting.
`
`The programs were tested using the Microsoft Macro Assembler (MASM) version 4.0, the
`Microsoft C Compiler version 4.0, or the Microsoft QuickBASIC Compiler version 20
`The functional programs and larger routines are also available on disk Instructions for
`ordering are on the page preceding this introductionand on the mail-in card bound into
`this volume
`
`Typography and Terminology
`
`Because The MS—DOS Encyclopedia was-designed for an advanced audience, the reader
`_ generally will be familiar with the notation and typographic conventions used in this
`volume. However, for ease of use, a few special conventions should be noted.
`
`Typographic conventions
`
`Capital letters are used for MS-DOS internal and external commands in text and syntax
`lines. Capital letters are also Used for filenames in text.
`
`‘
`
`OLYMPUS EX. 1010 - 16/1582
`
`OLYMPUS EX. 1010 - 16/1582
`
`
`
`
`h.
`
`‘~
`
`'1fo
`
`
`
`
`
`OLYMPUS EX. 1010 - 17/1582
`
`
`
`__§____w_____m
`
`OLYMPUS-EX. 1010- 18/1582
`
`OLYMPUS EX. 1010 - 18/1582
`
`
`
`
`1975
`
`The Development of MS-DOS
`
`To many people who use personal computers, MS-DOS is the key that unlocks the power
`of the machine. It is their most Visible connection to the hardware hidden inside the
`
`cabinet, and it is through MS—DOS that they can run applications and manage disks and
`disk files.
`
`In the sense that it opens the door to doing work with a personal computer, MS-DOS is
`indeed a key, and the lock it fits is the Intel 8086 family of microprocessors. MS-DOS and
`the chips it works with are, in fact, closely connected — so closely that the story of
`MS—DOS is really part of a larger history that encompasses not only an operating system
`but also a microprocessor and, in retrospect, part of the explosive growth of personal
`computing itself.
`
`Chronologically,