Updated: 02.06.24

Main -> Books -> Technical Books -> My Books -> PC PhD: Inside PC Interface

Cover of Inside PC Interfacing

PC PhD: Inside PC Interfacing

This Book/CD-ROM package was written to give a clear introduction to the PC, from a "bottoms up" hardware perspective as well as an explanation of how code works in the PC. Along with explaining the architecture, I also provide a number of applications that will help you to understand exactly how MS-DOS and Windows code executes in the PC and how hardware is accessed using the various interfaces available within the PC.

There are thirty projects in this book, ranging from simple MS-DOS I/O to Microsoft "Windows" Device interfacing. Development tools described includes 80(3)86 Assembler, BASIC, Visual Basic C, and Visual C++ and are used to develop the applications.

The applications include, "The Game of Life", unbeatable "Tic-Tac-Toe", serial interfacing, a software protection "Dongle" and a NTSC "Frame Grabber" designed for the PC's ISA bus. Each project illustrates the various aspects and characteristics of the PC's hardware. Along with the interfaces, the architecture of the PC is described, including information on "Pentium III" computer systems. PC Interfacing Pocketbook is a companion book that can be used as a quick reference for designing your own PC Hardware applications.

You can download Chapter 23 "RS-232: the Non-Standard" by clicking here. The file is 352K in size.


Table of Contents:

Acknowledgments

Introduction
  Additional Information and Resources
  Conventions used in this book
  Development Tools Used in this Book

SECTION 1

Chapter 1 Historical Perspective Before the PC IBM's 5150 The Clones The PC/AT The PS/2 Modern PCs Laptops Embedded PCs Chapter 2 PC Architecture Processor and Support Architecture "Core" Local Memory Interrupts DMA System Timer Memory Mapping Card Busses (ISA, EISA and PCI) USB Firewire Mass Storage Disk Busses Peripheral Devices Keyboard and Mouse Serial Interfaces The Parallel (Printer) Port Other Peripherals Joystick Port Sound Cards Configuration Information Video Output MDA and CGA EGA (Super) Video Graphics Array PC Power Supply Chapter 3 Personal Computer Processors The Intel 8086 8086 Architecture 8086 Instruction Set Addressing Modes Absolute Versus Relative Addressing The 8087 and Floating Point Computing 8087 Instruction Set The Intel 80386 and 80486 Multi-tasking, 32-Bit Instructions and Protect Mode 32-Bit Instructions The Pentium and the Need for Speed Architecture and Caches MMX Technology The Pentium Pro The Pentium II Other Processors Chapter 4 Personal Computer Software Firmware Versus Software Interrupt Interfaces Operating Systems Multitasking Operating Systems Graphical User Interfaces (GUIs) Chapter 5 Personal Computer Device Addressing PC Memory Map Finding Available Memory Memory Application The PCI/ISA Busses I/O Space and Bus Interrupt Allocation Protect-Mode Hardware Features

SECTION 2

Chapter 6 Basic Assembler Programming Assembler Directives 8086 Segment Allocation Defining Variables Source Code Formatting Floating Point Programming Real-Mode Programming Protect-Mode Programming Macros and Conditional Code Assembler Versus High-Level Languages Chapter 7 Interrupt Programming Interrupt Execution Interrupt Table Software Interrupts Hardware Interrupts Interrupt Controller Secondary Interrupt Controller Edge Versus Level-Activated Interrupts Interrupt Capturing Interrupt Sharing Handler Skeleton Passing Parameters to Interrupt Handlers Application Debug Interrupts NMI (IOCHK) Interrupt Breakpoint Interrupt Single-Step Interrupt Chapter 8 The PC Boot Process Hardware Boot Post Operation CMOS/RTC Configuration Plug 'N Play BUS ROM OS Boot MS-DOS Boot Windows Boot Chapter 9 The BIOS Interface BIOS Interrupt Interface Console Interfacing Accessing Video RAM Directly When to Use BIOS Functions System Variables The Multiplex Interrupt Chapter 10 MS-DOS The DOS Program Segment Prefix (PSP) Environment Inforation DOS Interrupt Interface Console Interfacing Practical Graphics Programming Memory Allocation LIM Expanded Memory Specification File Control Blocks Versus the Handle-Based Interface Multiprocessing in MS-DOS The Command Line and Command.Com AUTOEXEC.BAT CONFIG.SYS Chapter 11 MS-DOS Command-Line Programming Batch Files and Interrupts "Tiny" (.COM) Memory Model Programs Terminate and Stay Resident Programs FindCurs - The World's Smallest Useful Application Executable (.EXE) Programs "The Game of Life" Device Drivers Chapter 12 Running without an Operating System ROM Extensions Operating Systemless Diskette Operations Loading and Running an Application from Disk Chapter 13 MS-DOS Programming Languages and Application Development Tools Batch Files Assembler BASIC Pascal C/C++ Linking object files Linking Assembler to C/C++ “AsmProcs” "Make" Files Debuggers "Debug.com" CodeView Editors Chapter 14 Practical PC Programming Parsing Command Line Parameters I/O Interface Code Memory Organization Reading and Writing File Data Sorting User Interfacing Formatting Data Output Chapter 15 Event Driven Programming The User Interface System Resources Chapter 16 Microsoft Windows The Windows Graphical User Interface Win16 versus Win32 WIN.INI and Windows Registry Installation Programs Windows Applications Windows APIs Device Drivers USER, GDI and KERNEL Thunking DOS Protect Mode Interface Chapter 17 Windows Programming Languages and Tools Visual Basic Visual C++ Java LabView Microsoft DDK Other Languages, Developement Tools and IDEs Chapter 18 Programming for Errors Inadvertent Application/PC Crashes/Resets Processing User Input File Input/Output Hardware User Feedback

