Besucher dieser Seite:

       **  Programmer's Technical Reference for MSDOS and the IBM PC **
                USA copyright TXG 392-616  ALL RIGHTS RESERVED
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ DOSREF (tm) ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
                     ISBN 1-878830-02-3 (disk-based text)
                    Copyright (c) 1987, 1992 Dave Williams
                        ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
                        ³ Shareware Version, 01/12/92 ³
                        ³  Please Register Your Copy  ³
                        ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ


  /* This work is registered directly with the copyright offices of the     */
  /* United States and of the United Kingdom, and indirectly in many other  */
  /* nations via the conventions the above are signatory to.                */
  /*           Generous licensing terms are available on inquiry.           */



                            I N T R O D U C T I O N


 This book is a technical reference. It is NOT a tutorial. Hopefully, this
book is what you'll reach for when you want find out what Peter Norton or the
"official" references glossed over.

 This manual is intended to replace the various (expensive) references needed
to program for the DOS environment, that stack of magazines threatening to take
over your work area, and those odd tables and charts you can never find when
you need them.

 The various Microsoft and IBM publications and references don't always have
the same information. This has caused some consternation about the
"undocumented" features to be found in DOS. In general, if a call doesn't
appear in the IBM DOS Technical Reference it is considered "undocumented"
although it may be documented by other OEMs or by later Microsoft tech
bulletins.

 The information here is valid for DOS 2.x through 5.x. Where there are
differences between the two versions there are notes in the text. No great
effort was expended on DOS 1.x.

 When I started writing this book, it was originally for my own personal use.
Then I began expanding it with the idea of getting it published, since at that
time there was *nothing* in print like it. (late 1987) If I had managed to
send it off to the publishers early enough, I would have had it made. As it
was I lost six months having a nice steel rod put in my leg after being run
over by a drug addict in an uninsured car, and half a dozen similar books were
published by then, and nobody was interested in mine. Six months is a long
time in the PC world.

 That's why I'm uploading this file as "user-supported." It gives me a chance
to recoup a few bucks for the time I've been working on this thing, and it
gives some advantages that a printed book can't - first, you can load it on
your hard disk and use Vern Buerg's LIST or SideKick to scan through text. You
can grab a piece of something and paste it into a document, etc. If you help
support the Reference you will always have the latest version available; you
can't "upgrade" books.

 A project this size takes a LOT of time and effort. I've tried to verify as
much of the information I've received as I could, but there's just too much for
absolute certainty.  The TechRef has been in the hands of some heavy-duty code
jockeys for a couple of years now with very few bug reports, though.

 If you find any typos, incorrect information, or want to see something else,
let me know. If you have any more detailed information on something, PLEASE let
me know!

                                                        Dave Williams



                         D  I  S  C  L  A  I  M  E  R



 As is common these days, I have to make a "Notice of Disclaimer". I take no
responsibility for anything, and if anything you do with this book ruins you
for life or makes your dog bite you, or anything else, that's just tough.

 I hope you find much use for this reference. It was a trip to write, too.

                                                        Dave Williams

                                                  (C) Copyright 1987, 1992

/* note: the above disclaimer is being used as an example in the University */
/*       of Texas' School of Law. Whether good or bad, my respondent didn't */
/*       say...                                                             */


______________________________________________________________________________

Copyrights and trademarks:

(3COM Corporation)
 3COM, Etherlink

(Allied Telephone and Telegraph)
 UNIX, AT&T

(Artisoft)
 LANtastic

(AST Corporation)
 AST, RAMpage!

(Atari Computer)
 Atari, ST, TOS

(Borland)
 Borland, Turbo C, Turbo Pascal, Turbo Lightning, Turbo Assembler, SideKick

(Commodore Business Machines)
 Amiga 2000, Bridge Board

(Compaq Computer Corp.)
 Compaq, Deskpro

(Cordata Computer)
 Corona, Cordata

(Cove Software)
 CED, PCED

(Digital Equipment Company)
 DEC, Rainbow, DECMate, DOS    (uh... yeah. DEC owns the trademark to 'DOS')

(Fox Research, Inc.)
 10-Net

(Graphic Software Systems)
 GSS, DGIS

(Hayes)
 Smartmodem

(Hercules Computer Technology)
 Hercules, HGC, Hercules Graphics Card Plus, InColor Card

(IBM Corp.)
 IBM, PC, PCjr, PC/XT, PC/AT, XT/286, PS/2, TopView, Micro Channel, 3270 PC,
 RT PC, Token Ring, OS/2

(Intel Corp.)
 Intel, iAPX286, iAPX386, LIM EMS, Communicating Applications Standard (CAS)

(Logitech, Inc)
 Logitech, Logimouse

(Microsoft Corp.)
 Microsoft, MS, MS DOS, OS/2, Xenix, Windows, Windows/286, Windows/386,
 Microsoft Networks, LIM EMS, XMA, DPMI

(Mouse Systems Corp.)
 Mouse Systems, PCMouse

(Novell Development Corp.)
 Novell, NetWare

(Phar Lap)
 VCPI, Virtual Control Program Interface

(Qalitas)
 386-To-The-Max, 386MAX

(Quarterdeck Office Systems)
 DesQview, QEMM

(SEAware, Inc)
 ARC

(Softlogic)
 DoubleDOS

(Sunny Hill Software)
 TaskView, OmniView

(Tandy Corp.)
 Tandy, Radio Shack, DeskMate

(Texas Instruments)
 TI, TI Professional, Business Professional, TIGA (TI Graphics Interface)

(Zenith Radio Corporation)
 Zenith, Z-100, Z-248

(ZSoft Corporation)
 ShowPartner, Paintbrush

 "LIM 4.0" and "Expanded Memory Specification" are copyright Lotus Development
Corp, Intel Corp, and Microsoft Corp.

 "EEMS", "AQA 3.1" and "Enhanced Expanded Memory Specification" are copyright
by Ashton-Tate, Quadram, and AST

 "DPMI" and "DOS Protected Mode Interface" are copyright Lotus Development
Corp, Intel Corp, Microsoft Corp, and AST

Various other names are trademarks of their respective companies.

ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º     Programmer's Technical Reference for MSDOS and the IBM PC     SWv2.2a  º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ

  This is a user-supported technical reference.  If you find this information
 to be of use, please mail your check or money order for US $20 + $1.75 S&H to:

                       ÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑ
                       ³    Dave Williams, DOSREF    ³
                       ³         PO Box 181          ³
                       ³ Jacksonville, AR 72076-0181 ³
                       ³             USA             ³
                       ÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏ

  Shipping is US Postal Service Air Mail.  For non-Australian foreign orders,
 see the file 'PAYMENT'.  Site licensing and product licensing terms are
 available.

  If you wish to make payment in Australian dollars, please mail your check
 or money order for AUS $29 or credit card information to to:

                       ÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑ
                       ³ Spearwood Shareware Service ³
                       ³          PO Box 121         ³
                       ³    Hamilton Hill, WA 6163   ³
                       ³           Australia         ³
                       ÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏ

        Spearwood Shareware Service is our authorized Australian dealer.
        They will forward your order to the USA and you will receive the
        absolute latest version of DOSREF by airmail straight from the
        author.  This means there will be about a three week delay before
        your order arrives.  We appreciate your business!

        Spearwood is our dealer only; for support write or E-mail the
        author, Dave Williams, at the above address.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

   Why support DOSREF instead of relying on one of those public domain
 "interrupt lists"?  Sheer size, for one.  Even in LHarc format DOSREF
 bulks out to over a megabyte, making it too large for most sysops to
 consider keeping online.  Registered users also get support via:

        The Courts of Chaos BBS (TechRef support board)
        RIME/RelayNet
        BIX
        CompuServe
        airmail

  You get the very latest edition of this manual on disk, with no worries
 about corrupted or tampered text.  DOSREF is a quality product, in use
 by the US Navy, CalTech, Borland, NEC, Wang, General Motors, Citicorp,
 Rockwell, Honeywell, Digital Research, Central Point Software, 20th Century
 Fox, Associated Press, hospitals, universities, and government agencies
 around the world.

  The Registered User reference consists of over a megabyte of the compressed
 technical reference, appendices, and sample source code. That's about three
 megabytes of raw data when uncompressed, or several times larger than the
 shareware version.

  The Registered User version contains information on device drivers, mouse
 programming, Virtual Control Program Interface, Microsoft Windows 2.x, hard
 drives, hardware information, virus and Trojan programs, EMS 3.2, LIM 4.0,
 EEMS 3.2, CD-ROM, network programming, DOS 5.0, and more.

  Registered users will be advised by mail of updates.

  Several people who have downloaded copies over three years old have written
 to see if I was still supporting the Reference.  The answer is yes.  Not only
 that, but my book contract calls for keeping the information current.  If
 you're concerned, just drop a postcard.

 *****************************************************************************

 Foreign langauge versions are available!

  Klaus Overhage of Stuttgart, West Germany has licensed DOSref for
 redistribution and is now able to provide versions in German.  Klaus' version
 is a separate product from this one and must be purchased separately. Klaus
 is providing full support for German users.  If you'd like a copy in German,
 please contact:

                             Klaus Overhage
                             Rosenstrasse 15 A
                             7000 Stuttgart 50
                             Germany

  I hope to have other languages available soon.  If you are interested in
purchase or translation, please contact me for details.

 *****************************************************************************

  For payment in British pounds, Canadian dollars or EuroCheques, see
 INVOICE.TRF and PAYMENT.  I fully support foreign users!  If you're having
 trouble arranging payment, write (or leave EMail) and I'll try to work
 something out.

  Do you live outside the US?  If so, you're probably familiar with the
 hassles of keeping up with the latest information - the three to five month
 lead time for US publication, plus time for local book dealers to catalog
 new releases, plus problems in trying to order... plus the delays while your
 book comes in on special order, goes through Customs, the inevitable price
 hikes through all the middlemen, taxes...  not only is DOSREF priced
 well below the price of good printed computer books in the US, it's probably
 far cheaper than you could expect to pay for US books locally.  Plus your
 order will show up in your very own mailbox by air mail.

 *****************************************************************************

  Printed copies of the Tech Ref are available for œ16.95 or US$35.10 from
