Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
DOS programming
Jamsa K., McGraw-Hill, Inc., New York, NY, 1991. Type: Book (9780078817823)
Date Reviewed: Oct 1 1993

Jamsa presents DOS as a manager of system resources. Not only does the book provide the details of DOS system services, it gives an overall picture of how the various pieces of the DOS kernel work together. This work is not mandatory reading for DOS users, but is useful to those who really want to make their system hum, for which it is important to know what is inside.

Many chapters end with sections titled “Something New,” which present material that probably cannot be found elsewhere, such as how to use undocumented DOS features to unlock the power of the function just discussed. The concepts and examples presented throughout the book are supported in almost every version of DOS; in special cases, the version required is mentioned. The most recent version covered is DOS 5.0.

The book is structured in 25 chapters, which cover every important aspect of running a PC. The first chapter, “Introduction to DOS System Services,” reviews the main concepts necessary to understanding the next chapters, like the relationship between application programs, DOS services, the BIOS, and the PC’s hardware; the computer’s memory usage; registers; and interrupts. Ways to access DOS system services using various programming languages are also described.

The second chapter is dedicated to the BIOS services. A detailed explanation of each service is not provided; instead, tables serve as a quick reference for someone creating programs that require BIOS services.

Special attention is paid to the computer’s memory, which is discussed in four chapters. One examines the different memory models and how they influence program performance. A simulation program in C serves as an illustration. The other three chapters are dedicated to conventional memory management (chapter 19, “DOS Memory Allocation”) and extended and expanded memory services (chapters 20 and 21). Some illustrative programs contribute to a better understanding of the concepts and techniques used.

Executing and managing programs is of particular interest. A chapter is dedicated to the creation of a hierarchy of programs and related problems, such as using the parent’s environment, overlaying, and spawning programs.

Although DOS is a single-tasking operating system, terminate-and-stay-resident (TSR) programs allow it to simulate some of the capabilities of a multitasking operating system. Chapter 10 examines the steps necessary to create such programs. Several operations TSR programs should perform to avoid side effects are included.

To provide a better understanding of how EXE and COM programs run, chapter 4, “Dissecting the Program Segment Prefix,” takes a detailed look at the PSP buffer, which contains such information as the program’s command line and a pointer to the program’s environment copy. The problem of the DOS environment is reconsidered in chapter22, which examines the ways programs can use their environment copies and ways they can access the actual DOS environment.

DOS 5.0 includes a facility called the task switcher that allows the user to load several programs into memory at once, so it is possible to switch quickly from one program to another. Jamsa examines the system services and data structures introduced in DOS 5.0 to support the task switcher. To use the services discussed in this chapter, it is necessary to use the DOS 5.0 shell.

Regardless of its purpose, every program uses peripheral equipment in some way. The author has dedicated a number of chapters to the various services necessary for handling peripherals. One chapter covers each I/O device type: keyboard, screen, printer, mouse, and disk. Chapter 5 presents various ways to perform keyboard input using the DOS services, with special attention to the enhanced keyboard. Using different output techniques to display characters on a monitor screen is described thoroughly in chapter 6. The next chapter examines all the printer services that programs might need. It covers performing high-level file operations through a parallel or a serial port, how to write to these devices using DOS and BIOS services, and how to submit files to the DOS print queue. The chapter dedicated to the mouse examines the installation of a mouse driver, customizing the text mode and graphics mode cursors, controlling the movement and speed of the mouse, and other services fully, with examples.

Special attention is paid to disks. The main problems analyzed are the DOS boot record, disk partitions and logical drivers, BIOS, and IOCTL services. Problems specific to hard disks are also treated. Both the problems of direct access to the information and the handling of information by means of files are presented. Two interesting chapters are dedicated to the DOS file services and DOS directory services. These functions are presented in correspondence with the evolution of the operating system.

Performing I/O by means of runtime library routines is the topic of chapter 14. This chapter also takes a detailed look at how files are stored on the disk and how DOS manages open files.

Because many different operations can lead to critical errors, DOS provides a default critical-error handler. In chapter 16, the author teaches readers how to create their own critical-error handlers.

The appearance of new peripherals requires the knowledge to create a corresponding device driver. Jamsa describes device driver components and functions and how to write a device driver.

The powerful device driver ANSI.SYS is described separately. Its abilities are presented in detail. Jamsa also discusses the overhead introduced by its use and the tradeoffs that should be considered before using ANSI.SYS.

Several of the more powerful DOS programming examples use the undocumented Int 21H function 52H, which returns a pointer to the DOS list of lists. The contents of this area in memory, containing the values or addresses of key DOS data structures, are presented in a separate chapter. Because the contents of this list vary from version to version, all of the forms from DOS 2.0 to DOS 5.0 are described.

The author is also concerned with the problems created by the spread of DOS all over the world, which require knowledge of country-specific formatting information, code pages, keyboard templates, screen and printer fonts, and code-page information files. An entire chapter, “Programming for International DOS Use,” presents the programmer interface to the international DOS capabilities.

This book contains many C, Pascal, BASIC, and assembly language programs. To make these programs easier to experiment with, the author provides them on disk.

The four appendices, “DOS Interrupts and System Services,” “DOS Data Structures,” “ASCII and Extended ASCII Character Sets,” and “Recommended Reading,” are a useful guide to system use. A comprehensive index provides quick access to any topic covered in the book.

The book is a fabulous work and an invaluable resource that should be in every programmer’s library.

Reviewer:  Mihaela Cärstea Review #: CR116859
Bookmark and Share
 
Dos (D.4.0 ... )
 
 
Reference (A.2 )
 
Would you recommend this review?
yes
no
Other reviews under "Dos": Date
Dvorak’s guide to DOS and PC performance
Dvorak J. (ed), Nick J., Osborne/McGraw-Hill, Berkeley, CA, 1991. Type: Book (9780078816581)
May 1 1992
DOS 5 made easy
Schildt H., Osborne/McGraw-Hill, Berkeley, CA, 1991. Type: Book (9780078816901)
Jun 1 1992
Maximizing MS-DOS 5
Solomon D., Boyce J., Coulter M., Ellis J., Kusnierz D., Marchi M., Stuple S., Trout D., Underdahl B., White K., New Riders Publishing, Thousand Oaks, CA, 1991. Type: Book (9781562050139)
Aug 1 1992
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy