The text of a manual · part 34 of 38
PEN*KEY 6100 Computer Programmer's Reference Guide: Appendix B: Common PEN*KEY 6000 Series Information, pages 297 to 304
Pages 297 to 304 of 328, from PEN*KEY 6100 Computer Programmer's Reference Guide
The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Norand 6100
Page 297
APPENDIX B
Common PEN*KEY 6000 Series Information
In the PEN*KEY 6000 Series system, shown in Figure B-4, the RAM disk stores Windows and the application, along with data from the application. PCMCIA SRAM OR FLASH
ÁÁ ÁÁÁÁ ÁÁ ÁÁÁÁ 1MB FLASH
Work Space
4MB 3MB
Application
2MB
Windows
1MB
System Memory
DOS / BIOS
Figure B-5
In the configuration shown in Figure B-5 above, a PC Card is used instead the RAM disk. The system considers the PC Card as a disk drive. There are several types of RAM and flash PC Cards that can be used in this configuration.
Standard Mode Versus Enhanced Mode Windows can run in either standard mode or enhanced mode. The enhanced mode, better known, was created by Microsoft to provide virtual DOS boxes, which make it possible for Windows to run DOS programs within the Windows environment. Virtual DOS boxes insulate DOS programs from the hardware, in essence simulating a DOSĆmanaged PC. The main drawbacks to enhanced mode are slower execution speed and larger code size. Despite its name, the enhanced mode is the slower of the two modes; and the size of the Windows code required to support enhanced mode is up to 1 megabyte larger. The standard mode, which is the native mode for Windows, does not support DOS programs. But the standard mode is significantly faster and smaller than the enhanced mode. Normally, the PEN*KEY 6000 Series Computer runs in standard mode only. This means that you cannot utilize both a DOS application and a Windows application in the same environment on the computer. If WinĆ dows is running on the PEN*KEY 6000 Series Computer, all applications must be Windows applications. If DOS applications are needed, the PEN*KEY 6000 Series Computer should be operated in the DOS environment. For the applicaĆ tion developer, this is critical. Some existing applications may require enhanced mode to run; this is probably because of the following: 1. Applications were originally designed to run under DOS and were later ported to Windows. 2. Applications make use of the Windows 32Ćbit memory model. PEN*KEY R 6100 Computer Programmer’s Reference Guide
B-17
B. Common PEN*KEY 6000 Series Info.
PEN*KEY with PC Card
Page 298
Common PEN*KEY 6000 Series Information
APPENDIX B
RAM Drive Integrity-Protection The integrityĆprotection feature is an implementation that protects RAM from instructions that might improperly try to write data to the wrong location. If data were written to the wrong location, a corrupted data file, or even a lockup, could occur. In the PEN*KEY 6000 Series Computer, the RAM drive is protected from that situation. This protection is implemented in the system software (BIOS). Even in the event of a reboot, the RAM drive is protected from loss. This feature enhances the failĆsafe operation of the computer.
Non-Windows Systems: PenPal and PenRight! All implementations of software systems on the PEN*KEY 6000 Series ComputĆ ers are diskĆbased. If a specific application is written in PenPal, for example, the same information shown previously in Figure B-2 through Figure B-5 still holds true. The only difference is that, instead of Windows being loaded over DOS, components of the PenPal runtime software are loaded.
Windows Environment B. Common PEN*KEY 6000 Series Info.
This part of the Guide serves two purposes. First, it presents a description of the Microsoft Windows environment to help you to become acquainted with the variĆ ous Windows components. Second, it describes an approach to determining the memory requirements for a WindowsĆbased PEN*KEY 6000 Series system.
A Brief History of Microsoft Windows The design for the Windows environment was made for a better user interface. The Macintosh environment had gained significant popularity with many potenĆ tial customers who felt that the DOS user interface was clumsy and hard to learn. While the Macintosh environment was built without concern for existing applications from previous Apple products, the Windows designers knew that, to succeed within the PC world, the Windows environment must address both the existing DOS applications and the Windows applications being planned. FurĆ ther, to accumulate the largest audience, the Windows environment must operĆ ate on machines that are already installed with the DOS operating system. While the Windows version 3.0 environment was considered by many to be the first real version of Windows (because it worked!), two previous versions had been previously built and released. These versions (versions 1.0 and 2.0) were slow and poorly designed. Windows 3.0 combined an acceptable user interface for the nonĆtechnical user who had the ability to use the full capability of the InĆ tel 386 processor. It was in this environment that Windows gained great popuĆ larity and success. The main lesson learned by many who adopted Windows earĆ ly was that Windows required tremendous system resources in terms of processor speed, RAM, disk space, and video capability. As you become more involved with products like the PEN*KEY 6000 Series ComĆ puter, you will find that a working knowledge of the Windows environment is critical to your success in implementing these systems. B-18
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 299
APPENDIX B
Common PEN*KEY 6000 Series Information
Windows Architecture To understand the Windows environment for the PEN*KEY 6000 Series computĆ ers, you must look at all of the pieces that make up a PC that has a Windows enĆ vironment. Below is a block diagram that identifies the significant components of a WindowsĆbased machine and illustrates the way in which they interact. In this diagram, the Microsoft Windows for Pen Computing components are explicitĆ ly shown, although they are optional. Applications
DLLs
INIs
APIs
Additional Windows Files (optional)
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
Hardware Starting at the bottom of the following diagram, the hardware layer represents all of the components that are required to create an operable computer system. These components include, at a minimum, a processor, RAM, disk system, video system, and user input devices such as a keyboard or a pen. Applications
DLLs
INIs
APIs
Additional Windows Files (optional)
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
PEN*KEY R 6100 Computer Programmer’s Reference Guide
B-19
B. Common PEN*KEY 6000 Series Info.
These paragraphs describe each component shown with each diagram.
Page 300
Common PEN*KEY 6000 Series Information
APPENDIX B
BIOS In its simplest form, the basic input/output system (BIOS) is composed of softĆ ware that allows the operating system (in this case, DOS) to interact with the PC hardware. The BIOS may also be known as or system software. The BIOS, in most desktop PCs, is typically contained on ROM chips. In the PEN*KEY 6000 Series Computer, the BIOS is programmed into flash memory to allow you to periodically update the system, without physically opening the unit to replace any of the chips. Applications
DLLs
INIs
Additional Windows Files (optional)
APIs
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
B. Common PEN*KEY 6000 Series Info.
The BIOS manages the system through the use of interrupts, which are basically signals generated by the hardware to indicate that they need the attention of the CPU. For example, when you type characters at the keyboard, your key presses are changed into binary strings and sent to the BIOS. When the BIOS receives the string, it sets an interrupt to alert the CPU that it has data to be processed. All of this happens in just a fraction of a second. From the software's point of view, BIOS is sometimes referred to as a Hardware Abstraction Layer (HAL). HAL is an important concept, in view of the fact that, an application that is written for a computer with HAL can be easily moved to another computer where the hardware is different. For those peripherals that are supported directly by BIOS, software developers need not be concerned about differences between hardware from various manufacturers. Hard drives are one example, since all these devices look the same upstream of BIOS. Between BIOS and the hardware, using the hardware device is often a matter of setting paramĆ eters for BIOS. This is commonly the case with hard drives, where the user must first set parameters in BIOS before the hard drive can be by DOS. Hardware that is not directly supported by BIOS, such as a PC Card drive, must be supported by a BIOS extension (known as a DOS device driver).
DOS Device Drivers DOS device drivers tell the operating system about specific PC hardware compoĆ nents that are not directly supported by BIOS. Device drivers are loaded into memory at boot time; and they enable peripherals such as CD-ROM drive or memory above 1 megabyte. The PEN*KEY 6000 Series Computer requires at least one device driver, HIMEM.SYS, to control access to the high memory area (HMA); the first 64K RAM above the 1Ćmegabyte boundary. Other DOS device drivers may be loaded, depending on the requirements of attached peripherals. DOS device drivers are always loaded into memory from the CONFIG.SYS file, which is located in the root directory of the default boot drive. B-20
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 301
APPENDIX B
Common PEN*KEY 6000 Series Information
Applications
DLLs
INIs
APIs
Additional Windows Files (optional)
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
The default configuration in the PEN*KEY 6000 Series Computer not only inĆ cludes the device driver HIMEM.SYS (in CONFIG.SYS), but also several drivers for PC Card services, allowing for the use of flash memory and modem cards in the PC Card slots. The exact contents of the CONFIG.SYS file depends on the requirements of the individual application and the peripherals selected.
DOS
Applications
DLLs
INIs
APIs
Additional Windows Files (optional)
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
The actual DOS only consists of a small number of files, including an I/O interĆ face and a command interpreter. The DOS environment that is installed in a typical desktop PC includes a large number of utility programs (e.g., CHKDSK.EXE) which are not required for the actual booting of a DOS PC, but are supporting application files. Note that these additional files are not loaded into the PEN*KEY 6000 Series Computer in the default configuration, but are available in the Tool Kit if needed by an application. PEN*KEY R 6100 Computer Programmer’s Reference Guide
B-21
B. Common PEN*KEY 6000 Series Info.
DOS is an acronym for Disk Operating System. It provides file services to the application programs, along with generic support for video and printing. DOS does not provide support for specific displays or printers, nor does it provide serĆ vices for other peripherals. These services are not common to all applications written for the DOS environment. Each application written for a DOS PC must provide its own drivers for most of the peripherals that the application uses.
Page 302
Common PEN*KEY 6000 Series Information
APPENDIX B
Windows System Files Windows is an operating environment, a special class of DOS application whose primary purpose is to enable other applications to execute. Applications
DLLs
INIs
Additional Windows Files (optional)
APIs
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
B. Common PEN*KEY 6000 Series Info.
The most visible portion of Windows is the Graphical User Interface (GUI), but the real power of Windows is actually hidden deep inside the computer. Windows also acts as a multitasking system, which means that any number of applicaĆ tions may be loaded into memory and executed all at the same time. However, only a single application would be receiving CPU time at any given moment. In a typical PEN*KEY 6000 Series Computer configuration, the Windows enviĆ ronment is practically invisible to the end user. So why have it at all? Windows becomes an intermediary between the application and the hardware. Unlike a DOS application that needs to supply its own code to interact with the display and other peripherals, Windows applications need only conform to the general parameters of the device. The intricacies of dealing with the device are handled by a Windows driver, letting the application focus its attention on other tasks. The retail version of Windows is delivered on several diskettes and requires from 6 to 8 megabytes of hard disk space for installation. There are a vast number of user configurations that can be built with Windows. Many of the Windows comĆ ponents are optional and their uses are dependent on the type of peripherals (sound cards etc.) installed on a given PC. Intermec Technologies Corporation provides a standard minimal configuration for Windows in the PEN*KEY 6000 Series Computer. This configuration provides only those elements that are absoĆ lutely necessary in order to start Windows and load the File Manager. Many of the assumed to be present by a given Windows application are not present and must be installed separately. The Windows Components paragraph, in the Supporting Windows Applications section, provides a list of the files inĆ cluded in the minimal Windows configuration, along with a brief description of each file's purpose. Few, if any, of these files may be removed and still allow Windows to run.
B-22
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 303
APPENDIX B
Common PEN*KEY 6000 Series Information
Windows Device Drivers and APIs The device drivers and the Application Programming Interfaces (APIs) are the real power of Windows as an operating environment. The book, The Mother of all Windows Books, by Woody Leonhard and Barry Simon (Addison-Wesley, 1994), does an excellent job of explaining the role of a device driver. Applications
DLLs
INIs
APIs
Additional Windows Files (optional)
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
In the Windows environment for the PEN*KEY 6000 Series Computer, the reĆ quired device drivers are provided with the minimal configuration. These inĆ clude the Microsoft communications, the keyboard, the system, the sound drivĆ ers; the Pen Windows mouse driver; and the NORAND display driver. To the applications, the display appears as if it was a standard CGA; and the driver handles the actual placement of pixels on the platform specific screen, as well as rotation from landscape to portrait modes.
PEN*KEY R 6100 Computer Programmer’s Reference Guide
B-23
B. Common PEN*KEY 6000 Series Info.
Windows device drivers have a filename extension of DRV. Like the DOS device drivers, the Windows drivers are responsible for controlling access to the periphĆ erals. But unlike DOS, Windows must have drivers that become intermediaries for all peripherals. Windows does not allow the application to access the hardĆ ware directly; that is the job of the device driver. By following this approach, the application does not need to concern itself with details of the display or other peĆ ripheral; as long as it conforms to the API, it works with any device driver. WinĆ dows device drivers are typically provided by the hardware manufacturer. HowĆ ever, Windows comes with a small number of generic drivers that are compatible with the basic features of many brands of peripherals.
Page 304
Common PEN*KEY 6000 Series Information
APPENDIX B
DLLs Look in the Windows System directory on your PC, and you will find many files with the extension DLL. These are dynamic link libraries. These are nothing more than subroutines. Applications
DLLs
INIs
Additional Windows Files (optional)
APIs
Handwriting Recognition
Pen Windows
Minimal Windows System Files DOS
Windows Drivers BIOS
DOS Drivers Hardware
B. Common PEN*KEY 6000 Series Info.
In computer programming, subroutines are subsets of computer code separated from the main program, so that the subset can be reused many times by differĆ ent parts of the program. The word dynamic describes the key difference beĆ tween the DOS subroutines and the Windows DLLs. The dynamic aspect of a DLL means that the DLL is loaded into execution memory only when it is needĆ ed and is removed when its job is done. DOS subroutines are bound to the DOS application program. If two programs on a DOS PC use the same subroutine, each of the DOS programs contains its own copy of the subroutine. The DOS program subroutine is always present in executable memory even if it is not needed at any given time. Any application that conforms to the API of a specific DLL may use the DLL, and avoid duplicating the logic within its own application. One of the most wideĆ ly used DLLs is COMMDLG.DLL, which is supplied with Windows. This subrouĆ tine library provides many common Windows dialog boxes. Have you ever noĆ ticed that the File Open dialog box looks the same across many of your Windows applications? This common look occurs because the dialog is invoked through a call to COMMDLG.DLL. The application itself does not even have a File Open dialog! Giving the Windows applications a consistent look and feel, is one of the key benefits of these shared subroutine libraries.
B-24
PEN*KEY R 6100 Computer Programmer’s Reference Guide