Sigma Press, marketed by John Wiley & Sons UK. Address orders to:

        Programmer's Technical Reference
        by Dave Williams

        ISBN 185058-199-1
        John Wiley & Sons
        Baffins Lane
        Chichester
        West Sussex PO19 1UD
        England

 They accept checks, most credit cards, or purchase orders.

 *****************************************************************************

  The latest shareware version is always available on BIX the ibm.dos/listings
 area, the GEnie IBM file area, or:

 The Courts of Chaos, (501)985-0059, (support BBS)  CompuCom 9600
 The Cat House, (501)376-6909,  (sysop: Joe Felix)  CompuCom 9600

 RelayNet node ->CHAOS
    send mail in COMMON or MULTITSK (I'm the Conference Host for Multitask)
 MetroNet node ->CHAOS
    send mail in METRONET

 The DRAKE BBS, (0522) 824379, (sysop: Paolo Masetti)
 Langhirano, Italy  FIDOnet 2:332/502

 GroupMed, (206) 581-9088  (sysop: Ismail Arslangiray)
 Tacoma WA, USA  FIDOnet 1:138/120 2400bps, 1:138/116 9600bps USR HST
 instant access, latest DOSREF is FREQable


 *****************************************************************************

 Shareware is try-before-you buy software.  If you find this package to be of
use you should consider registering.  Registered users get the complete
version, support, and updates.

 If you received this copy of DOSREF from a shareware vendor the money you
paid was only for the diskette, not the software.

 Dave Williams is a member of the User Supported Software Association (ussa).
ussa wants to make sure that the user supported software principle works for
you. If you are unable to resolve a software-related problem with a ussa
member by contacting the member directly, ussa may be able to help. The ussa
Mediator can help you resolve a dispute or problem with a ussa member, but
does not provide technical support for members' products. Please write to the
ussa Mediator at Box 1000, London SE17 2UA, England.

     ÚÄÄÄÄÄÄ¿
     ³ÚÄÄÄÄÄÙ
     ³ÀÄÄÄÄÄ¿
     ÃÂÄÄÂÄÄ´  Approved
     ³³  ³Ú¿³  Author
     ³ÀÄÄÙ³³³
     ÃÂÄÄÂÁÁ´  User -
     ³³  ³Ú¿³  Supported
     ³ÀÄÄÙ³³³  Software
     ÃÄÄÄÂÙô  Association
     ³ÚÄ¿³ ³³
     ³ÀÄÙÀÄÙ³
     ÀÄÄÄÄÄÄÙ
       ussa



                               How to use DOSREF

 This reference changes so often that any attempt to format it for pagination 
would be a tremendous waste of time. Simply printing the thing out and letting 
the pagebreaks fall where they may is how most people do it. The neatest 
solution is Vern Buerg's LIST.COM or SideKick's file view function. If your
editor has multiple-window support, you can open a small window into the 
Reference and cut and paste into your source.

 An efficient method of using the Reference is to concatenate all the chapters 
together with the COPY command, ie COPY CONTENTS + CHAPTER.001 + CHAPTER.002 +
..... + CHAPTER.017   REF.  (REF being the new file name for the concatenated 
files.) With LIST.COM, the backslash (\) or F9 key will search for strings. 
You can then dump pieces of text to a disk file or your printer.

 If you work better with a printout than scanning with a file viewer, try 
setting your printer to 132 columns. This allows a nice margin for writing 
notes and eliminates the problem some printers have when printing 80 
character wide text. Some of the text and charts in the reference are a full 
80 columns wide; unfortunately some printers wrap automatically at 79 columns.
Some printers don't handle a combination of compressed print and graphics 
characters very well either. You may have to use the PRTRFIX.COM program 
provided on Disk 1 to squelch the graphics for printing.

 I strongly recommend using a viewer instead of printing. If you *must* print 
the Reference out, do it in stages so your printer does not overheat. Some
inexpensive printers will self-destruct after a couple of hours.


   **  Programmer's  Technical  Reference  for  MSDOS  and  the  IBM  PC **
                    Copyright (c) 1987, 1992 Dave Williams


 This is a listing of some of the new stuff added to the Reference. I didn't
keep a version list until 2.0; lots of stuff gets added between version
numbers.

09/87   first shareware release of the reference
11/87   LIM 3.2 functions
01/88   LIM 4.0 spec
05/88   AST EEMS 3.2 spec
06/88   DesQview and TopView calls, NetBIOS calls
07/88   Intel CAS 1.0 spec
12/88   Microsoft XMA 2.0 standard
03/89   Microsoft Windows 1.03 API
04/89   porting between operating systems
04/89   video programming
04/89   more networking
04/89   mouse programming
04/89   table of contents at beginning of each chapter
06/89   major bugfixes and verification of data
09/89   Microsoft TSR Programming Guidelines 1.0 (provisional)
10/89   PharLap VCPI 1.0
10/89   LANtastic network API
10/89   PC-MOS/386 4.00 partial API
10/89   partial DesQview and TopView
10/89   further updates to MS Windows API
12/89   PCjr cartridge support in DOS
12/89   more info on European multitasking DOS 4.0
12/89   added some paint program formats
12/89   info on computer viruses and Trojan Horses

06/90   expanded sysid ID codes in Chapter 2
07/90   add Connor Peripheral drives to Appendix 6
07/90   add Imprimis drives to Appendix 6
08/90   Weitek x167 math coprocessor interfaces
10/90   info on Pelican/Kodak 5.5mb 5-1/4 floppy drives
10/90   added info in IBM PC LAN and Token Ring API
11/90   int 10h functions for EGALOAD font loader, LANtastic AI-LANBIOS 2Fh
        calls, CopyIIPC board ports, UMB definition in Chap2, updated Appendix
        11 (glossary), added new Appendix 21 (hotkey definitions), completely
        reworked partition tables in Chapter 8
12/90   added more network functions from IBM PC LAN reference

Version 2.0 released!

01/91   EISA access ports, more Carbon Copy int 10h calls, more history of
        DOS, changes to partition table info in Chapter 8, more info on
        IRQ7/int17, more info on eDOS 4.0, Pelican I/O ports, CopyII board I/O
        ports, added network info to int 21h calls, added DOS 1.x info to int
        21h calls, added ARJ archive format to Appendix 15
02/91   added DHELP.BAT to DOSCMDS. Lots of new ravings in MISCSTUF. STB VGA
        modes added to chap16, ADT SmartFAX function calls, 8250 UART coverage,
        8237 DMA Controller coverage, NEC 765 floppy controller chip coverage,
        more coverage on AT int 70h timer, more Novell calls, GriD ID bytes
        and specific BIOS functions, Leading Edge Model M undocumented BIOS
        1Ah functions, Versa-Spool interrupts, ZIPKEY int 0B3h calls

04/91   extensive additions of network card port addresses to Chapter 2
        extensive additions to hard drive listings

05/91   added Appendix 22, Sound Blaster API
        added Appendix 23, French-Canadian accented character chart
        moved XMS spec from Chapter 5 to Chapter 10, since many people missed
        it buried in the 2Fh calls.
        added more Desqview programming information

06/91   removed obsolete TIFF information; Aldus will give the latest spec
        to anyone who asks.  Put TIFF hotline number in Appendix 20.
        added CIS GIF file format, by permission of H&R Block and CIS.
        added PCX file format, by permission of ZSoft.
        added DOS 5 mods and new information to ASSIGN in Chapter 5.

07/91   received permission from VESA to redistribute VESA documents.
        documented SWITCHAR no longer works in 5.0
        int 2Fh/fn 4Ah DOS 5 HMA services (partial)
        int 21h/fn 33h DOS 5 "real" DOS version call
        more information on 21h/60h (TRUENAME) and networks, Win3
        added 8250 info back to Chapter 15
        moved CIS GIF file format to Appendix 24
        hex chart

Version 2.1 released

08/91   added more DV info to int 10h/0FEh
        added int 21h and int 2Fh calls for DOS 5.0 from MS 5.0 Tech Ref
        moved DoubleDOS functions from Chapter 4 to Chapter 17
        added how to detect VDISK, some DV info to chap3, 15h/87h
        more info on chap3, 15h/83h and 86h, AT int70 timer functions
        more into on Create Temporary File changes under MS and DR 5.0
        more model ID bytes in chapter 2
        noted potential problems with MSC int86() and ints 25h, 26h
        added CheckIt parallel loopback tester pinout
        greatly enhanced bibliography (50 new entries!)
        more info on the history of the PCjr
        included Raintree's nice information file on DOS4 and SHARE

        IBM-to-Mac serial cable adapter pinouts
        more on 2Fh/16h, DOS give-up-time (used by OS/2 2.0 and Win3 too)
        port addresses on Logitech ScanMan board

        Microsoft TSR Specification 1.0 as Appendix 26
        AT&T 6300 BIOS Data Area problem, Chapter 2
        more info on int 15h,fn 4Fh (OS Hook)


       **  Programmer's Technical Reference for MSDOS and the IBM PC **
                USA copyright TXG 392-616  ALL RIGHTS RESERVED
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ DOSREF (tm) ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
                     ISBN 1-878830-02-3 (disk-based text)
                    Copyright (c) 1987, 1992 Dave Williams
                        ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
                        ³ Shareware Version, 01/12/92 ³
                        ³  Please Register Your Copy  ³
                        ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ


 The rest of the chapters aren't included in this shareware demonstration
package.  Since the complete manual takes about 1000k even compressed in
LHarc format, something had to give somewhere.

 Here's a sample of what you're missing:

 DOS 5 information (mainly in registered chapters 4, and 5)


 (Chapters 1, 2, and 3 are the same as the registered version, less additions
since this demo was released)


                               TABLE OF CONTENTS


INTRO           Introduction, credits, copyrights


CHAPTER 1       DOS and the PC

Some History .......................................................... 1**1
What is DOS? .......................................................... 1**2
Other Operating Systems ............................................... 1**3
Specific Versions of MS/PC-DOS ........................................ 1**4
The Operating System Heirarchy ........................................ 1**5
DOS Structure ......................................................... 1**6
DOS Initialization .................................................... 1**7


CHAPTER 2       Low Memory and Absolute Addresses

Introduction .......................................................... 2**1
System Memory Map ..................................................... 2**2
A Brief Guide to Current Memory Terminology ........................... 2**3
PC Port Assignment .................................................... 2**4
Reserved Memory Locations ............................................. 2**5
Absolute Addresses .................................................... 2**6
The IBM PC System Interrupts (Overview) ............................... 2**7
Quick Chart of Interrupts 00h-0FFh .................................... 2**8
The IBM-PC System Interrupts 00h-0Fh (in detail) ...................... 2**9


CHAPTER 3       The IBM ROM BIOS

Calling the ROM BIOS .................................................. 3**1
Interrupt 10h  Video Services ......................................... 3**2
Interrupt 11h  Equipment Check ........................................ 3**3
Interrupt 12h  Memory Size ............................................ 3**4
Interrupt 13h  Disk Functions ......................................... 3**5
Interrupt 14h  Initialize and Access Serial Port ...................... 3**6
               FOSSIL Drivers ......................................... 3**7
Interrupt 15h  Cassette I/O ........................................... 3**8
Interrupt 16h  Keyboard I/O ........................................... 3**9
Interrupt 17h  Printer ................................................ 3**10
Interrupt 18h  ROM BASIC .............................................. 3**11
Interrupt 19h  Bootstrap Loader ....................................... 3**12
Interrupt 1Ah  Time of Day ............................................ 3**13
Interrupt 1Bh  Control-Break .......................................... 3**14
Interrupt 1Ch  Timer Tick ............................................. 3**15
Interrupt 1Dh  Vector of Video Initialization Parameters .............. 3**16
Interrupt 1Eh  Vector of Diskette Controller Parameters ............... 3**17
Interrupt 1Fh  Ptr to Graphics Character Extensions (Graphics Set 2) .. 3**18


CHAPTER 4       DOS Function Requests

General Programming Guides ............................................ 4**1
DOS Registers ......................................................... 4**2
DOS Stacks ............................................................ 4**3
DOS Interrupts ........................................................ 4**4
Interrupt 20h (Terminate) ............................................. 4**5
DOS Services (quick list) ............................................. 4**6
Calling the DOS Services .............................................. 4**7
Version Specific Information .......................................... 4**8
Compatibility Problems With DOS 4.0+ .................................. 4**9
PCjr Cartridge Support ................................................ 4**10
eDOS 4.0 .............................................................. 4**11
DOS Services in Detail ................................................ 4**12


CHAPTER 5       Interrupts 22h through 0FFh

Interrupt 22h   Terminate Address ..................................... 5**1
Interrupt 23h   Ctrl-Break Exit Address ............................... 5**2
Interrupt 24h   Critical Error Handler ................................ 5**3
Interrupt 25h   Absolute Disk Read .................................... 5**4
Interrupt 26h   Absolute Disk Write ................................... 5**5
Interrupt 27h   Terminate And Stay Resident ........................... 5**6
Interrupt 28h   (not documented by Microsoft) ......................... 5**7
Interrupt 29h   (not documented by Microsoft) ......................... 5**8
Interrupt 2Ah   Microsoft Networks - Session Layer Interrupt .......... 5**9
Interrupt 2Bh   Unknown ............................................... 5**10
Interrupt 2Ch   Unknown ............................................... 5**11
Interrupt 2Dh   Unknown ............................................... 5**12
Interrupt 2Eh   Alternate EXEC (DOS 2.0+) ............................. 5**13
Interrupt 2Fh   Multiplex Interrupt ................................... 5**14
Interrupt 30h   FAR jump instruction for CP/M-style calls ............. 5**15
Interrupt 31h   Unknown ............................................... 5**16
Interrupt 32h   Unknown ............................................... 5**17
Interrupt 33h   Used by Microsoft Mouse Driver Function Calls ......... 5**18
Interrupt 34h   Turbo C/Microsoft languages - Floating Point emulation  5**19
Interrupt 35h   Turbo C/Microsoft languages - Floating Point emulation  5**20
Interrupt 36h   Turbo C/Microsoft languages - Floating Point emulation  5**21
Interrupt 37h   Turbo C/Microsoft languages - Floating Point emulation  5**22
Interrupt 38h   Turbo C/Microsoft languages - Floating Point emulation  5**23
Interrupt 39h   Turbo C/Microsoft languages - Floating Point emulation  5**24
Interrupt 3Ah   Turbo C/Microsoft languages - Floating Point emulation  5**25
Interrupt 3Bh   Turbo C/Microsoft languages - Floating Point emulation  5**26
Interrupt 3Ch   Turbo C/Microsoft languages - Floating Point emulation  5**27
Interrupt 3Dh   Turbo C/Microsoft languages - Floating Point emulation  5**28
Interrupt 3Eh   Turbo C/Microsoft languages - Floating Point emulation  5**29
Interrupt 3Fh   Overlay Manager Interrupt (Microsoft LINK.EXE) ........ 5**30
Interrupt 40h   Hard Disk BIOS ........................................ 5**31
Interrupt 41h   Hard Disk Parameters .................................. 5**32
Interrupt 42h   Pointer to screen BIOS entry .......................... 5**33
Interrupt 43h   Pointer to EGA Graphics Character Table ............... 5**34
Interrupt 44h   Pointer to graphics character table ................... 5**35
Interrupt 45h   Reserved by IBM  (not initialized) .................... 5**36
Interrupt 46h   Pointer to second hard disk parameter block ........... 5**37
Interrupt 47h   Reserved by IBM  (not initialized) .................... 5**38
Interrupt 48h   Cordless Keyboard Translation ......................... 5**39
Interrupt 49h   Non-keyboard Scan Code Translation Table Address (PCjr) 5**40
Interrupt 4Ah   Real-Time Clock Alarm (Convertible, PS/2) ............. 5**41
Interrupt 4Bh   Reserved by IBM  (not initialized) .................... 5**42
Interrupt 4Ch   Reserved by IBM  (not initialized) .................... 5**43
Interrupt 4Dh   Reserved by IBM  (not initialized) .................... 5**44
Interrupt 4Eh   Reserved by IBM  (not initialized) .................... 5**45
Interrupt 4Fh   Reserved by IBM  (not initialized) .................... 5**46
Interrupt 50-57 IRQ0-IRQ7 Relocation .................................. 5**47
Interrupt 58h   Reserved by IBM  (not initialized) .................... 5**48
Interrupt 59h   Reserved by IBM  (not initialized) .................... 5**49
Interrupt 5Ah   Reserved by IBM  (not initialized)  ................... 5**50
Interrupt 5Bh   Reserved by IBM  (not initialized) .................... 5**51
Interrupt 5Ah   Cluster Adapter BIOS entry address .................... 5**52
Interrupt 5Bh   Reserved by IBM  (not initialized) .................... 5**53
Interrupt 5Ch   NETBIOS interface entry port, TOPS .................... 5**54
Interrupt 5Dh   Reserved by IBM  (not initialized) .................... 5**55
Interrupt 5Eh   Reserved by IBM  (not initialized) .................... 5**56
Interrupt 5Fh   Reserved by IBM  (not initialized) .................... 5**57
Interrupt 60h-67h  User Program Interrupts ............................ 5**58
Interrupt 60h   Network OS Interface .................................. 5**59
Interrupt 67h   Expanded Memory Board Driver Interrupt ................ 5**60
Interrupt 68h   Not Used  (not initialized) ........................... 5**61
Interrupt 69h   Not Used  (not initialized) ........................... 5**62
Interrupt 6Ah   Not Used  (not initialized) ........................... 5**63
Interrupt 6Bh   Not Used  (not initialized) ........................... 5**64
Interrupt 6Ch   System Resume Vector (Convertible) .................... 5**65
Interrupt 6Dh   Not Used  (not initialized) ........................... 5**66
Interrupt 6Eh   Not Used  (not initialized) ........................... 5**67
Interrupt 6Fh   10-Net API............................................. 5**68
Interrupt 70h   IRQ 8, Real Time Clock Interrupt (AT, XT/286, PS/2) ... 5**69
Interrupt 71h   IRQ 9, Redirected to IRQ 8 (AT, XT/286, PS/2) ......... 5**70
Interrupt 72h   IRQ 10  (AT, XT/286, PS/2)  Reserved .................. 5**71
Interrupt 73h   IRQ 11  (AT, XT/286, PS/2)  Reserved .................. 5**72
Interrupt 74h   IRQ 12  Mouse Interrupt (PS/2) ........................ 5**73
Interrupt 75h   IRQ 13, Coprocessor Error (AT) ........................ 5**74
Interrupt 76h   IRQ 14, Hard Disk Controller (AT, XT/286, PS/2) ....... 5**75
Interrupt 77h   IRQ 15 (AT, XT/286, PS/2)  Reserved ................... 5**76
Interrupt 78h   Not Used .............................................. 5**77
Interrupt 79h   Not Used .............................................. 5**78
Interrupt 7Ah   Reserved .............................................. 5**79
Interrupt 7Bh-7Eh  Not Used by IBM .................................... 5**80
Interrupt 7Ch   REXX-PC API ........................................... 5**81
Interrupt 7Fh   IBM 8514/A Graphics Adapter API ....................... 5**82
Interrupt 80h-85h  Reserved by BASIC .................................. 5**83
Interrupt 86h   Int 18 when relocated by NETBIOS ...................... 5**84
Interrupt 86h-0F0h  Used by BASIC when BASIC interpreter is running ... 5**85
Interrupt 0A4h  Right Hand Man API .................................... 5**86
Interrupt 0D4h  PC-MOS/386 API ........................................ 5**87
Interrupt 0E0h  Digital Research CP/M-86 function calls ............... 5**88
Interrupt 0E1h  PC Cluster Disk Server Information .................... 5**89
Interrupt 0E2h  PC Cluster Program .................................... 5**90
Interrupt 0E4h  Logitech Modula-2 v2.0   Monitor Entry ................ 5**91
Interrupt 0E5h  Not Used .............................................. 5**92
Interrupt 0E6h  Not Used .............................................. 5**93
Interrupt 0E7h  Not Used .............................................. 5**94
Interrupt 0E8h  Not Used .............................................. 5**95
Interrupt 0E9h  Not Used .............................................. 5**96
Interrupt 0EAh  Not Used .............................................. 5**97
Interrupt 0EBh  Not Used .............................................. 5**98
Interrupt 0ECh  Not Used .............................................. 5**99
Interrupt 0EDh  Not Used ............................................. 5**100
Interrupt 0EEh  Not Used ............................................. 5**101
Interrupt 0EFh  GEM interface (Digital Research) ..................... 5**102
Interrupt 0F0h  unknown .............................................. 5**103
Interrupts 0F1h-0FFh  (absolute addresses 3C4h-3FFh) ................. 5**104
Interrupt 0F4h  Not Used ............ ................................ 5**105
Interrupt 0F5h  Not Used ............ ................................ 5**106
Interrupt 0F8h  Set Shell Interrupt (OEM) ............................ 5**107
Interrupt 0F9h  Reserved ............................................. 5**108
Interrupt 0FAh  USART ready (RS-232C) ................................ 5**109
Interrupt 0FBh  USART RS ready (keyboard) ............................ 5**110
Interrupt 0FCh  Unknown ...............................................5**111
Interrupt 0FDh  reserved for user interrupt .......................... 5**112
Interrupt 0FEh  reserved by IBM ...................................... 5**113
Interrupt 0FFh  reserved by IBM ...................................... 5**114



CHAPTER 6       DOS Control Blocks and Work Areas

DOS Address Space ..................................................... 6**1
Storage Blocks ........................................................ 6**2
Disk Transfer Area (DTA) .............................................. 6**3
Program Segment Prefix ................................................ 6**4
Memory Control Blocks ................................................. 6**5
DOS Program Segment ................................................... 6**6


CHAPTER 7       DOS File Information

File Management Functions ............................................. 7**1
FCB Function Calls .................................................... 7**2
Handle Function Calls ................................................. 7**3
Special File Handles .................................................. 7**4
Raw and Cooked File I/O ............................................... 7**5
Number of Open Files Allowed  ......................................... 7**6
Restrictions on FCB Usage ............................................. 7**7
Restrictions on Handle usage .......................................... 7**8
Allocating Space to a File ............................................ 7**9
MSDOS / PCDOS Differences ............................................. 7**10
.COM File Structure ................................................... 7**11
.EXE File Structure ................................................... 7**12
The Relocation Table .................................................. 7**13
"NEW" .EXE Format (Microsoft Windows and OS/2) ........................ 7**14
Standard File Control Block ........................................... 7**15
Extended File Control Block ........................................... 7**16
Disk Transfer Area .................................................... 7**17


CHAPTER 8       DOS Disk Information

The DOS Area .......................................................... 8**1
The Boot Record ....................................................... 8**2
DOS File Allocation Table (FAT) ....................................... 8**3
        Media Descriptor Byte ......................................... 8**4
        12 Bit FATs ................................................... 8**5
        16 Bit FATs ................................................... 8**6
        32 Bit FATs ................................................... 8**7
DOS Disk Directory .................................................... 8**8
The Data Area ......................................................... 8**9
Floppy Disk Types ..................................................... 8**10
Hard Disk Layout ...................................................... 8**11
System Initialization ................................................. 8**12
Boot Record/Partition Table ........................................... 8**13
Hard Disk Technical Information ....................................... 8**14
Determining Hard Disk File Allocation ................................. 8**15
BIOS Disk Functions ................................................... 8**16


CHAPTER 9       Device Drivers


CHAPTER 10      Lotus/Intel/Microsoft Expanded Memory Specification

History ............................................................... 10**1
Uses of Expanded Memory ............................................... 10**2
DOS and Expanded Memory ............................................... 10**3
Different Memory Types ................................................ 10**4
AST/Quadram/Ashton-Tate Enhanced EMM .................................. 10**5
EMS Address Space Map ................................................. 10**6
Writing Programs That Use Expanded Memory ............................. 10**7
Page Frames ........................................................... 10**8
Calling the Manager ................................................... 10**9
Detecting EMS ......................................................... 10**10
Terminate and Stay Resident (TSR) Program Cooperation ................. 10**11
Expanded Memory Services Quick List ................................... 10**12
Expanded Memory Services .............................................. 10**13
        LIM 3.2 Specification ......................................... 10**14
        LIM 4.0 Specification ......................................... 10**15
        AQA EEMS 3.2 Specification .................................... 10**16
        VCPI API 1.0 .................................................. 10**17
Expanded Memory Manager Error Codes ................................... 10**18
Microsoft Extended Memory Specification 2.0 ........................... 10**19


CHAPTER 11      Conversion Between Operating Systems

Overview .............................................................. 11**1
Special Considerations ................................................ 11**2
Example Operating Systems ............................................. 11**3
Atari ST .............................................................. 11**4
CP/M .................................................................. 11**5
MacOS ................................................................. 11**6
AmigaDOS .............................................................. 11**7
OS/2 .................................................................. 11**8
UNIX .................................................................. 11**9


CHAPTER 12      Microsoft Windows API

Overview .............................................................. 12**1
Programming Windows ................................................... 12**2
Versions .............................................................. 12**3
Functions ............................................................. 12**4
Error Codes ........................................................... 12**5


CHAPTER 13      Network APIs

FTP Driver - PC/TCP Packet Driver Specification ....................... 13**1
10-Net Network ........................................................ 13**2
LANtastic LANOS API ................................................... 13**3
Novell NetWare 2.11 API ............................................... 13**4
APPC/PC ............................................................... 13**5


CHAPTER 14      Mouse Programming

General Information ................................................... 14**1
Register Usage ........................................................ 14**2
Interrupt 33h Function Requests ....................................... 14**3
Interrupt 10h Function Requests ....................................... 14**4


CHAPTER 15      Register-Level Programming

8555 Peripheral Interface ............................................. 15**1
8259 Interrupt Controller ............................................. 15**2
AT CMOS RAM Configuration ............................................. 15**3


CHAPTER 16      Video Programming

Quick List of BIOS Interrupt 10h Functions ............................ 16**1
BIOS Interrupt 10h Functions in Detail ................................ 16**2


CHAPTER 17      Multitasking Shells

Introduction .......................................................... 17**1
Programming Practices ................................................. 17**2
TopView/DESQview API (interrupt 15h, "System Services" interface) ..... 17**3
TopView/DESQview API (interrupt 16h, "BIOS Video" interface) .......... 17**4


CHAPTER 18      Viruses and Trojan Horses


CHAPTER 19      Tips and Tricks


MISCSTUF        Miscellaneous Stuff

AFTERWRD        Afterword

CREDITS         Credits and Bibliography



 A P P E N D I C E S

APPENDIX  1     Keyboard scan code chart

APPENDIX  2     ASCII character chart

APPENDIX  3     IBM PC character set

APPENDIX  4     IBM PC error code listing

APPENDIX  5     Addresses of various manufacturers

APPENDIX  6     Hard disk information

APPENDIX  7     Floppy and Tape Devices

APPENDIX  8     Pinouts of various connectors on the IBM PC

APPENDIX  9     Sizes of various drivers installed in CONFIG.SYS

APPENDIX  10    Common modem instruction sets

APPENDIX  11    Glossary of computer terminology

APPENDIX  12    Various busses used in MSDOS machines

APPENDIX  13    Common filename extensions

APPENDIX  14    Clock speeds of various expansion cards

APPENDIX  15    Header formats used by various archive utilities

APPENDIX  16    Miscellaneous Hardware Information

APPENDIX  17    HP LaserJet Setup Codes

APPENDIX  18    ANSI.SYS Escape Sequences

APPENDIX  19    DEC VT100 Escape Sequences

APPENDIX  20    Various Paint Program Formats

APPENDIX  21    Some Commonly Used Hot-Keys

APPENDIX  22    Sound Blaster API

APPENDIX  23    French-Canadian accented character chart

APPENDIX  24    Compuserve Graphic Image Format '89a

APPENDIX  25    Hex Chart

APPENDIX  26    Microsoft TSR Specification 1.0

       **  Programmer's Technical Reference for MSDOS and the IBM PC **
                USA copyright TXG 392-616  ALL RIGHTS RESERVED
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ DOSREF (tm) ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
                     ISBN 1-878830-02-3 (disk-based text)
                    Copyright (c) 1987, 1992 Dave Williams
                        ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
                        ³ Shareware Version, 01/12/92 ³
                        ³  Please Register Your Copy  ³
                        ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ


                            C H A P T E R    O N E

                              DOS AND THE IBM PC


                                C O N T E N T S

Some History .......................................................... 1**1
What is DOS? .......................................................... 1**2
Other Operating Systems ............................................... 1**3
Specific Versions of MS/PC-DOS ........................................ 1**4
The Operating System Heirarchy ........................................ 1**5
DOS Structure ......................................................... 1**6
DOS Initialization .................................................... 1**7



SOME HISTORYÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**1

 Development of MSDOS/PCDOS began in October 1980, when IBM began searching
the market for an operating system for the yet-to-be-introduced IBM PC.
Microsoft had no 8086 real operating system to sell, but quickly made a deal
to license Seattle Computer Products' 86-DOS operating system, which had been
written by Tim Paterson earlier in 1980 for use on that company's line of 8086,
S100 bus micros. 86-DOS (also called QDOS, for Quick and Dirty Operating System)
had been written as more or less a 16-bit version of CP/M, since Digital
Research was showing no hurry in introducing CP/M-86.

 This code was quickly polished up and presented to IBM for evaluation. IBM
had originally intended to use Digital Research's CP/M operating system, which
was the industry standard at the time.

 Folklore reports various stories about the rift between DRI and IBM. The most
popular story claims Gary Kildall or DRI snubbed the IBM executives by flying
his airplane when the meeting was scheduled. Another story claims Kildall
didn't want to release the source for CP/M to IBM, which would be odd, since
they released it to other companies. One noted industry pundit claims
Kildall's wife killed the deal by insisting on various contract changes. I
suspect the deal was killed by the good ol'boy network. It's hard to imagine
a couple of junior IBM executives giving up when ordered to a task as simple
as licensing an operating system from a vendor. Wouldn't look good on their
performance reports. It would be interesting to hear IBM's story...

 IBM found itself left with Microsoft's offering of "Microsoft Disk
Operating System 1.0". An agreement was reached between the two, and IBM agreed
to accept 86-DOS as the main operating system for thir new PC. Microsoft
purchased all rights to 86-DOS in July 1981, and "IBM Personal Computer DOS
1.0" was ready for the introduction of the IBM PC in October 1981. IBM
subjected the operating system to an extensive quality-assurance program,
reportedly found well over 300 bugs, and decided to rewrite the programs. This
is why PC-DOS is copyrighted by both IBM and Microsoft.

 Some early OEM versions of DOS had different names, such as Compaq-DOS, Z-DOS,
Software Bus 86, etc.  By version 2 Microsoft managed to persuade everyone but
IBM to refer to the product as "MS-DOS."

 It is sometimes amusing to reflect on the fact that the IBM PC was not
originally intended to run MSDOS. The target operating system at the end of the
development was for a (not yet in existence) 8086 version of CP/M. On the other
hand, when DOS was originally written the IBM PC did not yet exist! Although
PC-DOS was bundled with the computer, Digital Research's CP/M-86 would probably
have been the main operating system for the PC except for two things - Digital
Research wanted $495 for CP/M-86 (considering PC-DOS was essentially free) and
many software developers found it easier to port existing CP/M software to DOS
than to the new version of CP/M.

 The upgrade from DOS 3.3 to 4.0 was done in-house by IBM.  DOS 4.0 was a
completely IBM product, later licensed back to Microsoft. In early 1990 IBM
announced that it was ceasing development of DOS and all further work would
be done solely by Microsoft.


 Microsoft Press' "MSDOS Encyclopedia" shows a reproduction of a late
DOS 1.25 OEM brochure.  Microsoft was touting future enhancements to
1.25 including Xenix-compatible pipes, process forks, and multitasking,
as well as "graphics and cursor positioning, kanji support, multi-user
and hard disk support, and networking."  Microsoft certainly thought
big, but, alas, the forks, multitasking, and multiuser support never
came about, at least in US versions of DOS.  Oddly, the flyer claims
that

 "MS-DOS has no practical limit on disk size. MS-DOS uses 4-byte XENIX
OS compatible pointers for file and disk capacity up to 4 gigabytes."

 Umm... yeah.  One sort of gets the idea nobody at Microsoft had a hard
disk larger than 32 megabytes...

 For the record they actually delivered:

Xenix-compatible pipes             DOS 2.0  ("|" operator)
process forks, and multitasking   eDOS 4.0  (not delivered in the US)
multi-user                         never delivered
graphics and cursor positioning    DOS 2.0  (ANSI.SYS, more than likely)
kanji support                      DOS 2.01, 2.25 (double-byte char set)
hard disk support                  DOS 2.0  (subdirectories)
networking                         DOS 3.1  (file locking, MS Networks)

 Early Microsoft ads pumped DOS' Xenix-like features and promised Xenix
functionality in future releases.

 We'll probably never know what the real story was behind eDOS/DOS 4/
DOS 5/286DOS/OS2.  Microsoft had announced their intent to build a
multitasking, multiuser version of MSDOS as early as 1982.  They shipped
betas of "DOS 4.0" in '86 and early '87, before 3.3 was even announced.
Microsoft UK announced they had licensed 4.0 to Apricot Computer, and
the French Postal Service was supposed to be running it.  I've never
been able to find out if Apricot ever shipped any 4.0 to end users.

 Despite Gordon Letwin's acid comments about problems with the 80286
processor, I doubt the '286 was the barrier between users and a
multitasking MSDOS.  I also doubt there was any shortage of programming
talent at Microsoft - Digital Research's Concurrent DOS and Software
Link's PC-MOS were developed without undue trouble.


 MSDOS and PC-DOS have been run on more than just the IBM-PC and clones. Some
of the following have been done:

 Hardware PC Emulation:

        Apple II                ->      TransPC 8088 board
        Apple MacIntosh         ->      AST 80286 board
        Atari 400/800           ->      Co-Power 88 board
        Atari ST                ->      PC-Ditto II cartridge
        Commodore Amiga 2000    ->      8088 or A2286D 80286 Bridge Board
        IBM PC/RT               ->      80286 AT adapter
        Kaypro 2                ->      Co-Power Plus board

 Software PC Emulation:

        Apple MacIntosh         ->      SoftPC
        Atari ST                ->      PC-Ditto I
        IBM RS/6000             ->      DOS emulation

 DOS Emulation:

        AIX (IBM RS/6000)       ->      DOS emulation with "PCSIMulator"
        OS/2                    ->      DOS emulation in "Compatibility Box"
        QNX                     ->      DOS window
        SunOS                   ->      DOS window
        Xenix                   ->      DOS emulation with DOSMerge


WHAT IS DOS?ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**2

 DOS exists as a high-level interface between an application program and the
computer. DOS stands for "Disk Operating System", which reflects the fact that
its main original purpose was to provide an interface between the computer and
its disk drives.

 DOS now lets your programs do simple memory management, I/O from the system
console, and assorted system tasks (time and date, etc) as well as managing
disk operations. Versions 3.1 and up also incorporate basic networking
functions.

 With the introduction of installable device drivers and TSR (terminate but
stay resident) programs in DOS 2.0, the basic DOS functions may be expanded to
cover virtually any scale of operations required.


OTHER OPERATING SYSTEMSÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**3

 There are a number of compatible replacements for Microsoft's MSDOS. Some are:

Alloy 386 Multiware                  (multitasking control prog, licensed DOS)
Consortium Technologies MultiDOS     (multitasking, multiuser)
Digital Research Concurrent DOS      (multitasking)
Digital Research Concurrent DOS 386  (for 80386 computers)
Digital Research Concurrent DOS XM   (multitasking, multiuser)
Digital Research DR-DOS 3.31 and 5.0 (PC-DOS clones)
Digital Research Multiuser DOS       (multitasking, multiuser)
PC-MOS/386                           (multitasking, multiuser)
Wendin-DOS                           (multitasking, multiuser)
VM/386                               (multitasking)

 Various other operating systems are available for the IBM PC. These include:

Digital Research CP/M-86
Digital Research Concurrent CP/M-86 (multitasking)
Minix (multitasking UNIX workalike)
Pick  (database-operating system)
QNX   (multitasking, multiuser)
UNIX  (various systems from IBM itself, Microsoft-SCO, Bell, and various UNIX
       clones, single and multi user) (AIX, Xenix, AT&T System V, etc.)

 "Shell" programs exist which use DOS only for disk management while they more
or less comprise a new operating system. These include:

     DesQview                        Windows                     OmniView
     GEM                             TopView                     TaskView
     GeoWorks

 Systems using the NEC V-series CPUs can execute Intel 8080/8085 8-bit
instructions as well as the 16-bit 8088-up instructions.  They can run standard
Digital Research 8-bit CP/M and MP/M directly, as well as other operating
systems developed for that processor.



SPECIFIC VERSIONS OF MS/PC-DOSÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**4

 DOS 1.x is essentially 86-DOS.  DOS 2.x kept the multiple file layout (the two
hidden files and COMMAND.COM) but for all practical purposes is an entirely
different operating system with backwards compatibility with 1.x.  I seriously
doubt there has been much code from 1.x retained in 2.x. DOS 3.x is merely an
enhancement of 2.x; there seems little justification for jumping a whole
version number.  The disk handling routines were considerably extended in 3.1,
allowing disk access in a "virtual" fashion, independent of whether the drive
was a local or network device.  DOS 4.0, originating as it did from outside
Microsoft, can justify a version jump.  Unfortunately, 4.0 seemed to have very
little reason to justify its existence - virtually all of its core features
could be found in one version or another of DOS 3.x.  According to Microsoft's
Gordon Letwin, DOS 5.0 was a complete rewrite with the kernel done in hand
optimized assembly language.

 DOS version nomenclature: major.minor.minor.  The digit to the left of the
decimal point indicates a major DOS version change.  1.0 was the first version.
2.0 added support for subdirectories, 3.0 added support for networking, 4.0
added some minimal support for Lotus-Intel-Microsoft EMS.

 The first minor version indicates customization for a major application.  For
example, 2.1 for the PCjr, 3.3 for the PS/2s.  The second minor version does not
seem to have any particular meaning.

 The main versions of DOS are:

 86-DOS       February 1981  Paterson's Quick'n'Dirty DOS first runs on PC
 PC-DOS 1.0   August   1981  original IBM release
 PC-DOS 1.05  -------- ----  fixes to BASIC interpreter
 PC-DOS 1.1   June     1982  bugfix, double sided drive support
 MS-DOS 1.25  July     1982  for early compatibles. This is the first non-IBM
                             OEM version
 PC-DOS 2.0   March    1983  for PC/XT, Unix-type subdirectory support,
                             installable device drivers, I/O redirection,
                             subdirectories, hard disk support, handle calls
 PC-DOS 1.85  April    1983  internal IBM - extended 1.1 - not released
 MS-DOS 2.01  -------- 1983  first support for individual country formats, Kanji
 PC-DOS 2.1   October  1983  for IBM PCjr, bugfixes for 2.0. No country support
 MS-DOS 2.11  October  1983  basically a cross of PC-DOS 2.1 and MS-DOS 2.01
 MS-DOS 2.12  -------- ----  special version for TI Professional
 PC-DOS 3.0   August   1984  1.2 meg drive for PC/AT, some new system calls,
                             new external programs, 16-bit FAT, specific support
                             for IBM network
 MS-DOS 3.05  -------- 1984  first OEM version of 3.x
 PC-DOS 3.1   November 1984  bugfix for 3.0, implemented generic network support
 MS-DOS 2.25  October  1985  extended foreign language support
 PC-DOS 3.2   January  1986  720k 3.5 inch drive support, special support for
                             laptops (IBM PC Convertible), XCOPY
 MS-DOS 4.0   April    1986  multitasking (Europe only) - withdrawn from market
 PC-DOS 3.3   April    1987  for PS/2 series, 1.44 meg support, multiple DOS
                             partition support, code page switching, improved
                             foreign language support, some new function calls,
                             support for the AT's CMOS clock.
 MS-DOS 3.31  November 1987  over-32 meg DOS partitions. Different versions
                             from different OEMs (not Microsoft).  Compaq and
                             Wyse are most common.
 PC-DOS 3.4   -------- ----  internal IBM - not released (4.0 development)
 MS-DOS 2.11R -------- 1988  bootable ROM DOS for Tandy machines
 PC-DOS 4.0   August   1988  32mb limit officially broken, minor EMS support,
                             more new function calls, enhanced network support
                             for external commands
 MS-DOS 4.01  January? 1989  Microsoft version with some bugfixes
 MS-DOS 3.21R September1989  DOS in ROM, Flash File System for laptops
 MS-DOS 3.3R  -------- 1990  DOS in ROM, introduced for TI laptops
 MS-DOS 5.0   June     1991  new high memory support, uses up to 8 hard disks,
                             command line editor and aliasing, 2.88 floppies

 IBM's PC-DOS was long considered to be the "standard" version of DOS.  Now
that MS 5.0 is a commercial product most developers will probably write to it.

 Microsoft's policy has been to sell DOS only to OEMs.  Despite this, they
sold small quantities of DOS 3.2, 3.3, and 4.0 without insurmountable
difficulties.  DOS 5.0 was conceived from the beginning as an over-the-counter
retail product.

 Incidentally, IBM refers to its DOS as "The IBM Personal Computer DOS." The
term "PCDOS" is a trademark of IBM's rival DEC.

 Some versions of MS-DOS varied from PC-DOS in the available external commands.
Some OEMs only licensed the basic operating system code (the xxxDOS and xxxBIO
programs, and COMMAND.COM) from Microsoft, and either wrote the rest themselves
or contracted them from outside software houses like Phoenix.  Most of the
external programs for DOS 3.x and 4.x are written in "C" while the 1.x and 2.x
utilities were written in assembly language.  Other OEMs required customized
versions of DOS for their specific hardware configurations, such as Sanyo 55x
and early Tandy computers, which were unable to exchange their DOS with the IBM
version.

 PC-DOS 3.0 was extremely buggy on release.  It did not handle the DOS
environment correctly and there were numerous documented problems with the
batch file parser.  The network support code was also nonfunctional in that DOS
version.  It is recommended that users upgrade to at least version 3.1.

 DEC MSDOS versions 2.11 for the Rainbow had the ANSI.SYS device driver built
into the main code.  The Rainbow also used a unique quad density, single-sided
floppy drive and its DOS had special support for it.

 IBM had a version 1.85 of PC-DOS in April 1983, after the introduction of DOS
2.0.  It was evidently for internal use only, supported multiple drive file
searches (a primitive form of PATH), builtin MODE sommands for screen support,
a /P parameter for TYPE for paused screens, an editable command stack like the
public domain DOSEDIT.COM utility, and could be set up to remain completely
resident in RAM instead of a resident/transient part like normal DOS.  It is a
pity some of the neat enhancements didn't make it into DOS 2.0.  IBM also had
an "internal use only" version 3.4, evidently used while developing DOS 4.0.

 Digital Research's DR-DOS is the first widely available DOS clone.  Version
3.4, released in June 1988, was the one first available to the American public.
It was somewhat buggy and its use is not recommended.  DR 3.41 is extremely
compatible and its use should pose no problems on any machine.  DR-DOS 5.0
(released May, 1990) is functionally equivalent to MS-DOS 5.0.  For all
practical purposes, MS 5.0 is a clone of DR 5.0, since DR beat MS to market by
over a year.  According to Greg Ewald, DRI's DR-DOS product manager, DR-DOS was
developed from Concurrent DOS 386 with the multiuser and multitasking code
stripped out.

 Some versions of DOS used in compatibles do not maintain the 1.x, 2.x, ...
numbering system.  Columbia Data Products computers labeled DOS 1.25 as DOS
2.0.  Early Compaqs labeled DOS 2.0 as DOS 1.x.  Other versions incorporated
special features - Compaq DOS 3.31 and Wyse DOS 3.21 both support >32mb disk
partitions in the same fashion as DOS 4.x.

 AT&T DOS 3.1 differs from generic MSDOS 3.10 in its use of cluster-size and
file allocation table structures.  AT&T DOS appears to use rules not from
version 3, but rather those from version 2.

 Epson Equity III and ComputerLand 3.10 DOS's appear to use cluster techniques
that are a cross between versions 2 and 3.  On type DOS partitions, these DOS's
use 3.x rules if the partition is larger than 32,680 sectors in total size.
This implies 16 bit FAT entries as well.  On partitions below this size, they
will use 2.x rules, including the 12 bit FAT entries.

 Zenith DOS 3.x and Wyse DOS 3.2 have a builtin internal device driver to
handle up to 4 32Mb DOS partitions on a single hard disk. Wyse DOS 3.31 will
handle single partitions up to 512Mb with a 32-bit FAT.

 According to PC Week Magazine, July 4, 1988, Arabic versions of MSDOS are
shipping with a hardware copy-protection system from Rainbow Technologies.
This is similar to the short-lived system used by AutoCAD 2.52 and a very few
other MSDOS programs, where an adapter block is plugged into the parallel port
and software makes use of coded bytes within the block.  This type of copy
protection has been common on Commodore products for several years, where it is
called a "dongle."
 The AutoCAD dongle was defeated by a small program written within weeks of
version 2.52's debut.  Version 2.62 was released 3 months later, without the
dongle.  The DOS dongle will, however, prevent the system from booting at all
unless it is found.
 This makes the Arabic version of MSDOS the first copy-protected operating
system, a dubious distinction at best.  The modifications to the operating
system to support the dongle are not known at this time.  Frankly, it would
seem that burning the operating system into ROMs would be cheaper and simpler.

 Versions of DOS sold in Great Britain are either newer than those sold in the
US or use a different numbering system.  DOS 3.4, 4.0, 4.1, 4.2, and 4.3 had
been released there between the US releases of 3.3 and 4.0.
 MSDOS 4.0 (eDOS) was introduced in mid-1987 in Europe (at SICOB in Paris and
sometime earlier by Apricot Computer in the UK).  It offered multitasking
provided applications were specially written for it.
 David Fraser (Microsoft UK Managing Director) is on record saying that "DOS
4.0 is unlikely to set the world alight and is of interest only to specific
OEMs who want its features for networking and communications."   Standard DOS
applications will run under DOS 4.x as a foreground task according to uncertain
information.  It differs from earlier versions only in allowing background tasks
to run.  For further information, see Chapter 4.

 Microsoft changed their OEM licensing agreements between DOS versions 2.x and
3.x.  OEM versions of DOS 3.x must maintain certain data areas and undocumented
functions in order to provide compatibility with the networking features of the
operating system.  For this reason, TSR programs will be much more reliable
when operating under DOS 3.x.

 Several versions of DOS have been modified to be run out of ROM.  The Sharp
PC5000 had MSDOS 1.25 in ROM, and the Toshiba 1000 and some Tandy 1000 models
have MSDOS 2.11 in ROM.  In mid September 1989 Microsoft introduced 3.21R ROMs
for laptops, and in early '90 Texas Instruments laptops were the first to get
the 3.3R ROMs.  Digital Research has also announced its DR-DOS 3.41 and 5.0 is
available in a ROM version and Award Software is marketing DOS cards to OEMs
as a plug-in to ISA-bus machines.

 IBM's release of DOS 4.0 (and the immediate subsequent release of a bugfix)
was a dubious step "forward."  DOS 4.0 was the first version of DOS to come with
a warranty; the catch is that IBM warranted it only for a very slim list of
IBM-packaged software.  4.0 had some minor EMS support, support for large hard
disks, and not much else.  With its voracious RAM requirements and lack of
compatibility with previous versions of DOS (many major software packages
crashed under DOS 4.0), plus the increase in price to a cool $150, there was
no great rush to go to that version of DOS.

 Microsoft undertook development of MSDOS 5.0 in early 1990, soliciting
input from Usenet, BIX, and Compuserve among others.  5.0 is a functional
clone of Digital Research's DR-DOS 5.0.  5.0's compatibility was assured
by what has been claimed as the largest beta-test program in history -
in his address to the Boston Computer Society, Bill Gates announced over
7,500 testers were involved.




THE OPERATING SYSTEM HIERARCHYÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**5


 The Disk Operating System (DOS) and the ROM BIOS serve as an insulating layer
between the application program and the machine, and as a source of services
to the application program.

  As the term 'system' might imply, DOS is not one program but a collection
of programs designed to work together to allow the user access to programs
and data.  Thus, DOS consists of several layers of "control"programs and a set
of "utility" programs.

 The system hierarchy may be thought of as a tree, with the lowest level being
the actual hardware.  The 8088 or V20 processor sees the computer's address
space as a ladder one byte wide and one million bytes long.  Parts of this
ladder are in ROM, parts in RAM, and parts are not assigned.  There are also
65,536 "ports" that the processor can use to control devices.

 The hardware is normally addressed by the ROM BIOS, which will always know
where everything is in its particular system.  The chips may usually also be
written to directly, by telling the processor to write to a specific address or
port.  This sometimes does not work as the chips may not always be at the same
addresses or have the same functions from machine to machine.



DOS STRUCTUREÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**6

DOS consists of four components:

 * The boot record
 * The ROM BIOS interface  (IBMBIO.COM, DRBIOS.SYS, or IO.SYS)
 * The DOS program file    (IBMDOS.COM, DRBDOS.SYS, or MSDOS.SYS)
 * The command processor   (COMMAND.COM or aftermarket replacement)


* The Boot Record

 The boot record begins on track 0, sector 1, side 0 of every diskette prepared
by the DOS FORMAT command.  The boot record is placed on diskettes to produce an
error message if you try to start up the system with a nonsystem diskette in
drive A.  For hard disks, the boot record resides on the first sector of the DOS
partition.  All media supported by DOS use one sector for the boot record.


* Read Only Memory (ROM) BIOS Interface and Extensions

 The file IBMBIO.COM or IO.SYS is the interface module to the ROM BIOS.
This file provides a low-level interface to the ROM BIOS device routines and
may contain extensions or changes to the system board ROMs.  Some compatibles do
not have a ROM BIOS to extend, and load the entire BIOS from disk.  (Sanyo 55x,
Viasyn machines).  Some versions of MSDOS, such as those from Compaq's MS-DOS
and Digital Research's DRDOS 5.0, are named IBMBIO.COM but are not IBM files.

 These low-level interface routines include the instructions for performing
operations such as displaying information on the screen, reading the keyboard,
sending data out to the printer, operating the disk drives, and so on.  It is
the operating system's means of controlling the hardware.  IBMBIO.COM contains
any modifications or updates to the ROM BIOS that are needed to correct any
bugs or add support for other types of hardware such as new disk drives.  By
using IBMBIO.COM to update the ROM BIOS on the fly when the user turns on their
computer, IBM does not need to replace the ROM BIOS chip itself, but makes any
corrections through the cheaper and easier method of modifying the IBMBIO.COM
file instead.

 IBMBIO.COM also keeps track of hardware operations on an internal stack or
"scratch pad" area for the operating system to save information such as
addresses it will need, etc.  An example of the use for this stack can be seen
when running a program such as a word processor.  If you have told the word
processor to save your letter, it will write the data to your disk.  During this
time, if you start typing some more information, the keyboard generates a
hardware interrupt.  Since you don't want the process of writing the information
to the disk to be interrupted, DOS allocates a slot in the stack for the
keyboard's hardware interrupt and when it gets a chance, (probably after the
data has been written to the disk), it can process that interrupt and pick up
the characters you may have been typing.  The STACKS= command in DOS 3.2+'s
CONFIG.SYS file controls the number of stack frames available for this
purpose.

 IBMBIO.COM also reads your CONFIG.SYS file and installs any device drivers
