DOS Technical Reference

Total Page:16

File Type:pdf, Size:1020Kb

DOS Technical Reference -------- - ---- Personal Computer - ---- - --- ------ - . - Programming Family DOS Technical Reference 6138536 Preliminary First Edition (February 1985) The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent ~ith local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES TIllS PUBLICATION "AS IS" wrrnom WARRANTY OF ANY KIND, EmlER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 1HE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. lbis publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and!or changes in the product(s) and/or the program(s) described in this pUblication at any time. It is possible that this publication may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country. Products are not stocked at the address below. Requests for copies of this publication and for technical information about IBM Personal Computer products should be made to your authorized IBM Personal Computer dealer, IBM Product Center, or your IBM Marketing Representative. The following paragraph applies only to the United States and Puerto Rico: A Reader's Comment Form is provided at the back of this publication. If the form has been removed. address comments to: IBM Corporation, Personal Computer, P.O. Box 1328-C, Boca Raton, Florida 33432. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligations whatever. © Copyright International Business Machines Corporation 1984, 1985 rreununary About This Book Read This First This book contains technical information pertaining to DOS versions 2.10, 3.00, and 3.10. Some information is specific to a version of DOS and does not apply to all versions. This book covers topics for the experienced DOS user, system programmer, and application developer. It is assumed that you are familiar with the 8088 architecture. Version Specific Information Chapters that contain information that is specific to a version of DOS, contain a section called "Version Specific Information." This section identifies the information in the chapter that is for use with a particular version of DOS. Chapters that do not contain this section contain information that applies to DOS versions 2.10, 3.00, and 3.10. iii Preliminary How This Book is Organized This book has 11 chapters. Chapter 1 contains general technical information about DOS. Chapter 2 contains detailed information about device drivers. Chapter 3 contains detailed information about using extended screen and keyboard functions to control cursor positioning and to redefine keyboard keys. Chapter 4 contains notes and considerations for proper file management. Chapter 5 describes allocation of space on a disk. Chapter 6 describes the system interrupts and function calls. Chapter 7 describes control blocks and work areas, including a memory map, program segment prefix, and file control block. Chapter 8 explains how to execute commands from within an application. Chapter 9 contains technical information about DOS support of fixed disks. Chapter 10 contains detailed information about .EXE file structure. Chapter 11 contains information about DOS memory management. iv rreununary Contents Chapter 1. DOS Technical Information •••••.•.• 1-1 Introduction ......................... 1-3 Version Specific Information ............ 1-3 DOS Structure ..................... '.. 1-4 The Boot Record ................. 1-4 Read Only Memory (ROM) BIOS Interface ....................... 1-4 The DOS Program File ............. 1-5 The Command Processor ........... 1-5 DOS Initialization ..................... 1-7 Available DOS Functions ............... 1-8 The Disk Transfer Area (DTA) .......... 1-9 Error Trapping ...................... 1-10 Chapter 2. Installable Device Drivers •••••••..•• 2-1 Introduction ......................... 2-3 Version Specific Information ............ 2-3 Device Driver Format .................. 2-4 Types of Devices ...................... 2-5 Character Devices ................. 2-5 Block Devices .................... 2-5 Device Header ....................... 2-6 Pointer to Next Device Header Field .. 2-6 Attribute Field ................... 2-7 Pointer to Strategy and Interrupt Routines ....................... 2-9 Name/Unit Field ................. 2-9 Creating a Device Driver .............. 2-10 Installing Device Drivers ............... 2-11 Installing Character Devices ........ 2-12 Installing Block Devices ........... 2-12 Request Header ..................... 2-14 Unit Code Field ................. 2-14 Command Code Field ............. 2-15 Status Field ..................... 2-16 Device Driver Functions ............... 2-18 !NIT .......................... 2-19 v Preliminary MEDIA CHECK ................ 2-21 Media Descriptor Byte ............ 2-23 BUlLD BPB (BIOS Parameter Block) 2-26 INPUf or OUfPUf .............. 2-29 NONDESTRUCTIVE INPUT NO WAIT ........................ 2-31 STAJUS ....................... 2-32 Fl.USH ........................ 2-33 OPEN or CLOSE (DOS 3.00 and 3.10) 2-34 REMOVABLE :MEDIA (nOS 3.00 and 3.10) ......................... 2-35 The CLOCKS Device ................. 2-36 Sample Device Driver ........... ~ . .. 2-36 Chapter 3. Using Extended Screen and Keyboard Control .• 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ••• 0 •• 0 e 0 0 0 3-1 Introduction ......................... 3-3 Control Sequences .................... 3-3 Control Sequence Syntax ............... 3-4 Cursor Control Sequences .............. 3-6 Cursor Position ................... 3-6 Cursor Up ....................... 3-7 Cursor Down .................... 3-7 Cursor Forward .................. 3-8 Cursor Backward ................. 3-8 Horizontal and Vertical Position ...... 3-9 Cursor Position Report ............ 3-10 Device Status Report ............. 3-10 Save Cursor Position ..... .. 3-12 Restore Cursor Position ........... 3-12 Erasing ............................ 3-13 Erase in Display ................. 3-13 Erase in Line .................... 3-13 Mode of Operation ................... 3-14 Keyboard Key Reassignment ........... 3-17 Chapter 4. File Management Notes •••••••••••. 4-1 Introduction ......................... 4-3 Version Specific Information ............ 4-3 File Management Functions ............. 4-3 FCB Function Calls ................... 4-5 Handle Function Calls ................. 4-6 Special File Handles ................... 4-8 vi Preliminary ASCn and Binary Mooe ................ 4-9 File IIO in Binary Mooe ........... 4-10 File IIO in ASCn Mooe ........... 4-11 Number of Open Files Allowed ......... 4-12 Restrictions on FCB Usage ............. 4-12 Restrictions on Handle Usage ........... 4-13 Allocating Space to a File .............. 4-14 Chapter 5. DOS Disk Allocation •••.....•••... 5-1 Introduction ......................... 5-3 Version Specific Information ............ 5-3 The DOS Area ........................ 5-4 The Boot Record ..................... 5-4 DOS File Allocation Table (FAT) ........ 5-5 How to Use the File Allocation Table for 12-Bit FAT Entries .............. 5-8 How to Use the File Allocation Table for 16-Bit FAT Entries .............. 5-9 DOS Disk Directory .................. 5-10 Directory Entries ................ 5-10 The Data Area ...................... 5-14 Chapter 6. DOS Interrupts and Function Calls •••. 6-1 Introduction ......................... 6-7 Version Specific Information ............ 6-7 DOS Registers ....................... 6-9 Extended ASCn Codes ............... 6-11 Interrupts .......................... 6-12 20H Program Terminate ........... 6-12 21H Function Request ............ 6-13 22H Tenninate Address ........... 6-13 23H Ctrl-Break Exit Address ....... 6-13 24H Critical Error Handler Vector ... 6-14 25H Absolute Disk Read .......... 6-22 26H Absolute Disk Write .......... 6-23 27H Tenninate but Stay Resident .... 6-24 28H-2EH Reserved for DOS ....... 6-25 2FH Multiplex Interrupt ........... 6-26 30H-3FH Reserved for DOS ....... 6-31 Function Calls ...................... 6-32 Listing of Function Calls .......... 6-33 DOS Internal Stack ............... 6-36 Error Return Information .......... 6-36 vii Preliminary ASCnz Strings .................. 6-44 Network Paths .................. 6-45 Network Access Rights ............ 6-45 File Handles .................... 6-46 Using DOS Functions ............. 6-47 OOH Program Terminate ............... 6-49 01H Keyboard Input .................. 6-50 02H Display Output .................. 6-51 03H Auxiliary Input .................. 6-52 04H Auxiliary Output ................. 6-53 05H Printer Output ............. .. 6-54 06H Direct ConsoleI/O ............... 6-55 07H Direct Console Input Without Echo .. 6-56 08H Console Input Without Echo ....... 6-57 09H Print String ..................... 6-58 OAH Buffered Keyboard Input .......... 6-59 OBH Check Standard Input Status ....... 6-60 OCH Clear Keyboard Buffer and Invoke a Keyboard Function ................... 6-61 ODH Disk Reset ..................... 6-62
Recommended publications
  • Boot Mode Considerations: BIOS Vs UEFI
    Boot Mode Considerations: BIOS vs. UEFI An overview of differences between UEFI Boot Mode and traditional BIOS Boot Mode Dell Engineering June 2018 Revisions Date Description October 2017 Initial release June 2018 Added DHCP Server PXE configuration details. The information in this publication is provided “as is.” Dell Inc. makes no representations or warranties of any kind with respect to the information in this publication, and specifically disclaims implied warranties of merchantability or fitness for a particular purpose. Use, copying, and distribution of any software described in this publication requires an applicable software license. Copyright © 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be the property of their respective owners. Published in the USA [1/15/2020] [Deployment and Configuration Guide] [Document ID] Dell believes the information in this document is accurate as of its publication date. The information is subject to change without notice. 2 : BIOS vs. UEFI | Doc ID 20444677 | June 2018 Table of contents Revisions............................................................................................................................................................................. 2 Executive Summary ............................................................................................................................................................ 4 1 Introduction ..................................................................................................................................................................
    [Show full text]
  • Club-80 Heft 41 (Bw Ocr).Pdf
    Inhaltsverzeichnis * . Autor & Seite Autor & Seite Clubinternes Hardware Zusammenfassung Fragebogenaktion 1-5 Floppy-Tester 65- 66 Jens Neueder Artikel aus Elektor Neues vom Vorstand 6 - 8 Club 80-Neumitglieder aus "CP/M-aktuell"-Usergruppe Auswertung der Fragebogen zur Mitgliederkarteiaktualisierung Nachträge zum Vorwort 9-10 Club 80 Börse 67 Hartmut Obermann Suche... Uwe Schobert Clubinfo H - 12 Termine 13 Jens Neueder Sonstiges Neuigkeiten für CP/M 69 Vorstellung 13 - 14 Alexander Schmid Jörg Lindner Genie News: Neue Preisstrukturen 70- 71 Software Wissenswertes ZCPR oder Z3Plus 72- 73 Literaturrecherche: USA, England, Deutschland 73-85 Austausch von Grafiken DOS -> CP/M 15 - 18 Egbert Schröer Alexander Schmid Wichtige T ip s... Elektrikers 86 Grafik des Gills unter Holte CP/M + 19-26 Alexander Schmid Volker Dose, Egbert Schröer Model 4 intern: Dem Interpreter aufs Bit geschaut 27 - 35 Artikel aus CP Die letzten Seiten Impressum 87 MSDOS-Trick: Command /F 35 Schluß 88 Insider-Info: Windows-Fehler 68 Redaktion Hartmut Obermann Mitgliederadressenliste am INFO-Ende Microsoft Link80 und .SYM-Datei 36 Sonderheft: Wissenswertes rund um den Z280 am INFO-Ende Uwe Schobert Software-Technik und Compilerbau 37-38 Artikel aus PASCAL IMP - ein DFÜ-Programm für CP/M 39-44 Günther W. Braun Internet und UUCP mit CP/M 45- 58 Volker Dose Internet via Genie 59- 62 GE-Mail aud Internet Access 63- 64 Egbert Schröer Fragebogenaktion Auswertung/Zusammenfassung Von 70 versandten Fragebögen erhielten wir bisher 43 mehr oder weniger vorhandene Erfahrungen: ausgefüllt wieder zurück. Die folgenden Seiten geben eine Zusammenfassung 21 Club-Mitglieder würden gern ihre Hard- und/oder Softwareerfahrungen den Eurer Antworten/Angaben wieder.
    [Show full text]
  • Chapter 3. Booting Operating Systems
    Chapter 3. Booting Operating Systems Abstract: Chapter 3 provides a complete coverage on operating systems booting. It explains the booting principle and the booting sequence of various kinds of bootable devices. These include booting from floppy disk, hard disk, CDROM and USB drives. Instead of writing a customized booter to boot up only MTX, it shows how to develop booter programs to boot up real operating systems, such as Linux, from a variety of bootable devices. In particular, it shows how to boot up generic Linux bzImage kernels with initial ramdisk support. It is shown that the hard disk and CDROM booters developed in this book are comparable to GRUB and isolinux in performance. In addition, it demonstrates the booter programs by sample systems. 3.1. Booting Booting, which is short for bootstrap, refers to the process of loading an operating system image into computer memory and starting up the operating system. As such, it is the first step to run an operating system. Despite its importance and widespread interests among computer users, the subject of booting is rarely discussed in operating system books. Information on booting are usually scattered and, in most cases, incomplete. A systematic treatment of the booting process has been lacking. The purpose of this chapter is to try to fill this void. In this chapter, we shall discuss the booting principle and show how to write booter programs to boot up real operating systems. As one might expect, the booting process is highly machine dependent. To be more specific, we shall only consider the booting process of Intel x86 based PCs.
    [Show full text]
  • Unit V Algorithm for Booting the UNIX System
    Unit V Algorithm for booting the UNIX system : As we’ve noted, the boot process begins when the instructions stored in the computer’s permanent, nonvolatile memory (referred to colloquially as the BIOS, ROM,NVRAM, and so on) are executed. This storage location for the initial boot instructions is generically referred to as firmware (in contrast to “software,” but reflecting the fact that the instructions constitute a program[2]). These instructions are executed automatically when the power is turned on or the system is reset, although the exact sequence of events may vary according to the values of stored parameters.[3] The firmware instructions may also begin executing in response to a command entered on the system console (as we’ll see in a bit). However they are initiated, these instructions are used to locate and start up the system’s boot program , which in turn starts the Unix operating system. The boot program is stored in a standard location on a bootable device. For a normal boot from disk, for example, the boot program might be located in block 0 of the root disk or, less commonly, in a special partition on the root disk. In the same way, the boot program may be the second file on a bootable tape or in a designated location on a remote file server in the case of a network boot of a diskless workstation. There is usually more than one bootable device on a system. The firmware program may include logic for selecting the device to boot from, often in the form of a list of potential devices to examine.
    [Show full text]
  • Open WATCOM Programmer's Guide
    this document downloaded from... Use of this document the wings of subject to the terms and conditions as flight in an age stated on the website. of adventure for more downloads visit our other sites Positive Infinity and vulcanhammer.net chet-aero.com Watcom FORTRAN 77 Programmer's Guide Version 1.8 Notice of Copyright Copyright 2002-2008 the Open Watcom Contributors. Portions Copyright 1984-2002 Sybase, Inc. and its subsidiaries. All rights reserved. Any part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of anyone. For more information please visit http://www.openwatcom.org/ Portions of this manual are reprinted with permission from Tenberry Software, Inc. ii Preface The Watcom FORTRAN 77 Programmer's Guide includes the following major components: · DOS Programming Guide · The DOS/4GW DOS Extender · Windows 3.x Programming Guide · Windows NT Programming Guide · OS/2 Programming Guide · Novell NLM Programming Guide · Mixed Language Programming · Common Problems Acknowledgements This book was produced with the Watcom GML electronic publishing system, a software tool developed by WATCOM. In this system, writers use an ASCII text editor to create source files containing text annotated with tags. These tags label the structural elements of the document, such as chapters, sections, paragraphs, and lists. The Watcom GML software, which runs on a variety of operating systems, interprets the tags to format the text into a form such as you see here. Writers can produce output for a variety of printers, including laser printers, using separately specified layout directives for such things as font selection, column width and height, number of columns, etc.
    [Show full text]
  • Bootloader and Startup Feature Overview and Configuratoin Guide
    TechnicalTTechnicalechnical GuideGuidGuidee Bootloader and Startup Feature Overview and Configuration Guide The AlliedWare Plus™ Bootloader Every switch has a startup process. The end result of the startup is that the unit is running a specific version of the operating system software, with the features configured according to a specific startup configuration file. The startup process goes through two main phases: First, the switch boots up off a dedicated bootloader software image, which initializes core functionality of the unit. Then, the bootloader launches the main operating software image, and passes control over to this operating system. The bootloader is the executable code responsible for setting up the system and loading the operating system software. The bootloader is the software that runs the unit when it first powers up, performing basic initialization and executing the product software release. As part of the startup process of the switch, the bootloader allows you various options before running the product operating system software. C613-22004-00 x REV A alliedtelesis.com Products and software version that apply to this guide This guide applies to all AlliedWare Plus products, running version 5.4.4 or later. However, not all features in this guide are supported on all products. To see whether a product supports a particular feature or command, see the following documents: The product’s Datasheet The AlliedWare Plus Datasheet The product’s Command Reference These documents are available from the above links on our website at alliedtelesis.com. Feature support may change in later versions. For the latest information, see the above documents. Content The AlliedWare Plus™ Bootloader ....................................................................................
    [Show full text]
  • Using the OMAP-L132/L138 Bootloader
    Application Report SPRAB41F–January 2014–Revised January 2019 Using the OMAP-L132/L138 Bootloader Joseph Coombs ABSTRACT This application report describes various boot mechanisms supported by the OMAP-L132/L138 bootloader read-only memory (ROM) image. Topics covered include the Application Image Script (AIS) boot process, an AISgen tool used to generate boot scripts, protocol for booting the device from an external master device, a UART Boot Host GUI for booting the device from a host PC, and any limitations, default settings, and assumptions made by the bootloader. Project collateral discussed in this application report can be downloaded from the following URL: http://www.ti.com/lit/zip/sprab41. Contents 1 Introduction ................................................................................................................... 3 2 Boot Modes................................................................................................................... 3 3 Non-AIS Boot Modes........................................................................................................ 3 4 Application Image Script (AIS) Boot....................................................................................... 6 5 AISgen: Tool to Generate Boot Script (AIS Image).................................................................... 11 6 Master Boot – Booting From a Slave Memory Device ................................................................ 19 7 Slave Boot – Booting From an External Master Host ................................................................
    [Show full text]
  • Table of Contents
    ^9/08/89 11:43 U206 883 8101 MICROSOFT CORP.. 12)002 Table of Contents m-^mm Table of Contaits 09/08/89 11:44 'Q206 883 8101 MICROSOFT CORP _ _ [ 1003 The Story Begins JAN The story of MS-DOS_begins ..in a hotel in Albuquerque, New Mexico. 1975 In 1975, Albuquerque was the home of Micro Instrumentation'Telemetry MiTS introduces the 8080-baseci Systems, better known as MITS- In January of that year, MITS had intro- Altair computer. duced a kit computer called the Altair. When it was first snipped, the Altair consisted of a metal box with, a panel of switches for input and output, a power supply, and-two boards. One board was the CPU.. At its heart was the 8-bit 8080 microprocessor chip from InteL The other board provided 256 bytes of memory. The Altair had no keyboard, no monitor, and no permanent storage. But it had a revolutionary price tag. It cost $397. For the first time, the term "personal computer" acquired a real-world meaning. The real world of the Altair was not, however, the world of business computing. It was-primarily the world of the computer hobbyist These first users of the microcomputer were not as interested in using spreadsheets and word processors as they were in programming. Accordingly, the first soft- ware for the Altair was a programming language. And the company that developed it was a two-man firm, in Albuquerque, called Microsoft FEB The two men at MiCTosof^ej^PailjAJten^and Bffl Gates-Allen and 1975 Gates-had met when-they were both students at Lakeside High School in Microsoft sails first BASIC to Seattle, where they began their computer-science education oa the school's MITS lor Altair time-sharing terminal By the time Gates had graduated, me two of them had computer.
    [Show full text]
  • Installation Guide
    ATA Hard Drive Installation Guide Copyright © 2002 Maxtor Corporation. All rights reserved. Changes are periodically made to the information herein which will be incorporated in revised editions of this publication. Maxtor may make changes or improvements to the product(s) described in this publication at any time and without notice. MaxBlast is a trademark and Maxtor is a registered trademark of Maxtor Corporation. All other brands or products are trademarks or registered trademarks of their respective holders. FCC Declaration of Conformance This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received including interference that may cause undesired operation. Maxtor Corporation Part Number 500 McCarthy Blvd., Milpitas, California 95035 USA 20186800/A P/N: 20186800/A Contents 1 Getting Started . 1 Handling the Hard Drive. 1 Operating System Requirements . 1 Back Up Your Data . 2 Important Capacity Notice . 2 2 Installing the Hard Drive. 3 Removing the System Cover. 3 Setting the Jumpers . 4 Mounting the Hard Drive . 7 Attaching the Cables . 9 Configuring the System BIOS . 12 3 Formatting the Hard Drive . 15 Installing Hard Drive as a Boot Drive. 16 Installing Hard Drive to Replace Existing Hard Drive. 20 Installing Hard Drive as an Additional Hard Drive . 21 4 Getting Help . 23 Installation Troubleshooting . 23 Frequently Asked Questions . 25 5 Glossary . 27 Maxtor Product Warranty. 30 Getting Started 1 Thank you for selecting a Maxtor hard drive storage product. This installation guide will lead you through the installation of your hard drive.
    [Show full text]
  • Using the OMAP-L1x7 Bootloader Urmil Parikh and Joseph Coombs
    Application Report SPRAB04G– June 2012 Using the OMAP-L1x7 Bootloader Urmil Parikh and Joseph Coombs ABSTRACT This application report describes various boot mechanisms supported by the OMAP-L1x7 bootloader read- only memory (ROM) image. Topics covered include the Application Image Script (AIS) boot process, an AISgen tool used to generate boot scripts, protocol for booting the device from an external master device, a UART Boot Host GUI for booting the device from a host PC, and any limitations, default settings, and assumptions made by the bootloader. Project collateral discussed in this application report can be downloaded from the following URL: http://www.ti.com/lit/zip/SPRAB04. Contents 1 Introduction .......................................................................................................................................................... 2 2 Boot Modes .......................................................................................................................................................... 3 3 Non-AIS Boot Modes ........................................................................................................................................... 3 4 Application Image Script (AIS) Boot ..................................................................................................................... 5 5 AISgen: Tool to Generate Boot Script (AIS image) ........................................................................................... 11 6 Master Boot – Booting From a Slave Memory Device
    [Show full text]
  • Windows in Concurrent PC
    Using Concurrent PC DOS OTHER BOOKS BY THE AUTHOR Microcomputer Operating Systems (1982) The Byte Guide to CP/M-86 (1984) Using Concurrent PC DOS Mark Dahmke McGraw-Hili Book Company New York St. Louis San Francisco Auckland Bogota Hamburg Johannesburg London Madrid Mexico Montreal New Delhi Panama Paris Sao Paulo Singapore Sydney Tokyo Toronto Library of Congress Cataloging-in-Publication Data Dahmke, Mark. U sing Concurrent PC DOS. Bibliography: p. Includes index. 1. Concurrent PC DOS (Computer operation system) 1. Title. QA76.76.063D34 1986 005.4' 469 85-15473 ISBN 0-07-015073-7 Copyright © 1986 by McGraw-Hili, Inc. All rights reserved. Printed in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of the publisher. 1234567890 DOC/DOC 893210876 ISBN 0-07-015073-7 The editors for this book were Steven Guty and Vivian Koenig, the designer was Naomi Auerbach, and the production supervisor was Teresa F. Leaden. It was set in Century Schoolbook by Byrd Data Imaging. Printed and bound by R. R. Donnelley & Sons Company. To my sister Patricia Contents Chapter 1. Introduction 1 What Is Concurrent PC DOS? 1 What Is an Operating System? 1 The DOS Family Tree 3 The Scope of This Book 5 Chapter 2. Concurrent PC DOS Compatibility 6 Concurrent PC DOS Compatibility 6 PC·DOS, TopView, and the IBM PC AT 7 Concurrent CP/M·86 9 Chapter 3.
    [Show full text]
  • Loading and Executing a Child Process
    Loading and Executing a Child Process by Kip Irvine. Last update: 12/11/2003 MS-DOS has always taken a fairly straightforward approach to loading and executing programs. From the start, it was designed to be a simple, single-tasking operating system. Many applications rely on other programs to perform useful services. Suppose you were using a text editor, and you needed to view a calendar. You wouldn’t want to have to close the editor to view a calendar, of course, but under MS-DOS, you could not run both programs at the same time. The text editor’s author could include code to display calendars, but it would increase the size of the program and probably be a poor imitation of existing calendar programs. The answer to this problem, of course, would be to run a calendar program directly from the text editor. MS-DOS provides a convenient hook that lets you launch any executable program much in the manner of a subroutine call. The calling program is suspended, the called program exe- cutes, and when it finishes, control returns to the calling program. There are small tradeoffs, of course. First, the calling program, which we will call the par- ent from now on, must resize the default memory allocation assigned to it by MS-DOS when it was loaded. The allocation is far more generous than necessary, because MS-DOS doesn’t know how much memory you plan to use during the program’s execution. Second, the parent program must construct a structure called a parameter block that con- tains pointers to its own MS-DOS environment, a command-line string, and other miscellaneous information.
    [Show full text]