ebook img

Compute!’s mapping the IBM PC and PCjr PDF

356 Pages·1986·24.541 MB·English
by  DaviesRuss
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Compute!’s mapping the IBM PC and PCjr

COMPUTEI's MAPPING the IBM PCand PCjr Russ Davies 22~eY!!tPsublications,lncl. Greensboro, North Carolina Copyright 1985, COMPUTE! Publications, Inc. All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections 107 and 108 of the United States Copyright Act without the permission of the copyright owner is unlawful. COMPUTE! Publications does not accept any responsibility for any possible damage done to the reader's programs through the use or misuse of the information presented here. Printed in the United States of America 1098765432 ISBN 0-942386-92-2 COMPUTE! Publications, Inc., Post Office Box 5406, Greensboro, NC 27403, (919) 275-9809, is one of the ABC Publishing Companies and is not associated with any manufacturer of personal computers. IBM Pc, PCjr, PC/XT, XT/370, Portable Pc, PC AT, and 3270PC are trademarks of International Business Machines, Inc. Contents Figures, Tables and Programs ..................... v Foreword ........................................... ix Acknowledgments ................................. ix Introduction ....................................... xi 1. Memory Organization and Management ................ 1 2. Keyboard ........................................ 67 3. Music and Sound ................................ 109 4. Video .......................................... 139 Appendices A. Memory Map .................................... 211 B. Port Map ....................................... 257 C. Interrupts ....................................... 293 D. DOS Versions ................................... 301 E. BASIC Versions .................................. 305 F. BASIC Tokens ................................... 311 G. ASCII Values .................................... 317 H. The Automatic Proofreader ......................... 323 Charles Brannon Index ............................................ 331 Figures, Tables, and Programs Figures 1-1. Allocation of PC Memory Address Space in 64K Blocks 4 1-2. Calculation of Memory Address from Segment Offset ........ 6 1-3. Vector Format and Example of Contents .................. 7 1-4. Format Change During Register/Memory Moves ............ 8 1-5. 8088 Segment, Base/Index, and Miscellaneous Registers ..... 9 1-6. 8088 Address Calculation with Base/Index ................ 10 1-7. Levels of DOS and BIOS Service Requests ............... 18 1-8. Map of Typical PC Memory Usage ...................... 20 1-9. Loading and Displaying the Boot Record Contents .... ,.... 24 1-10. MEMBAT.BAT ........................................ 34 1-11. Sample Vector Program Output ......................... 38 1-12. Output of Comparing Captured Vectors .................. 39 1-13. BASIC Workspace .................................... 45 1-14. BASIC Line Storage Format ............................ 47 1-15. Standard Variable Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 48 1-16. Array Dimension Headers .............................. 49 1-17. Creating SESAME.BLD ................................ 50 1-18. Allocation of PC I/O Port Address Space ................. 54 2-1. Alt or Ctrl Shifted Keys Ignored ......................... 71 2-2. Schematic Diagram of a Full Keyboard Buffer ............. 77 3-1. Direct Method Sound Production Schematic ............. 113 3-2. Direct Method Sound Production Schematic ............. 113 3-3. Timer Method Sound Production Schematic .... . . . . . . . . .. 121 3-4. PCjr Output Sound Source Selection ................... 129 3-5. PCjr Complex Sound Generator Command Formats ....... 130 4-1. Conceptual Architecture of Display Adapter . . . . . . . . . . . . .. 143 4-2. Conceptual Architecture of PCjr Integrated Display Adapter. 144 4-3. Location and Size of Display Buffers .. . . . . . . . . . . . . . . . . .. 154 4-4. Monochrome Adapter Character Cell ................... 156 4-5. Color/Graphics Adapter Character Cell .............. . . .. 157 4-6. Border Drawing Text Mode ASCII Characters CHR$(n) ..... 167 4-7. Color/Graphics Single and Double Characters ............ 170 4-8. Monochrome Adapter Display Attributes . . . . . . . . . . . . . . . .. 171 4-9. Arrangement of Text Modes Character Attributes ......... 171 4-10. Color/Graphics Adapter Display ....................... 173 4-11. Arrangement of Text Modes Character Attributes ......... 173 4-12. Color Adapter Memory Usage ......................... 187 4-13. PCjr 128K Color/Graphics Memory Usage ............... 188 A-1. Bit Contents of a Byte ............................... 213 A-2. Map of Typical PC Memory Usage ..................... 214 B-1. I/O Ports Map ...................................... 260 Tables 1-1 . Sizes of DOS/BASIC Versions .......................... 17 1-2. Interpreter Work Areas ................................ 44 2-1 . Shift Status Flag Bytes ................................ 73 v 2-2. DOS INT 21 Keyboard Functions ........................ 99 3-1. Musical Notes and Associated Frequencies, Piano Key Arrangement ...................................... 114 3-2. PCjr BASIC SOUND and BEEP Settings ................. 131 4-1. Viewing Requirements Satisfied by Monitor Types . . . . . . . .. 146 4-2. Monochrome and RGB Monitor Characteristics ........... 147 4-3. Summary of Available Video Mode Characteristics ........ 152 4-4. Control Characters .................................. 157 4-5. Summary of Available Color Text Modes ................. 180 4-6. Summary of Available Graphics Modes Characteristics ..... 185 4-7. Summary of Video Tracking, Ports, 6845 Registers, VGA Registers .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 202 Programs 1-1 . ROM BIOS Version ................................... 13 1-2. Determining the DOS Version Using SHELL ............... 14 1-3. Determining the DOS Version Using DOS Function 30h ..... 14 1-4. Determining the BASIC Version ......................... 16 1-5. Cold Start Invocation ................................. 21 1-6. Warm Start Invocation ................................. 22 1-7. MEMBAT.BAS ....................................... 34 1-8. Capture Vectors from BASIC ........................... 40 1-9. Capture Vectors from DEBUG .......................... 41 1-10. Comparing Captured Vectors .. . . . . . . . . . . . . . . . . . . . . . . . .. 42 1-11. Determining the DEF SEG Segment Number .............. 43 1-12. Issuing DOS Commands from BASIC .................... 51 1-13. SRVCCALL.BAS ..................................... 57 1-14. Functional Subset of SRVCCALL.BAS Invocation. . . . . . . . . .. 60 1-15. SRVCCALL.ASM ..................................... 60 2-1. Display INKEY$ Returned ASCII or Extended Scan Code .... 72 2-2. Displaying Keyboard Status ............................ 74 2-3. Experimenting with PCjr Fn Status Flag .................. 75 2-4. Monitoring the Keyboard Buffer and Pointers .............. 78 2-5. Example of Plugging the Keyboard Buffer ................ 80 2-6. Entering Screen Lines via the Keyboard Buffer ............ 81 2-7. Relocating the Keyboard Buffer ......................... 82 2-8. Restoring the Keyboard Buffer's Default Location .......... 83 2-9. Escape Code Generator for ANSI.SYS Sequences ......... 85 2-10. Creation of Key Definition File and Batch Command ........ 86 2-11. Creation of Key Reset File and Batch Command ........... 87 2-12. EXE Program to Issue Escape Sequence Series ........... 87 2-13. Trapping Break and Reboot Keys in BASIC ............... 88 2-14. Ignoring the Break Key in BASIC. . . . . . . . . . . . . . . . . . . . . . .. 89 2-15. Disabling Reboot via INT 9 ............................. 91 2-16. Disassembly of BOOTNOT.COM ........................ 94 2-17. SRVCCALL Routines to Call BIOS INT 16 ................. 97 2-18. SRVCCALL Routines to Call BIOS INT 16 PCjr Functions .... 98 2-19. PCjr Modification of Typamatic Key Values ................ 98 3-1. Sample Direct Method Speaker Control Program .......... 116 3-2. Direct Method Speaker Control with Stop-On-Any-Key ..... 117 vi 3-3. Direct Method Speaker Control with Sound Table ......... 118 3-4. Timer Method Sound with Stop-On-Any-Key . . . . . . . . . . . . .. 124 3-5. Timer Method Sound with Sound Table ................. 125 3-6. Sound Chip Fundamentals Example Program ............ 132 3-7. Sound Chip Keyboard Controller Program ............... 133 4-1. Which Monitor Used at Boot Time .. . . . . . . . . . . . . . . . . . . .. 148 4-2. Which Monitors Available ............................. 149 4-3. Which Monitor Is Active .............................. 149 4-4. Switching Monitors .................................. 150 4-5. Create COLORMON.COM for DOS and BASIC Color Use .. 150 4-6. Switch to Monochrome Monitor While in BASIC ........... 151 4-7. Text Characters Display .............................. 159 4-8. Display Graphics Characters PEL Maps ................. 160 4-9. Graphics Characters ................................. 161 4-10. Program to Save PCjr Graphics Characters 128-255 . . . . . .. 162 4-11. Program to Load PCjr Graphics Characters 128-255 into a PC 163 4-12. PCjr Graphics Characters 128-255 ..................... 165 4-13. Causing the Screen to Be Printed in BASIC .............. 169 4-14. Disabling/Enabling PrtSc Feature in BASIC .............. 169 4-15. Demonstration of All Possible Text Mode Attributes ....... 176 4-16. Disabling/Enabling Blink and the Display ................ 177 4-17. Color Swatches and PCjr Palette Registers .............. 178 4-18. Program to Display Page Information ................... 182 4-19. Demonstration of Display Buffer/Page Switching .......... 183 4-20. Third Palette, 320 X 200 ............................. 186 4-21. Graphics Memory Filler Program ....................... 189 4-22. Bar Chart Graphics Program Using BIOS Calls ........... 191 4-23. Glitch Elimination Experiments ......................... 195 4-24. Screen Paging in Text Modes ......................... 198 4-25. Text Scrolling ....................................... 200 vii

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.