(i.e. DEVICE=ANSI.SYS) or configuration commands it may find there.



* The DOS Program

 The actual DOS program is the file IBMDOS.COM or MSDOS.SYS.  It provides a high-
level interface for user (application) programs.  This program consists of file
management routines, data blocking/deblocking for the disk routines, and a
variety of built-in functions easily accessible by user programs.

 When a user program calls these function routines, they accept high-level
information by way of register and control block contents.  When a user program
calls DOS to perform an operation, these functions translate the requirement
into one or more calls to IBMBIO.COM, MSDOS.SYS or system hardware to complete
the request.

 This section is often referred to as the "kernel" by systems programmers.



* The Command Interpreter

 The command interpreter, COMMAND.COM, is the part you interact with on the
command line.  COMMAND.COM has three parts.  IBM calls them the "resident
portion", the "initialization portion" and the "transient portion".

 IBM's original documentation spoke of installing alternate command
interpreters (programs other than COMMAND.COM) with the SHELL= statement in
CONFIG.SYS.  Unfortunately, IBM chose not to document much of the interaction
between IBMDOS.COM and IBMBIO.COM.  By the time much of the interaction was
widely understood, many commercial software programs had been written to use
peculiarities of COMMAND.COM itself.

 Several programs exist that perform as actual "shells" by completely replacing