SECTION 3

Chapter 19 A PC to use for Experiments Hardware Requirements Software Requirements Reset Control Test Equipment Adapter Chapter 20 Precise Timing in the PC Real Time Clock Timing Bus timing strategies Using the Timer for Microsecond Precision Chapter 21 The Keyboard and Mouse Ports Keyboard Synchronous Protocol Keyboard Port Software Interfaces Keyboard Controller Sharing the keyboard Port The Mouse Port Interface Chapter 22 Practical Keyboard Interfacing Keyboard Monitor Chapter 23 RS-232 - The Non-Standard Introduction to Asynchronous Serial Communications and RS-232 The PC's RS-232 Ports Making the Connection Converting RS-232 Logic Levels to TTL/CMOS Powering your Creation from the PC's RS-232 Port RS-232 Serial Data Transmission "Bit Banging" Serial Interface Software for Microcontrollers Chapter 24 Practical RS-232 Interfacing Serial Data Transfer between two PCs Serial Controlled Crane Chapter 25 The Centronics Parallel Port Hardware Configuration Types of Interfaces Comments about using the Parallel Port Chapter 26 Practical Parallel Port Interfacing A Software Protection “Dongle” Chapter 27 The ISA Bus Bus Signals I/O Register Addressing Memory Addressing 8/16 Bit Data Transfers Built in Hardware Differences Interrupts DMA Dual Ported Memory Chapter 28 ISA I/O Port and RAM/ROM Prototyping Card I/O Port Reads and Writes Memory Reads and Writes Expansion ROM and ROM Boot ISA NTSC Composite Video Frame Grabber Chapter 29 The PCI Bus Bus I/O Configuration and PnP Interrupts DMA Chapter 30 The Joystick Interface How the PC reads analog input Digital Control Using the Joystick Chapter 31 The SoundBlaster Card Register Interface DSP/Mixer Register Interface “WAV” File Output Program with DMA

SECTION 4

Chapter 32 Windows Architecture Arenas and Rings Virtual Machines Virtual Machine Manager V86 Mode COM/OLE/ActiveX Chapter 33 Windows Programming Program Development Resource Files Practical Windows Interfaces Designing Human User Interfaces Hardware Debug Interfaces Chapter 34 Visual Basic Programming Visual Basic Features Learning Visual Basic Tic-Tac-Toe showing off Visual BASIC Developing and Debugging Visual Basic Applications Chapter 35 Visual Basic Controls Standard Controls Custom Controls MSComm Serial Control Visual Basic Crane Control Chapter 36 Visual C++ Looking from 30,000 feet The Visual C++ Language Classes Microsoft Development Studio AppsWizard ClassWizard Microsoft Function Classes (MFC) Debugging Visual C++ Programs Tic-Tac-Toe - A first Visual C++ Program

SECTION 5

Chapter 37 Device Driver Types Dynamic Link Libraries (".DLL"s) Virtual Device Drivers ("VxD"s) Win32 Device Models ("WDM"s) Chapter 38 Creating .DLLs Creating .DLLs DLL Operation Chapter 39 Surviving the VxD Experience VxD Operations VxD Structure Control Messages Event Processing Hardware Interrupts Request Synchronization VxD Debugging VtoolsD VtoolsD Class Library Chapter 40 - Win32 Device Models Device Objects I/O Request Objects Containers Request Control and Synchronization Objects Interrupts WDM Initialization and Unloading Driver::Works Driver::Works Classes

SECTION 6

Chapter 41 What is USB? Connections to the PC Data Packet Formats Data Transfer Types Device Enumeration PC Host Configuration Chapter 42 The Cypress CY7C6xx Processor Architecture The Stack and Subroutines Interrupts Instruction Set Development Tools Hardware Features Power and Clocking Timers I/O Ports USB SIE Interface Chapter 43 USB Interface Projects Cypress USB Example Thermometer Application

SECTION 7

Chapter 44 In Closing

SECTION 8

Appendix A Glossary of Terms Appendix B Resources Contacting the Author Useful Books Engineering References PC Hardware 8086 Assembly Code High Level Language Software Development Windows Systems Programming Part Suppliers Periodicals Web Sites of Interest Useful Microsoft Web Sites List Servers News Groups Appendix C ASCII Character Tables ASCII Control Character IBM PC Extended ASCII Characters ANSI Display Control Sequences Windows ASCII Characters Appendix D Keyboard Codes Appendix E Standard Device Addresses Memory Map Register Input/Output Addresses Appendix F BIOS Variables Appendix G Interrupt Function by Number Appendix H BIOS Interrupt Functions Interrupt 10h - Video Interrupt 11h - Equipment Determination Interrupt 12h - Get Memory Size Interrupt 13h - Disk BIOS Interrupt 14h - RS-232 Communications Interrupt 15h - System Services Interrupt 16h - Keyboard Interface Interrupt 17h - Printer Interface Interrupt 19h - Bootstrap Loader Interrupt 1Ah - System Timer and RTC Services Interrupt 33h - Mouse Interrupt Appendix I MS-DOS Interrupt Functions Interrupt 20h - Program Terminate Interrupt 21h - Function Request Interrupt 22h - Terminate Address Interrupt 23h - Ctrl-Break Exit Address Interrupt 24h - Critical Error Handler Vector Interrupt 25h & 26h - Absolute Disk Accesses Interrupt 27h - Terminate but Stay Resident Interrupt 2Fh - Multiplex Interrupt Interrupts 28h-2Eh, 30h-32h & 34h-3Fh Appendix J Windows Extensions and DPMI Interrupt Function by Number Appendix K Microsoft Foundation Class Hierarchy Chart Appendix L The CD-ROM Index

ISBN Numbers

Softcover: 0-07-134186-2