Embedded Systems Building Blocks, Second Edition

Chapter 12: PC Services

Overview

The code in this book was tested on a PC. It was convenient to create a number of services (i.e., functions) to access some of the capabilities of a PC. These services are invoked from the test code and are encapsulated in a file called PC.C. Because industrial PCs are so popular as embedded system platforms, the functions provided in this chapter could be of some use to you. These services assume that you are running under DOS or a DOS box under Windows 95/98 or NT. You should note that under Windows 95/98 or NT, you have an emulated DOS and not an actual one (i.e., a Virtual x86 session). The behavior of some functions may be altered because of this.

The files PC.C (Listing 12.3) and PC.H (Listing 12.4) are found in the \SOFTWARE\BLOCKS\PC\BC45 directory. Unlike the first edition of ESBB, I decided to encapsulate these functions (as they should have been) to avoid defining them in the example code and also, to allow you to easily adapt the code to a different compiler. PC.C basically contains three types of services: character based display, elapsed time measurement, and miscellaneous. All functions start with the prefix PC_ .

12.00 Character Based Display

PC.C provides services to display ASCII (and special) characters on a PC's VGA display. In normal mode (i.e., character mode), a PC's display can hold up to 2000 characters organized as 25 rows (i.e., y) by 80 columns (i.e., x) as shown in Figure 12.1. Please disregard the...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Software Development Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.