COMMAND.COM and substituting their own command interpreter to use with the
hidden DOS files.  Examples are Command Plus, a commercial package, and the
shareware 4DOS and FlexShell packages.  Both supply greatly enhanced batch
language and editing capabilities.

NOTE: DOS 3.3+ checks for the presence of a hard disk, and will default to
      COMSPEC=C:\.  Previous versions default to COMSPEC=A:\.  Under some DOS
      versions, if COMMAND.COM is not immediately available for reloading
      (i.e., swapping to a floppy with COMMAND.COM on it) DOS may crash.


Resident Portion:

 The resident portion resides in memory immediately following IBMDOS.COM and its
data area.  This portion contains routines to process interrupts 22h (Terminate
Address), 23h (Ctrl-Break Handler), and 24h (Critical Error Handler), as well as
a routine to reload the transient portion if needed.  For DOS 3.x, this portion
also contains a routine to load and execute external commands, such as files
with exensions of COM or EXE.

 When a program terminates, a checksum is used to determine if the application
program overlaid the transient portion of COMMAND.COM.  If so, the resident
portion will reload the transient portion from the area designated by COMSPEC=
in the DOS environment.  If COMMAND.COM cannot be found, the system will halt.

 All standard DOS error handling is done within the resident portion of
COMMAND.COM.  This includes displaying error messages and interpreting the
replies to the "Abort, Retry, Ignore, Fail?" message.

 Since the transient portion of COMMAND.COM is so large (containing the
internal commands and all those error messages), and it is not needed when the
user is running an application it can be overlaid that program if that
application needs the room.  When the application is through, the resident
portion of COMMAND.COM brings the transient portion back into memory to show
the prompt.  This is why you will sometimes see the message "Insert disk with
COMMAND.COM".  It needs to get the transient portion off the disk since it was
overlaid with the application program.

 The initialization portion of COMMAND.COM follows the resident portion and is
given control during the bootup procedure.  This section actually processes the
AUTOEXEC.BAT file.  It also decides where to load the user's programs when they
are executed.  Since this code is only needed during startup, it is overlaid by
the first program which COMMAND.COM loads.

 The transient portion is loaded at the high end of memory and it is the
command processor itself.  It interprets whatever the user types in at the
keyboard, hence messages such as "Bad command or file name" for when the user
misspells a command.  This portion contains all the internal commands (i.e.
COPY, DIR, RENAME, ERASE), the batch file processor (to run .BAT files) and
a routine to load and execute external commands which are either .COM or
.EXE files.

 The transient portion of COMMAND.COM produces the system prompt, (C>), and
reads what the user types in from the keyboard and tries to do something with
it.  For any .COM or .EXE files, it builds a command line and issues an EXEC
function call to load the program and transfer control to it.



DOS INITIALIZATIONÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1**7

 The system is initialized by a software reset (Ctrl-Alt-Del), a hardware reset
(reset button), or by turning the computer on.  The Intel 80x8x series processors
always look for their first instruction at the end of their address space
(0FFFF0h) when powered up or reset.  This address contains a jump to the first
instruction for the ROM BIOS.

 Built-in ROM programs (Power-On Self-Test, or POST, in the IBM) check machine
status and run inspection programs of various sorts.  Some machines set up a
reserved RAM area with bytes indicating installed equipment (AT and PCjr).

 When the ROM BIOS finds a ROM on an adapter card, it lets that ROM take
control of the system so that it may perform any set up necessary to use the
hardware or software controlled by that ROM.  The ROM BIOS searches absolute
addresses C8000h through E0000h in 2K increments in search of a valid ROM.
A valid ROM is determined by the first few bytes in the ROM.  The ROM will have
the bytes 55h, AAh, a length indicator and then the assembly language
instruction to CALL FAR (to bring in a "FAR" routine).  A checksum is done on
the ROM to verify its integrity, then the BIOS performs the CALL FAR to bring
in the executible code.  The adapter's ROM then performs its initialization
tasks and hopefully returns control of the computer back to the ROM BIOS so it
can continue with the booting process.

 The ROM BIOS routines then look for a disk drive at A: or an option ROM
(usually a hard disk) at absolute address C:800h.  If no floppy drive or option
ROM is found, the BIOS calls int 19h (ROM BASIC if it is an IBM) or displays
an error message.

 If a bootable disk is found, the ROM BIOS loads the first sector of information
from the disk and then jumps into the RAM location holding that code.  This code
normally is a routine to load the rest of the code off the disk, or to "boot"
the system.

 The following actions occur after a system initialization:

 1.  The boot record is read into memory and given control.

 2.  The boot record then checks the root directory to assure that the first
     two files are IBMBIO.COM and IBMDOS.COM or their OEM equivalents.  These
     must be the first two files, and they must be in that order (IBMBIO.COM
     first, with its sectors in contiguous order).
     NOTE: IBMDOS.COM need not be contiguous in version 3.x+.

 3.  The boot record loads IBMBIO.COM into memory.

 4.  The initialization code in IBMBIO.COM loads IBMDOS.COM, determines
     equipment status, resets the disk system, initializes the attached
     devices, sets the system parameters and loads any installable device
     drivers according to the CONFIG.SYS file in the root directory (if
     present), sets the low-numbered interrupt vectors, relocates IBMDOS.COM
     downward, and calls the first byte of DOS.
     NOTE: CONFIG.SYS may be a hidden file.

 5.  DOS initializes its internal working tables, initializes the interrupt
     vectors for interrupts 20h through 27h, and builds a Program Segment
     Prefix for COMMAND.COM at the lowest available segment.  For DOS versions
     3.10 up, DOS also initializes the vectors for interrupts 0Fh through 3Fh.
     An initialization routine is included in the resident portion and assumes
     control during startup.  This routine contains the AUTOEXEC.BAT file
     handler and determines the segment address where user application programs
     may be loaded.  The initialization routine is then no longer needed and is
     overlaid by the first program COMMAND.COM loads.
     NOTE: AUTOEXEC.BAT may be a hidden file.

 6.  IBMDOS.COM uses the EXEC function call to load and start the top-level
     command processor.  The default command processor is COMMAND.COM in the
     root directory of the boot drive.  If COMMAND.COM is in a subdirectory
     or another command processor is to be used, it must be specified by a
     SHELL= statement in the CONFIG.SYS file.
     A transient portion is loaded at the high end of memory.  This is the
     command processor itself, containing all of the internal command
     processors and the batch file processor.  For DOS 2.x, this portion also
     contains a routine to load and execute external commands, such as files
     with extensions of COM or EXE.
      This portion of COMMAND.COM also produces the DOS prompt (such as "A>"),
     reads the command from the standard input device (usually the keyboard or
     a batch file), and executes the command.  For external commands, it builds
     a command line and issues an EXEC function call to load and transfer
     control to the program.

note 1) COMMAND.COM may be a hidden file.
     2) For IBM DOS 2.x, the transient portion of the command processor
        contains the EXEC routine that loads and executes external commands.
        For MSDOS 2.x+ and IBM DOS 3.x+, the resident portion of the command
        processor contains the EXEC routine.
     3) IBMDOS only checks for a file named "COMMAND.COM".  It will load
        any file of that name if no SHELL= command is used.


 That pretty much covers the bootup process.  After the command processor is
loaded, it runs the AUTOEXEC.BAT file and then the user gets their prompt to
begin working.



       **  Programmer's Technical Reference for MSDOS and the IBM PC **
                USA copyright TXG 392-616  ALL RIGHTS RESERVED
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ DOSREF (tm) ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
                     ISBN 1-878830-02-3 (disk-based text)
                    Copyright (c) 1987, 1992 Dave Williams
                        ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
                        ³ Shareware Version, 01/12/92 ³
                        ³  Please Register Your Copy  ³
                        ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ


                             C H A P T E R   T W O


 CPU Port Assignments, System Memory Map, BIOS Data Area, Interrupts 00h to 09h



                                C O N T E N T S

Introduction .......................................................... 2**1
System Memory Map ..................................................... 2**2
A Brief Guide to Current Memory Terminology ........................... 2**3
PC Port Assignment .................................................... 2**4
Reserved Memory Locations ............................................. 2**5
Absolute Addresses .................................................... 2**6
The IBM PC System Interrupts (Overview) ............................... 2**7
Quick Chart of Interrupts 00h-0FFh .................................... 2**8
The IBM-PC System Interrupts 00h-0Fh (in detail) ...................... 2**9



Introduction .......................................................... 2**1

 For consistency in this reference, all locations and offsets are in
hexadecimal unless otherwise specified. All hex numbers are prefaced with a
leading zero if they begin with an alphabetic character, and are terminated
with a lowercase H (h). The formats vary according to common usage.



System Memory Map ..................................................... 2**2

 The IBM PC handles its address space in 64k segments, divided into 16k
fractions and then further as necessary.

ÚÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³start ³start³end  ³                                                          ³
³addr. ³addr.³addr.³                          usage                           ³
³(dec) ³   (hex)   ³                                                          ³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³   *640k RAM Area*                                                           ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0k   ³           ³  start of RAM, first K is interrupt vector table         ³
³ 16k  ³00000-03FFF³  PC-0 system board RAM ends                              ³
³ 32k  ³04000-07FFF³                                                          ³
³ 48k  ³08000-0BFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 64k  ³10000-13FFF³  PC-1 system board RAM ends                              ³
³ 80k  ³14000-17FFF³                                                          ³
³ 96k  ³18000-1BFFF³                                                          ³
³ 112k ³1C000-1FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 128k ³20000-23FFF³                                                          ³
³ 144k ³24000-27FFF³                                                          ³
³ 160k ³28000-2BFFF³                                                          ³
³ 176k ³2C000-2FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 192k ³30000-33FFF³                                                          ³
³ 208k ³34000-37FFF³                                                          ³
³ 224k ³38000-3BFFF³                                                          ³
³ 240k ³3C000-3FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 256k ³40000-43FFF³  PC-2 system board RAM ends                              ³
³ 272k ³44000-47FFF³                                                          ³
³ 288k ³48000-4BFFF³                                                          ³
³ 304k ³4C000-4FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 320k ³50000-53FFF³                                                          ³
³ 336k ³54000-57FFF³                                                          ³
³ 352k ³58000-5BFFF³                                                          ³
³ 368k ³5C000-5FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 384k ³60000-63FFF³                                                          ³
³ 400k ³64000-67FFF³                                                          ³
³ 416k ³68000-6BFFF³                                                          ³
³ 432k ³6C000-6FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 448k ³70000-73FFF³                                                          ³
³ 464k ³74000-77FFF³                                                          ³
³ 480k ³78000-7BFFF³                                                          ³
³ 496k ³7C000-7FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 512k ³80000-83FFF³                                                          ³
³ 528k ³84000-87FFF³                                                          ³
³ 544k ³88000-8BFFF³  the original IBM PC-1 BIOS limited memory to 544k       ³
³ 560k ³8C000-8FFFF³                                                          ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 576k ³90000-93FFF³                                                          ³
³ 592k ³94000-97FFF³                                                          ³
³ 609k ³98000-9BFFF³                                                          ³
³ 624k ³9C000-9FFFF³  to 640k (top of RAM address space)                      ³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³A0000 ***** 64k ***** EGA/VGA starting address                               ³
³A0000 ***** 64k ***** Toshiba 1000 DOS ROM (MS-DOS 2.11V)                    ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 640k ³A0000-A95B0³  MCGA 320x200 256 color video buffer                     ³
³      ³     -AF8C0³  MCGA 640x480 2 color video buffer                       ³
³      ³     -A3FFF³                                                          ³
³ 656k ³A4000-A7FFF³                                                          ³
³ 672k ³A8000-ABFFF³      this 64k segment may be used for contiguous DOS     ³
³ 688k ³AC000-AFFFF³      RAM with appropriate hardware and software          ³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³B0000 ***** 64k ***** mono and CGA address                                   ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 704k ³B0000-B3FFF³  4k  monochrome display   | The PCjr and early Tandy 1000³
³ 720k ³B4000-B7FFF³                           | BIOS revector direct write to³
³ 736k ³B8000-BBFFF³  16k CGA uses             | the B8 area to the Video Gate³
³ 756k ³BC000-BFFFF³                           | Array and reserved system RAM³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³C0000 ***** 64k *************** expansion ROM                                ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 768k ³C0000-C3FFF³  16k EGA BIOS C000:001E EGA BIOS signature (letters IBM  ³
³ 784k ³C4000-C5FFF³                                                          ³
³      ³C6000-C63FF³  256 bytes Professional Graphics Display comm. area      ³
³      ³C6400-C7FFF³                                                          ³
³ 800k ³C8000-CBFFF³  16k hard disk controller BIOS, drive 0 default          ³
³      ³CA000      ³      some 2nd floppy (high density) controller BIOS      ³
³ 816k ³CC000-CDFFF³   8k IBM PC Network NETBIOS                              ³
³      ³CE000-CFFFF³                                                          ³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³D0000 ***** 64k ***** expansion ROM                                          ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 832k ³D0000-D7FFF³  32k IBM Cluster Adapter  | PCjr first ROM cartridge     ³
³      ³      DA000³  voice communications     | address area.                ³
³ 848k ³D4000-D7FFF³                           | Common expanded memory board ³
³ 864k ³D8000-DBFFF³                           | paging area.                 ³
³ 880k ³DC000-DFFFF³                           |                              ³
³      ³DE000      ³  TI Pro default video buffer, 4k in length               ³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³E0000 ***** 64k ***** expansion ROM                                          ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 896k ³E0000-E3FFF³                           | PCjr second ROM cartridge    ³
³ 912k ³E4000-E7FFF³                           | address area                 ³
³ 928k ³E8000-EBFFF³                           |                              ³
³ 944k ³EC000-EFFFF³                           |    spare ROM sockets on AT   ³
ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³F0000 ***** 64k ***** system                                                 ³
ÃÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 960k ³F0000-F3FFF³  reserved by IBM          |    cartridge address         ³
³ 976k ³F4000-     ³                           |    area (PCjr cartridge      ³
³      ³F6000      ³  ROM BASIC Begins         |    BASIC)                    ³
³ 992k ³F8000-FB000³                           |                              ³
³ 1008k³FC000-FFFFF³  ROM BASIC and original   |                              ³
³      ³           ³  BIOS (Compatibility BIOS |                              ³
³      ³           ³  in PS/2)                 |                              ³
³ 1024k³      FFFFF³  end of memory (1024k) for 8088 machines                 ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÁÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 384k ³100000-15FFFF³ 80286/AT extended memory area, 1Mb motherboard         ³
³ 15Mb ³100000-FFFFFF³ 80286/AT extended memory address space                 ³
³ 15Mb ³160000-FDFFFF³ Micro Channel RAM expansion (15Mb extended memory)     ³
³ 128k ³FE0000-FFFFFF³ system board ROM            (PS/2 Advanced BIOS)       ³
ÃÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³  64k ³C0000000-C000FFFF³ Weitek "Abacus" math coprocessor memory-mapped I/O ³
ÀÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

 Note that the ROM BIOS has a duplicated address space which causes it to
"appear" both at the end of the 1 megabyte real mode space and at the end of
the 16 megabyte protected mode space. The addresses from 0E0000 to 0FFFFF are
equal to 0FE0000 to 0FFFFFF. This is necessary due to differences in the memory
addressing between Real and Protected Modes.



A Brief Guide to Current Memory Terminology ........................... 2**3

LOW MEMORY - 0000h to around 0:5(something), comprising the 80x8x interrupt
             vector table, the BIOS Data Area, DOS Data Area, etc.

CONVENTIONAL MEMORY - from the end of low memory to the beginning of the
             "reserved by IBM" A000 segment (640k).

HIGH MEMORY - originally noncontiguous RAM stuffed into the "reserved for
             ROM expansion" areas, typically segments D000 and E000. DOS
             normally can't access this memory without a driver of some
             sort, but it's easy to put RAMdisks and stuff in there.

CONVENTIONAL MEMORY - extra RAM stuck at A000, assuming the machine already
             has 640k, appears as conventional memory accessible to DOS
             and applications. IBM clones can typically add 64k before
             bumping into a mono card or 96k before hitting a color card.
             This address is part of the EGA/VGA video RAM area and most
             EGA cards don't like system memory at A000.

EXPANDED MEMORY - LIM 3.2, LIM 4.0, or EEMS 3.2 bank switched memory. A
             RAM "window" allows an app to save a block of RAM to an expansion
             board. The window size and location varies according to the
             EMS standard being used.

EXTENDED MEMORY - this is the "native mode" address space of the 80286 and
             later chips. The "real mode", or 8088 addressing scheme,
             sees RAM as a collection of segments and offsets with a limit
             on segment size. "Protected mode" addressing uses a flat linear
             addressing scheme. 8088 and 80188 chips do not have extended
             memory.

HIGH MEMORY - by fiddling a bit with the segment/offset stuff, you can
             get an extra block of addressable 8088-mode memory just over
             the 1 meg address space. Microsoft issued their "HMA" (High
             Memory Area) standard to try to standardize use of this block.
             Though it really is "high" memory, "high" had for many years
             referred to memory between 640k and 1mb. This creates more
             confusion for new programmers.

EMS - this is expanded memory as described above

XMS - Microsoft is pushing an "Extended Memory Standard" which defines
      a page-switching scheme much like EMS. The only real difference is
      that XMS uses protected-mode RAM instead of a special paged RAM board.

XMS - some severely brain-damaged jerk at IBM issued documentation for some
      IBM *EMS* boards referring to the boards as *XMS*. This was a classic
      blunder, and now some IBM-followers are picking up the aberrant
      terminology. This is guaranteed to confuse some people. To make it
      simple, if it needs an expansion board, it is EMS no matter what the
      vendor calls it.


PC Port Assignment .................................................... 2**4


 These are functions common across the IBM range. The PCjr, PC-AT, PC
Convertible and PS/2 (both buses) have enhancements. In some cases, the
AT and PS/2 series ignore, duplicate, or reassign ports arbitrarily. If
your code incorporates specific port addresses for video or system board
control it would be wise to have your application determine the machine
type and video adapter and address the ports as required.

 hex address                   Function                   Models
                                                PCjr|PC|XT|AT|CVT|M30|PS2

 0000-000F      8237 DMA controller                  PC
 0010-001F      8237 DMA controller                        AT         PS2
 0020-0027      8259A interrupt controller
 0020-002F      IOSGA interrupt function                              PS2
 0020-003F      8259A interrupt controller  (AT)
 0020-0021      interrupt controller 1, 8259A        PC    AT         PS2
 0040-0043      programmable timer 8253              PC
 0040-0047      programmable timers                                   PS2
 0040-005F      8253-5 programmable timers                 AT
                note 1) 0041 was memory refresh in PCs. Not used in PS/2.
                     2) A few early 80386 machines used static RAM and did
                        not use refresh at all. The PCjr refreshes by the
                        video vertical retrace signal.
 0060-0063      keyboard controller 8255A            PC
 0060-006F      8042 keyboard controller                   AT
 0060           IOSGA keyboard input port                             PS2
 0061           speaker                         PCjr PC XT AT CVT
 0061           IOSGA speaker control                             M30 PS2
 0061           On some clones, setting or clearing bit 2 controls Turbo mode
 0061           Toshiba 1000 - system command
 0062           IOSGA configuration control                       M30 PS2
 0062           Toshiba 1000 - System Status, port C
 0063           SSGA, undocumented                                    PS2
 0063           Toshiba 1000 - mode set
 0064           keyboard auxiliary device                             PS2
 0065-006A      SSGA, undocumented                                    PS2
 006B           SSGA, RAM enable/remap                                PS2
 006C-006F      SSGA, undocumented                                    PS2
 0070           AT CMOS write internal register
 0071           AT CMOS read internal register
 0070-0071      CMOS real-time clock, NMI mask                        PS2
 0070-007F      CMOS real-time clock, NMI mask             AT
 0074-0076      reserved                                              PS2
 0800-008F      SSGA DMA page registers                               PS2
 0080-009F      DMA page registers, 74LS612                AT
 0090           central arbitration control port (Micro Channel)
 0091           card selected feedback           (Micro Channel)
 0092           system control port A            (Micro Channel)
 0093           reserved                         (Micro Channel)
 0094           system board setup               (Micro Channel)
 0096           POS "CD SETUP" selector          (Micro Channel)
 00A0-00A1      Interrupt controller 2, 8259A              AT         PS2
 00A0-00AF      IOSGA NMI mask register                               PS2
 00B0-00BF      realtime clock/calendar, (undocumented)               PS2
 00C0-00DF      reserved                        PCjr PC XT AT CVT M30
 00C0-00CF      DOS ROM register, Toshiba 1000
 00D0-00EF      "special" register, Toshiba 1000
      00C0      0C1 key register, Toshiba 1000
      00C1      keyboard transfer register, Toshiba 1000
      00C2      keyboard receive register, Toshiba 1000
      00C3      keyboard status register, Toshiba 1000
      00C8      DOS ROM page register, Toshiba 1000
      00E0      CPU speed control, Toshiba 1000
      00E1      keyboard status/0E2 key register, Toshiba 1000
      00E2      work register, Toshiba 1000
      00E3      0E4 key register, Toshiba 1000
      00E4      system control register 0, Toshiba 1000
      00E4      Weitek ABACUS NDP - bit 0=1, ABACUS is present
      00E5      0E6 key register, Toshiba 1000
      00E6      system control register 1, Toshiba 1000
      00EE      EMS unit index, Toshiba 1000
      00EF      EMS unit data, Toshiba 1000
 00C0-00DF      DMA controller 2, 8237A-5                  AT         PS2
 00E0-00EF      realtime clock/calendar  (undocumented)           M30 PS2
 00F0-00FF      PS/2 math coprocessor I/O  (Model 50+)  (diskette IO on PCjr)
 0100-0101      PS/2 POS adapter ID response            (Micro Channel)
 0102-0107      PS/2 POS adapter configuration response (Micro Channel)
 01F0-01F8      hard disk                                  AT         PS2
 0200-0201      game-control adapter (joystick)
 0200-020F      game controller                      PC    AT
 0208-0209      Chips & Technology CS8221 chipset default EMS ports
                alternate addresses: 218h, 258h, 268h, 2A8h, 2B8h, 2E8h
 0208-020F      Toshiba 1000 - EMS unit I/O #1
 020C-020D      reserved by IBM
 0210-0217      expansion box (PC, XT)
 0218-021F      Toshiba 1000 - EMS unit I/O #2
 021F           reserved by IBM
 0258-025F      Toshiba 1000 - EMS unit I/O #3
 0258-0259      LIM EMS 3.1 (not defined in 3.2+)
 0268-026F      Toshiba 1000 - EMS unit I/O #4
 0278-027F      parallel printer port 2                    AT
 0278-027B      parallel printer port 3                               PS2
 02A2           clock chip in early Sperry PCs
 02A8-02AF      Toshiba 1000 - EMS unit I/O #5
 02B8-02BF      Toshiba 1000 - EMS unit I/O #6
 02B0-02DF      EGA (alternate)                       PC   AT
 02C0-02DF      Toshiba 1000 - realtime clock
 02E1           GPIB (adapter 0)                           AT
 02E2-02E3      data acquisition (adapter 0)               AT
 02E8           "industry standard" COM4
 02E8-02EF      Toshiba 1000 - EMS unit I/O #7
 02F8-02FF      serial communications (COM2)          PC   AT         PS2
 0300-031F      prototype card                        PC   AT
 0300-031F      Leading Edge Model D clock            -------------------
 0320-032F      hard disk controller                  PC
 0320           Perstor HD controller, primary        -------------------
 0324           Perstor HD controller, secondary      -------------------
 0340           Sony CD-ROM                           -------------------
 0348-0357      DCA 3278
 0360-0367      PC Network (low address)
 0368-036F      PC Network (high address)                  AT
 0370           Colorado Memory external tape backup control port -------
                some "second controller" floppy cards -------------------
 0378-037F      parallel printer port                 PC   AT
 0378-037B      parallel printer port                                 PS2
 0380-038F      Eicon Technology Network Adapter (X.25) board (default)
 0380-038F      SDLC, bi-synchronous 2                PC   AT
 0380-0389      BSC communications (alternate)        PC
 0390-039F      Eicon Technology Network Adapter (X.25) board (alternate)
 0390-0393      cluster (adapter 0)                   PC   AT
 03A0-03A9      BSC communications (primary)          PC   AT
 03B0-03BF      monochrome/parallel printer adapter   PC   AT
 03B4-03B5      video subsystem                                       PS2
 03BA           video subsystem                                       PS2
 03BC-03BF      parallel printer port 1                               PS2
 03C0-03CF      Enhanced Graphics Adapter
 03C0-03DA      video subsystem and DAC                               PS2
 03DA           video status register                 AT&T 6300, Olivetti PC
 03D0-03DF      CGA, MCGA, VGA adapter control
 03DE           video mode selector register          AT&T 6300, Olivetti PC
 03E8h          "industry standard" COM3
 03F0-03F7      floppy disk controller                PC   AT         PS2
 03F0           Colorado Memory internal tape backup control port -------
 03F2           DTK high-density XT floppy controller (output only)
 03F5           DTK high-density XT floppy controller
 03F8-03FF      serial communications (COM1)          PC   AT         PS2
 06E2-06E3      data acquisition (adapter 1)               AT
 0790-0793      cluster (adapter 1)                   PC   AT
 0878           Compaq 386SX VGA BIOS relocation           AT
 0AE2-0AE3      data acquisition (adapter 2)               AT
 0B90-0B93      cluster (adapter 2)                   PC   AT
 0EE2-0EE3      data acquisition (adapter 3)               AT
 1390-1393      cluster (adapter 3)                   PC   AT
 22E1           GPIB (adapter 1)
 2390-2393      cluster (adapter 4)                   PC   AT
 4258           LIM EMS 3.1 (not defined in 3.2+)     -------------------
 42E1           GPIB (adapter 2)                           AT
 62E1           GPIB (adapter 3)                           AT
 8258           LIM EMS 3.1 (not defined in 3.2+)     -------------------
 82E1           GPIB (adapter 4)                           AT
 A2E1           GPIB (adapter 5)                           AT
 C258           LIM EMS 3.1 (not defined in 3.2+)     -------------------
 C2E1           GPIB (adapter 6)                           AT
 E2E1           GPIB (adapter 7)                           AT

note 1) IOSGA = I/O Support Gate Array
        SSGA = System Support Gate Array
     2) I/O Addresses, hex 000 to 0FF, are reserved for the system board I/O.
        Hex 100 to 3FF are available on the I/O channel.
     3) These are the addresses decoded by the current set of adapter cards.
        IBM may use any of the unlisted addresses for future use.
     4) SDLC Communication and Secondary Binary Synchronous Communications
        cannot be used together because their port addresses overlap.



Reserved Memory Locations ............................................. 2**5

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³ 000-3FF  - 1k DOS interrupt vector table, 4 byte vectors for ints 00h-0FFh.
³   30:00  - used as a stack area during POST and bootstrap routines. This
³to 3F:FF    stack area may be revectored by an application program.
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³ ** The BIOS Data Area ** addresses from 400h to 4FFh
ÃÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³addr.³ size  ³                         description
ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³40:00³  word ³ COM1 port address |   These addresses are zeroed out in the
³40:02³  word ³ COM2 port address |   OS/2 DOS Compatibility Box if any of
³40:04³  word ³ COM3 port address |   the OS/2 COMxx.SYS drivers are loaded.
³40:06³  word ³ COM4 port address |
³40:08³  word ³ LPT1 port address
³40:0A³  word ³ LPT2 port address
³40:0C³  word ³ LPT3 port address
³40:0E³  word ³ LPT4 port address        (not valid in PS/2 machines)
³40:0E³  word ³ PS/2 pointer to 1k extended BIOS Data Area at top of RAM
³40:10³  word ³ equipment flag (see int 11h)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bits:
              ³ 0       0       no floppy drive present
              ³         1       if floppy drive present (see bits 6&7)
              ³ 1       0       no math coprocessor installed
              ³         1       if 80x87 installed  (not valid in PCjr)
              ³ 2,3     system board RAM   (not used on AT or PS/2)
              ³         0,0     16k             0,1     32k
              ³         1,0     48k             1,1     64k
              ³ 4,5     initial video mode
              ³         0,0     no video adapter
              ³         0,1     40 column color  (PCjr default)
              ³         1,0     80 column color
              ³         1,1     MDA
              ³ 6,7     number of diskette drives
              ³         0,0     1 drive         0,1     2 drives
              ³         1,0     3 drives        1,1     4 drives
              ³ 8       0       DMA present
              ³         1       DMA not present (PCjr, Tandy 1400, Sanyo 55x)
              ³ 9,A,B   number of RS232 serial ports
              ³ C       game adapter  (joystick)
              ³         0       no game adapter
              ³         1       if game adapter
              ³ D       serial printer (PCjr only)
              ³         0       no printer
              ³         1       serial printer present
       ÚÄÄÄÄÄÄÙ E,F     number of parallel printers installed
       ³note 1) The IBM PC and AT store the settings of the system board
       ÀÄÄÄ¿    switches or CMOS RAM setup information (as obtained by the BIOS
           ³    in the Power-On Self Test (POST)) at addresses 40:10h and
           ³    40:13h. 00000001b indicates "on", 00000000b is "off".
ÚÄÄÄÄÄÂÄÄÄÄÁÄÄ¿
³40:12³  byte ³ reserved (PC, AT)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´  number of errors detected by infrared keyboard link (PCjr)
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´  POST status (Convertible)
³40:13³  word ³ availible memory size in Kbytes (less display RAM in PCjr)
ÃÄÄÄÄÄÅÄÄÄÄÄÄÄ´  this is the value returned by int 12h
³40:15³  word ³ reserved
³40:17³  byte ³ keyboard flag byte 0 (see int 9h)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7  insert mode on      3  alt pressed
              ³     6  capslock on         2  ctrl pressed
              ³     5  numlock on          1  left shift pressed
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     4  scrollock on        0  right shift pressed
³40:18³  byte ³ keyboard flag byte 1 (see int 9h)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7  insert pressed      3  ctrl-numlock (pause) toggled
              ³     6  capslock pressed    2  PCjr keyboard click active
              ³     5  numlock pressed     1  PCjr ctrl-alt-capslock held
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     4  scrollock pressed   0
³40:19³  byte ³ storage for alternate keypad entry (not normally used)
³40:1A³  word ³ pointer to keyboard buffer head character
³40:1C³  word ³ pointer to keyboard buffer tail character
³40:1E³32bytes³ 16 2-byte entries for keyboard circular buffer, read by int 16h
³40:3E³  byte ³ drive seek status - if bit=0, next seek will recalibrate by
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ repositioning to Track 0.
              ³ bit 3  drive D          bit 2  drive C
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     1  drive B              0  drive A
³40:3F³  byte ³ diskette motor status (bit set to indicate condition)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7  write in progress    3  motor on (floppy 3)
              ³     6                       2  motor on (floppy 2)
              ³     5                       1  B: motor on (floppy 1)
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     4                       0  A: motor on (floppy 0)
³40:40³  byte ³ motor off counter
³     ³       ³ starts at 37 and is decremented 1 by each system clock tick.
³     ³       ³ motor is shut off when count = 0.
³40:41³  byte ³ status of last diskette operation     where:
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7 timeout failure                3 DMA overrun
              ³     6 seek failure                   2 sector not found
              ³     5 controller failure             1 address not found
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     4 CRC failure                    0 bad command
³40:42³7 bytes³ NEC floppy controller chip status
³40:49³  byte ³ Video Control Data Area 1 from 0040:0049 through 0040:0066
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ current CRT mode (hex value)
              ³    00h 40x25 BW      (CGA)          01h 40x25 color   (CGA)
              ³    02h 80x25 BW      (CGA)          03h 80x25 color   (CGA)
              ³    04h 320x200 color (CGA)          05h 320x200 BW    (CGA)
              ³    06h 640x200 BW    (CGA)          07h monochrome    (MDA)
              ³extended video modes (EGA/MCGA/VGA or other)
              ³    08h lores,16 color               09h med res,16 color
              ³    0Ah hires,4 color                0Bh n/a
              ³    0Ch med res,16 color             0Dh hires,16 color
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´    0Eh hires,4 color                0Fh hires,64 color
³40:4A³  word ³ number of columns on screen, coded as hex number of columns
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ 20 col = 14h  (video mode 8, low res 160x200 CGA graphics)
              ³ 40 col = 28h
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´ 80 col = 46h
³40:4C³  word ³ screen buffer length in bytes
ÃÄÄÄÄÄÅÄÄÄÄÄÄÄ´(number of bytes used per screen page, varies with video mode)
³40:4E³  word ³ current screen buffer starting offset (active page)
³40:50³8 words³ cursor position pages 1-8
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ the first byte of each word gives the column (0-19, 39, or 79)
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´ the second byte gives the row (0-24)
³40:60³  byte ³ end line for cursor   (normally 1)
³40:61³  byte ³ start line for cursor (normally 0)
³40:62³  byte ³ current video page being displayed  (0-7)
³40:63³  word ³ base port address of 6845 CRT controller or equivalent
ÃÄÄÄÄÄÅÄÄÄÄÄÄÄ´ for active display           3B4h=mono, 3D4h=color
³40:65³  byte ³ current setting of the CRT mode register
³40:66³  byte ³ current palette mask setting  (CGA)
³40:67³5 bytes³ temporary storage for SS:SP during shutdown (cassette interface)
³40:6C³  word ³ timer counter low word
³40:6E³  word ³ timer counter high word
³40:69³  byte ³ HD_INSTALL (Columbia PCs) (not valid on most clone computers)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit  0    0  8 inch external floppy drives
              ³           1  5-1/4 external floppy drives
              ³      1,2     highest drive address which int 13 will accept
              ³              (since the floppy drives are assigned 0-3,subtract
              ³              3 to obtain the number of hard disks installed)
              ³      4,5     # of hard disks connected to expansion controller
              ³      6,7     # of hard disks on motherboard controller
              ³              (if bit 6 or 7 = 1, no A: floppy is present and
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´              the maximum number of floppies from int 11 is 3)
³40:70³  byte ³ 24 hour timer overflow 1 if timer went past midnight
ÃÄÄÄÄÄÅÄÄÄÄÄÄÄ´ it is reset to 0 each time it is read by int 1Ah
³40:71³  byte ³ BIOS break flag (bit 7 = 1 means break key hit)
³40:72³  word ³ reset flag
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ PCjr keeps 1234h here for softboot when a cartridge is installed
              ³ bits 1234h = soft reset, memory check will be bypassed
              ³      4321h = preserve memory         (PS/2 only)
              ³      5678h = system suspended        (Convertible)
              ³      9ABCh = manufacturing test mode (Convertible)
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´      ABCDh = system POST loop mode   (Convertible)
³40:74³  byte ³ status of last hard disk operation ; PCjr special disk control
³40:75³  byte ³ # of hard disks attached (0-2)     ; PCjr special disk control
³40:76³  byte ³ HD control byte; temp holding area for 6th param table entry
³40:77³  byte ³ port offset to current hd adapter  ; PCjr special disk control
³40:78³4 bytes³ timeout value for LPT1,LPT2,LPT3,LPT4
³40:7C³4 bytes³ timeout value for COM1,COM2,COM3,COM4 (0-0FFh secs, default 1)
³40:80³  word ³ pointer to start of circular keyboard buffer, default 03:1E
³40:82³  word ³ pointer to end of circular keyboard buffer, default 03:3E
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ note: early Zenith Z183 BIOS set these pointers to zero and
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´       ignored them.
³40:84³  .... ³ Video Control Data Area 2, 0040:0084 through 0040:008A
³40:84³  byte ³ rows on the screen minus 1 (EGA only)
³40:84³  byte ³ PCjr interrupt flag; timer channel 0  (used by POST)
³40:85³  word ³ bytes per character (EGA only)
³40:85³2 bytes³ (PCjr only) typamatic character to repeat
³40:86³2 bytes³ (PCjr only) typamatic initial delay
³40:87³  byte ³ mode options (EGA only)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 0   0   cursor emulation in effect
              ³         1   no cursor emulation
              ³     1   0   EGA is connected to a color display
              ³         1   EGA is connected to monochrome TTL display
              ³     2   0   wait for vertical retrace (CGA active)
              ³         1   don't wait for vertical retrace (EGA or MDA active)
              ³     3   0   EGA is the active display,
              ³         1   "other" display is active.
              ³     4       reserved
              ³     5,6     EGA memory size
              ³             0,0   64k
              ³             0,1   128k
              ³             1,0   192k
              ³             1,1   256k
              ³     7   0   don't clear screen on mode changes
              ³         1   if the last "set mode" specified not to clear the
              ³             video buffer
              ³ mode combinations:
              ³ bit3  bit1     Meaning
              ³   0     0   EGA is active display and is color
              ³   0     1   EGA is active display and is monochrome
              ³   1     0   EGA is not active, a mono card is active
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´   1     1   EGA is not active, a CGA is active
³40:87³  byte ³ (PCjr only) current Fn key code
ÃÄÄÄÄÄÅÄÄÄÄÄÄÄ´             80h bit indicates make/break key code?
³40:88³  byte ³ feature bits and switches (EGA only) 0=on, 1=off
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 0   switch 1
              ³     1   switch 2
              ³     2   switch 3
              ³     3   switch 4
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     4-7 feature bits
³40:88³  byte ³ (PCjr only) special keyboard status byte
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7 function flag      3 typamatic (0=enable,1=disable)
              ³     6 Fn-B break         2 typamatic speed (0=slow,1=fast)
              ³     5 Fn pressed         1 extra delay bef.typamatic (0=enable)
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     4 Fn lock            0 write char, typamatic delay elapsed
³40:89³  byte ³ (PCjr) current value of 6845 reg 2 (horizontal synch) used by
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ ctrl-alt-cursor screen positioning routine in ROM
              ³  (VGA)
              ³ bit 0       reserved
              ³     1       video summing enabled
              ³     2   0   for color monitor attached
              ³         1   for mono monitor
              ³     3   0   for default palette loading enabled
              ³     4   0   for 8x8 text font
              ³         1   for 8x16 text font
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´     5-7     reserved
³40:8A³  byte ³ (PCjr) CRT/CPU Page Register Image, default 3Fh
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ (VGA)  Display Combination Code Index. This is the value
              ³  set/returned by function 1Ah of the Video BIOS. This byte
              ³  contains an index into the ROM BIOS Display Combination Code
              ³  table, which is a list of byte pairs that specify valid
              ³  combinations of one or two video subsystems. Video subsystems
              ³  are designated by the following values:
              ³  00h     no display
              ³  01h     MDA with monochrome display
              ³  02h     CGA with color display
              ³  03h     reserved
              ³  04h     EGA with color display
              ³  05h     EGA with monochrome display
              ³  06h     Professional Graphics Adapter
              ³  07h     VGA with analog monochrome display
              ³  08h     VGA with analog color display
              ³  09h     reserved
              ³  0Ah     MCGA with digital color display
              ³  0Bh     MCGA with analog monochrome display
              ³  0Ch     MCGA with analog color display
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´  0FFh    unrecognized video subsystem
³40:8B³  byte ³ last diskette data rate selected
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7,6 starting data transfer rate to use
              ³         0,0      500 kb/sec
              ³         0,1      300 kb/sec
              ³         1,0      250 kb/sec
              ³         1,1      reserved
              ³     5,4 last step rate selected
              ³     3   ending data transfer rate to use
              ³     2   reserved
              ³     1   reserved
              ³     0   1  combination floppy/fixed disk controller detected
              ³         0  XT floppy only controller (for 360kb drive) detected
              ³                Data Transfer Rates
              ³       Kbits/sec     Media   Drive   Sectors/Track
              ³         250         360k    360k        9
              ³         300         360k    1.2M        9
              ³         500         1.2M    1.2M       15
              ³         250         720k    720k        9
              ³         250         720k    1.4M        9
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´         500         1.4M    1.4M       18
³40:8C³  byte ³ hard disk status returned by controller
³40:8D³  byte ³ hard disk error returned by controller
³40:8E³  byte ³ hard disk interrupt (bit 7=working interrupt)
³40:8F³  byte ³ combo_card - status of drives 0 and 1
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 7   reserved
              ³     6   drive type determined for drive 1
              ³     5   drive multiple data rate capability for drive 1
              ³         0       no multiple data rate
              ³         1       multiple data rate
              ³     4   1 then drive 1 has 80 tracks
              ³         0 then drive 1 has 40 tracks
              ³     3   reserved
              ³     2   drive type determined for drive 0
              ³     1   drive multiple data rate capability for drive 0
              ³         0       no multiple data rate
              ³         1       multiple data rate
              ³     0   1       the drive 0 has 80 tracks
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´         0       the drive 0 has 40 tracks
³40:90³4 bytes³ media state drive 0, 1, 2, 3
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ floppy_media_state
              ³ bit 7,6 Data transfer rate
              ³         00 - 500 K/sec
              ³         01 - 300 K/sec
              ³         10 - 250 K/sec
              ³         11 - reserved
              ³     5   double stepping required
              ³     4   media/drive determined
              ³     3   reserved
              ³     2-0 present state
              ³         000  360k in 360k unestablished
              ³         001  360k in 1.2M unestablished
              ³         010  1.2M in 1.2M unestablished
              ³         011  360k in 360k established
              ³         100  360k in 1.2M established
              ³         101  1.2M in 1.2M established
              ³         110  reserved
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´         111  none of the above
³40:94³2 bytes³ track currently seeked to drive 0, 1
³40:96³  byte ³ keyboard flag byte 3 (see int 9h)
³40:97³  byte ³ keyboard flag byte 2 (see int 9h)
³40:98³ dword ³ segment:offset pointer to users wait flag
³40:9C³ dword ³ users timeout value in microseconds
³40:A0³  byte ³ real time clock wait function in use
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bits 7    wait time elapsed and posted flag
              ³      6-1  reserved
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´      0    int 15h, function 86h (WAIT) has occurred
³40:A1³  byte ³ LAN A DMA channel flags
³40:A2³2 bytes³ status LAN A 0,1
³40:A4³ dword ³ saved hard disk interrupt vector
³40:A8³ dword ³ SAVE_PTR: EGA pointer to table of 7 parameters in segment:
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´           offset format. Format of table:
              ³ D_1 dword   pointer to 1472 byte table of 64 video parameters
              ³ D_2 dword   reserved
              ³ D_3 dword   reserved
              ³ D_4 dword   reserved
              ³ D_5 dword   reserved for future use
              ³ D_6 dword   reserved for future use
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´ D_7 dword   reserved for future use
³40:B0³2 words³ international support                   (Tandy 1000 TX)
³40:B4³  byte ³ keyboard NMI control flags              (Convertible)
³40:B4³  byte ³ monochrome monitor hookup detect        (Tandy 1000 TX)
³     ³       ³ 00h not present   0FFh  present
³40:B5³ dword ³ keyboard break pending flags            (Convertible)
³40:B5³  byte ³ extended equipment detect  (5 bits)     (Tandy 1000 TX)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 0 = 0   drive A is 5¬
              ³         1   drive A is 3«
              ³     1 = 0   drive A is 5¬
              ³         1   drive A is 3«
              ³     2 = 0   Tandy 1000 keyboard layout
              ³         1   IBM keyboard layout
              ³     3 = 0   CPU slow mode
              ³         1   CPU fast mode
              ³     4 = 0   internal color video support enabled
              ³         1   internal color video support disabled, external
              ³             video enabled (chg from mb'd to expansion card)
              ³     5 = 0   no external monochrome video installed
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´         1   external monochrome video installed
³40:B6³  byte ³ extended equipment detect  (1 bit)      (Tandy 1000 TX)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ bit 0 = 0   drive C is 5¬
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´         1   drive C is 3«
³40:B9³  byte ³ port 60 single byte queue               (Convertible)
³40:BA³  byte ³ scan code of last key                   (Convertible)
³40:BB³  byte ³ pointer to NMI buffer head              (Convertible)
³40:BC³  byte ³ pointer to NMI buffer tail              (Convertible)
³40:BD³16bytes³ NMI scan code buffer                    (Convertible)
³40:CE³  word ³ day counter                             (Convertible and after)
³  to ³ -04:8F³               end of BIOS Data Area
ÃÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³ ** End of BIOS Data Area **
ÃÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
³40:90³-40:EF ³ reserved by IBM
³40:F0³16bytes³ Inter-Application Communications Area (for use by applications
³40:FF³       ³ to transfer data or parameters to each other)
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ 1) Used by Turbo Power's FMARK (mark memory for TSRs).
              ³ 2) Used by Norton Utilities' TimeMark to store the time.
              ³ 3) Used by BRIEF editor.
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´
³50:00³ byte  ³ DOS print screen status flag
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´        00h    not active or successful completion
              ³        01h    print screen in progress
ÚÄÄÄÄÄÂÄÄÄÄÄÄÄ´        0FFh   error during print screen operation
³50:01³       ³ Used by BASIC
³50:02-03     ³ PCjr POST and diagnostics work area
³50:04³  byte ³ Single drive mode status byte - not used by AT&T DOS 2.11!
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´         00     logical drive A was last active
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ´         01     logical drive B was last active
³50:05-0E     ³ PCjr POST and diagnostics work area
³50:0F³       ³ BASIC: SHELL flag (set to 02h if there is a current SHELL)
³50:10³  word ³ BASIC: segment address storage (set with DEF SEG)
³50:12³4 bytes³ BASIC: int 1Ch clock interrupt vector segment:offset storage
³50:16³4 bytes³ BASIC: int 23h ctrl-break interrupt segment:offset storage
³50:1A³4 bytes³ BASIC: int 24h disk error int vector segment:offset storage
³50:1B-1F     ³ Used by BASIC for dynamic storage
³50:20-21     ³ Used by DOS for dynamic storage
³50:22-2C     ³ Used by DOS for diskette parameter table. See int 1Eh for values
ÀÄÄÄÄÄÁÄÄÄÄÄÄÄ´ In DOS 1.0 this is located in the ROM BIOS, but in DOS 1.1 and
              ³ subsequent it is a part of DOS located at 05:22. The first byte
              ³ (out of eleven) of the Disk Parameter contains the hexadecimal
              ³ value CF in DOS 1.0 and DF in DOS 1.1 and later.
              ³ DOS 1.0   24ms
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ´ DOS 1.1   26ms
³50:30-33     ³ Used by MODE command
³50:81³       ³ number of floppies installed in the system?
³50:82³       ³ first hard disk drive?
³50:83³       ³ last hard disk drive?
³50:34-FF     ³ Unknown - Reserved for DOS
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ



Absolute Addresses .................................................... 2**6

0008:0047 IO.SYS or IBMBIO.COM IRET instruction. This is the dummy routine that
          interrupts 01h, 03h, and 0Fh are initialized to during POST.
C000:001E EGA BIOS signature (the letters IBM)
F000:FA6E table of characters 00h-7Fh used by int 10h video BIOS
          The first 128 characters are stored here and each occupies 8 bytes.
          The high bit ones are somewhere on the video adapter card.
F000:FFF5 BIOS release date
F000:FFFE PC model identification

     ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
     ³ ROM BIOS    Ú model byte                                            ³
     ³ copyright   ³    Ú submodel byte          machine                   ³
     ³   date      ³    ³    Ú revision                                    ³
     ÃÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÅÄÄÄÄÅÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
     ³          ³ 00 ³ 00 ³ 00 ³ AT&T 6300, Olivetti PC                    ³
     ³ 09/02/86 ³ FA ³ 00 ³ 00 ³ PS/2 Model 30                             ³
     ³ 01/10/86 ³ FB ³ 00 ³ 00 ³ XT-2 (early)                              ³
     ³ 01/10/86 ³ FB ³ 00 ³ 01 ³ XT Model 089                              ³
     ³ 05/09/86 ³ FB ³ 01 ³ 02 ³ XT-2 (revised)                            ³
     ³ 01/10/84 ³ FC ³ -- ³ -- ³ AT Model 099 (original)                   ³
     ³ 06/10/85 ³ FC ³ 00 ³ 01 ³ AT Model 239 6mHz      (6.6 max governor) ³
     ³ 11/15/85 ³ FC ³ 01 ³ 00 ³ AT Model 339, 339 8mHz (8.6 max governor) ³
     ³          ³ FC ³ 01 ³ 00 ³ Compaq 386/16