home *** CD-ROM | disk | FTP | other *** search
/ Compu-Fix / Compu-Fix.iso / referenz / text / rombak.txt < prev    next >
Encoding:
Text File  |  1993-03-01  |  73.9 KB  |  1,517 lines

  1.  
  2.  
  3.  
  4.  
  5.                                THE IBM PC
  6.  
  7.                             READ-ONLY-MEMORY
  8.  
  9.                              BACKUP MANUAL
  10.  
  11.  
  12.  
  13. ************************************************************************
  14. ************************************************************************
  15.  
  16.      This copy of the manual is printed from the file ROMBAK.TXT which
  17. is distributed on disk through the user supported software distribution
  18. network.  This manual is a copyrighted work, with permission granted for 
  19. electronic media distribution ONLY; printed media distribution without
  20. the expressed consent of the copyright holder is prohibited.
  21.  
  22.      This electronic media distribution of this manual is an experiment 
  23. in user-supported publishing.  This is a specialty publication and the
  24. audience most interested in the subject matter is probably quite
  25. comfortable with the distribution and use of disks of user supported
  26. software.  
  27.  
  28.      This file contains all of the text from the printed manual, as 
  29. published by PC TECHNOTES.  The figures and certain compresed-format
  30. tables from the printed manual are not reproduced in this file.  The 
  31. absence of this graphic material should not make a major reduction in
  32. the instructional value of this material, as most of the information
  33. could be assembled from other sources.
  34.  
  35.      The user supported part of the deal works the same as for software. 
  36. IF YOU READ THIS VERSION OF THE MANUAL AND FIND IT TO BE USEFUL, PLEASE
  37. SHOW YOUR SUPPORT BY ORDERING THE PRINTED MANUAL.  The price of $9.95 is
  38. nominal for a specialty publication like this, and you'll like having
  39. all of the figures and tables in one convenient place.  A handy order
  40. form is contained in the file ORDER.TXT, which is included on the
  41. distribution disk. 
  42.  
  43. ***********************************************************************
  44. ***********************************************************************
  45.  
  46.  
  47.  
  48. _____________________________________________________________________
  49.                                                          PC TECHNOTES
  50.  
  51. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL
  52. Copyright (C) 1986, 1987 by PC TECHNOTES
  53.  
  54. All rights reserved. No part of this manual may be reproduced or 
  55. transmitted in any form or by any means without the prior written 
  56. permission of the copyright holder.
  57.  
  58. PC TECHNOTES is an independent publisher, not affiliated in any way with 
  59. International Business Machines Corp.  As used in the title and text of 
  60. this manual, "IBM PC" refers solely to a recognized industry standard 
  61. for computer hardware design and operation, and not to any authorization 
  62. or license from the International Business Machines Corp.
  63.  
  64.  
  65.                                Disclaimer
  66.  
  67. PC TECHNOTES makes no warranties as to the contents of this manual or to 
  68. the fitness of the information for any particular use. Although every 
  69. effort has been made to insure that the information contained in this 
  70. manual is reliable, PC TECHNOTES cannot be held responsible for any 
  71. damage or loss suffered from, or any liability incurred as a consequence 
  72. of the use of the information contained herein.
  73.  
  74.  
  75.  
  76.  
  77.  
  78. Trademarks/Owners: IBM, IBM PC, PC-XT and PC-AT/ International Business 
  79. Machines Corp. Intel/Intel Corporation. MS-DOS and GW-BASIC/Microsoft 
  80. Corp. Hercules/Hercules Computer Technology. BYTE/McGraw-Hill Inc.
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.                              PC TECHNOTES
  92.                              P.O. Box 1574
  93.                      San Juan Capistrano, CA  92693
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.                                  - i -
  104.  
  105.  
  106.  
  107.  
  108.  
  109.                                THE IBM PC
  110.                             READ-ONLY-MEMORY
  111.                              BACKUP MANUAL
  112.  
  113.  
  114.                            TABLE OF CONTENTS
  115.  
  116. 1. Introduction  .............................................. 1
  117.  
  118. 2. PC Memory Organization  .................................... 2
  119.  
  120. 3. PC Memory Addressing  ...................................... 5
  121.  
  122. 4. PC ROM Software and Hardware  .............................. 7
  123.    4.1 Software Addresses and Markers  ........................ 7
  124.            ROM-BIOS
  125.            ROM-BASIC
  126.    4.2 ROM Hardware on the System Board  ...................... 8
  127.  
  128. 5. The Making of a ROM Chip  .................................. 11
  129.    5.1 EPROM Integrated Circuit Chips  ........................ 11
  130.    5.2 EPROM Programmers  ..................................... 12
  131.  
  132. 6. Putting It All Together  ................................... 14
  133.  
  134. 7. So You Bought a PC-Clone  .................................. 16
  135.    7.1 PC-Clone ROM Hardware  ................................. 17
  136.  
  137. 8. Helpful Hints  ............................................. 21
  138.  
  139.  
  140. Appendix A.  Hexadecimal Arithmetic  .......................... 22
  141. Appendix B.  ASCII Characters  ................................ 25
  142. Appendix C.  Useful Software  ................................. 27
  143. Appendix D.  EPROM Programmer Sources  ........................ 29
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.                                  - ii -
  158.  
  159. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 1
  160.  
  161.  
  162. 1.  INTRODUCTION
  163.  
  164.      You are a cautious computer user. Should your important PC software 
  165. be damaged, you know that you have backup copies of everything in a safe 
  166. place. Everything, that is, except the most critical item of all .... 
  167. the system software residing in the read-only-memory (ROM) chips 
  168. installed on your IBM PC's motherboard.
  169.  
  170.      The built-in software in the IBM PC's ROM chips contains the 
  171. primitive system startup and initialization routines, the Basic 
  172. Input/Output System (ROM-BIOS) and the core of the BASIC and BASICA 
  173. language interpreters (ROM-BASIC). Without the ROM-BASIC your IBM BASIC 
  174. Interpreter disk files are inoperative. Without a functioning ROM-BIOS 
  175. your applications software is useless. Without the system startup 
  176. routines your PC turns into an expensive paperweight.
  177.  
  178.      So what?  These ROM chips are standard IBM parts and you can always 
  179. obtain replacements from your dealer. Right?  Well, maybe .....
  180.  
  181.      The IBM PC family of microcomputers is known for an open 
  182. architecture built around commercially available components, but IBM has 
  183. carefully guarded the ROM-based system software that distinguishes them 
  184. from all of the compatibles and clones. Under the right circumstances, 
  185. you may obtain a ROM chip replacement through an authorized IBM dealer, 
  186. but you will probably have to deliver your IBM computer to such a dealer 
  187. and experience a wait for the replacements to be installed.
  188.  
  189.      If your dealer is a mail order house in another state, or is local 
  190. but uncooperative, a malfunctioning ROM chip could spell major 
  191. inconvenience or loss of business. At worst, you could find yourself 
  192. replacing the motherboard, or even the system unit itself, at a cost 
  193. much greater than the price of a backup ROM chip.
  194.  
  195.      You can make a backup set of system software ROM chips for your IBM 
  196. PC. Even if you have no prior computer circuitry or systems programming 
  197. experience, you can readily master the few necessary technical concepts.
  198.  
  199.      This manual is intended to be a straightforward compilation of the 
  200. key technical information, and the practical applications of such, that 
  201. a PC owner should understand before attempting to backup his PC's ROM 
  202. software. All of the technical details are in the public domain.
  203.  
  204.      The material is logically organized as a tutorial on the structure 
  205. of the PC's RAM and ROM memory, the way that the PC addresses memory 
  206. locations, the arrangement and variations of the ROM software and 
  207. hardware, and the types of ROM chips and programming hardware that are 
  208. on the market today. Also included is a guide to the all important 
  209. subject of hexadecimal arithmetic (don't leave home without it), 
  210. information about two very helpful pieces of public domain software, and 
  211. notes on sources of ROM programming hardware for the PC owner.
  212.  
  213. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 2
  214.  
  215.  
  216. 2.  PC MEMORY ORGANIZATION
  217.  
  218.  
  219.      This chapter describes the organization of random-access-memory 
  220. (RAM) and read-only-memory (ROM) inside the PC and the predefined 
  221. functions of various blocks of this memory. (If you are not familiar 
  222. with hexadecimal arithmetic, please go to Appendix A. before reading any 
  223. further, as you will need this to understand the notation for memory 
  224. block references.) Note that this is a general structure discussion, and 
  225. that the specifics of memory addressing will be covered in the next 
  226. chapter.
  227.  
  228.      The memory organization in the PC is a result of the capability of 
  229. the Intel 8088 CPU to address the memory. The 8088 can address up to 
  230. 1,024K (or 1,048,576) bytes of memory. Each byte is referred to by a 20- 
  231. bit address which may be expressed as an equivalent 5-digit hexadecimal 
  232. number. With such an addressing scheme, the full 1,024K bytes may be 
  233. covered by address values in the range from hex 00000 to hex FFFFF.
  234.  
  235.       By definition, the PC's addressable 1,024K bytes of memory are 
  236. divided into 16 blocks of 64K bytes each. Each block is then identified 
  237. by the first, or high order, hex digit of the hexadecimal addresses of 
  238. all bytes in that block. For example, the first 64K byte block of memory 
  239. at addresses hex 00000 through 0FFFF is called the 0 block. Similarly, 
  240. the last of the 64K byte memory blocks at addresses F0000 through FFFFF 
  241. is called the F block.
  242.  
  243.      In theory, there is no functional boundary between these 16 blocks 
  244. of memory. The block convention is used partly due to the specifics of 
  245. the addressing scheme (more on this in the next chapter) and partly 
  246. because the overall memory usage scheme developed by IBM assigns 
  247. distinctly different uses block by block. The outline of IBM's memory 
  248. block assignments is shown in Figure 2-1.
  249.  
  250.      The first ten memory blocks (blocks 0 through 9) are defined as RAM 
  251. in all of the PCs. This is ordinary working memory, up to 640K bytes. 
  252. All PCs have memory installed in at least the first 64K block, or block 
  253. 0, the lowest addresses of which are used by the operating system 
  254. software and are not available for general user applications. Any 
  255. additional RAM occupies a contiguous address space from block 1 up to 
  256. the top of block 9. If the PC is not fully populated with RAM, the 
  257. corresponding address blocks are left idle with no function.
  258.  
  259.      The last six memory blocks are reserved for various system and 
  260. hardware support functions. The A and B blocks, physically located on 
  261. the video controller circuit board, are used for video memory in the PC, 
  262. PC-XT, and PC-AT models. The B block is divided into two 32K byte 
  263. sub-blocks used by the conventional Monochrome Display Adapter and the 
  264. Color/Graphics Adapter. The A block of memory is reserved for video 
  265. memory expansions, such as those recently introduced as part of the 
  266.  
  267. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 3
  268.  
  269.  
  270. Enhanced Graphics Adapter and the Professional Graphics Adapter.
  271.  
  272.  
  273.        ┌──────────────── figure goes here ─────────────────────┐
  274.        │                                                       │
  275.        │                                                       │
  276.        │                                                       │
  277.        │                                                       │
  278.        │                                                       │
  279.        │                                                       │
  280.        │                                                       │
  281.        │                                                       │
  282.        │                                                       │
  283.        │                                                       │
  284.        │                                                       │
  285.        │                                                       │
  286.        │                                                       │
  287.        │                                                       │
  288.        │                                                       │
  289.        │                                                       │
  290.        │                                                       │
  291.        │                                                       │
  292.        │                                                       │
  293.        │                                                       │
  294.        │                                                       │
  295.        │                                                       │
  296.        └───────────────────────────────────────────────────────┘
  297.  
  298.               Figure 2-1.  IBM PC Memory Block Assignments
  299.  
  300.  
  301.      The C block of memory is set aside for any additions to the ROM 
  302. system software that is permanently installed on the motherboard. These 
  303. additions are usually BIOS extensions to support new types of peripheral 
  304. devices. This memory block was first used for the ROM-BIOS routines 
  305. supporting the hard disk drive that appeared with the PC-XT model. 
  306. Similar to the A and B blocks' video memory, this C block memory is 
  307. typically installed in the PC as part of an expansion circuit board.
  308.  
  309.      According to the IBM memory block outline, the D and E blocks are 
  310. set aside for ROM memory in "plug-in" cartridge software, such as that 
  311. used with the PCjr model. Cartridge software is not presently supported 
  312. in the regular PC, PC-XT, and PC-AT models, although it could 
  313. conceivably be added to any of these models.
  314.  
  315.      The F block of memory is set aside for the ROM software that is 
  316. permanently installed on the PC's motherboard. This memory area is home 
  317. to the system startup and diagnostics routines, the ROM-BIOS functions, 
  318. and the ROM-BASIC (or "cassette" BASIC) routines. It is because of the 
  319. contents of the F block of memory that this manual exists: this is where
  320.  
  321. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 4
  322.  
  323.  
  324. the PC owner may seek to backup the most important software used by his 
  325. computer. The organization and versions of the several software 
  326. (actually "firmware", if you want to be particular) components housed in 
  327. the F block ROM are detailed in Chapter 4.
  328.  
  329. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 5
  330.  
  331.  
  332. 3.  PC MEMORY ADDRESSING
  333.  
  334.  
  335.      As mentioned in the previous chapter, the Intel 8088 microprocessor 
  336. is capable of addressing up to 1,048,576 memory locations, which is the 
  337. largest value representable by a 20-bit binary number (2 raised to the 
  338. 20th power). The 8088, as a 16-bit processor that cannot work directly 
  339. with binary numbers containing more than 16 bits, would not be able to 
  340. address more than 65,536 (2 raised to the 16th power) memory locations 
  341. if it were not for a clever scheme known as segmented addressing.
  342.  
  343.      Segmented addressing divides the total addressable memory into a 
  344. number of segments containing 64K bytes each. Each segment begins at a 
  345. memory location that is evenly divisible by 16 bytes. This beginning 
  346. location is known as the segment address, or segment paragraph. 
  347. Individual bytes within this memory segment are referenced by an 
  348. additional address known as the offset address. The offset address, 
  349. which is always measured relative to the beginning of a segment, points 
  350. to an exact location within the 64K byte segment.
  351.  
  352.      Physical memory addresses are created by combining the 16-bit 
  353. segment paragraph with the 16-bit offset address, as illustrated by the 
  354. binary addition shown in Figure 3-1. In representing memory addresses 
  355. that are multiples of 16 bytes, the segment paragraph is thus shifted 
  356. four binary bits to the left. Adding the segment paragraph to the offset 
  357. address gives a 20-bit address, which now can access the full 1,024K 
  358. bytes of addressable memory in the PC.
  359.  
  360.  
  361.        ┌───────────────── figure goes here ────────────────────┐
  362.        │                                                       │
  363.        │                                                       │
  364.        │                                                       │
  365.        │                                                       │
  366.        │                                                       │
  367.        │                                                       │
  368.        │                                                       │
  369.        │                                                       │
  370.        │                                                       │
  371.        │                                                       │
  372.        │                                                       │
  373.        │                                                       │
  374.        │                                                       │
  375.        │                                                       │
  376.        └───────────────────────────────────────────────────────┘
  377.  
  378.       Figure 3-1.  Binary Addition of 16-Bit Segment Paragraph and
  379.                    Offset Address to Yield a 20-Bit Segmented Address
  380.  
  381.  
  382.  
  383. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 6
  384.  
  385.  
  386.      The previous chapter stated that 1,024K bytes of addressable memory 
  387. may be referenced by means of a 5-digit hexadecimal number. Since the 
  388. segment paragraph is always a multiple of 16 bytes, its hexadecimal 
  389. value will always have a zero in the last place, such as hex FE6A0 or 
  390. hex 34560. In use, the segment paragraph is expressed as a 4-digit 
  391. hexadecimal number, with the units place zero dropped, in order to yield 
  392. an equivalent 16-bit binary value for manipulation by the 8088 
  393. microprocessor. The offset address is likewise expressed as a 4-digit 
  394. hexadecimal number, which also thoroughly covers the 64K bytes contained 
  395. in the memory segment.
  396.  
  397.      As for notation, the segmented address is written as nnnn:nnnn, 
  398. with the segment paragraph address on the left side of the colon and the 
  399. offset address on the right.
  400.  
  401.      To put all of this together, consider the evaluation of a segmented 
  402. address that is written as 1234:6789
  403.  
  404.       12340  Segment Paragraph Address (hex), shifted left four bits
  405.     +  6789  Offset Address (hex)
  406.     ───────
  407.       18AC9  Full 20-bit Segmented Address (hex)
  408.  
  409. This expanded 20-bit address is for a byte physically located a little 
  410. more than half-way into block 1 of the PC's addressable memory.
  411.  
  412.      Since a segment can begin as frequently as every 16 bytes, it is 
  413. quite easy to express any particular memory location by means of a 
  414. variety of segmented addresses, depending upon the choice of the segment 
  415. paragraph. When discussing PC memory in terms of IBM's block outline, it 
  416. is easiest to use segment paragraph addresses that correspond to the 
  417. beginning addresses of the sixteen memory blocks. For the remainder of 
  418. this manual, the F block ROM memory will be described using segmented 
  419. addresses of the form F000:nnnn, where nnnn is the offset address within 
  420. this 64K byte block.
  421.  
  422. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 7
  423.  
  424.  
  425. 4.  PC ROM SOFTWARE AND HARDWARE
  426.  
  427.  
  428.      In this chapter we will describe the basic organization of the F 
  429. block ROM software (firmware) in the PC, and note some of the typical 
  430. software markers and IDs that will be useful to know about before you 
  431. explore on your own. You will also learn about the typical ROM hardware 
  432. configuration in the various PC models, and how this relates to the 
  433. software organization.
  434.  
  435.      Beginning in this chapter, references will be made to the contents 
  436. of specific memory locations in the F block ROM. You can scan these 
  437. addresses using the DOS utility DEBUG or a simple BASIC program to 
  438. display the value of each byte. Much more conveniently, you can zoom 
  439. around the ROM contents by using a memory display utility such as the 
  440. excellent public domain program CORELOOK. Appendix C describes the 
  441. necessary DEBUG commands and BASIC program statements, as well as the 
  442. features and use of CORELOOK.
  443.  
  444. 4.1  ROM SOFTWARE ADDRESSES AND MARKERS
  445.  
  446.      The F block ROM software is arranged to occupy memory address 
  447. ranges consistent with the start/end addresses of eight sequential 8K 
  448. (2000 hex) byte sub-blocks. This is not totally arbitrary, as the ROM 
  449. chips are made in various capacities that are compatible with this 
  450. sub-block size. In the IBM PC ROM set, the separate functional sections 
  451. of the ROM software (BIOS and ROM-BASIC) start at the beginning of an 8K 
  452. byte sub-block and spread over one or more of these sub-blocks. There 
  453. may be sections of empty memory addresses scattered throughout these 
  454. sub-blocks.
  455.  
  456.      In the PC and PC-XT models, the system startup and ROM-BIOS 
  457. routines are located in the highest address 8K byte sub-block, from 
  458. address F000:E000 through F000:FFFF. If you display the character 
  459. representations of the hex code, you can find some bits of code at the 
  460. beginning of this memory segment that appear to identify IBM's 
  461. handiwork. At the end of this sub-block, IBM has encoded a ROM version 
  462. release date and a machine ID marker.
  463.  
  464.      The ROM version release date is located in an 8-byte memory area 
  465. from F000:FFF5 through F000:FFFC. This date is in the common American 
  466. date format with two digits apiece for the month, day, and year. As 
  467. listed below, this date marker is useful for identifying the particular 
  468. IBM new machine release and/or ROM update. Note that the ROM release 
  469. date is essentially the ROM-BIOS version date since the ROM-BASIC code 
  470. has remained unchanged at least since the 10/27/82 release.
  471.  
  472. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 8
  473.  
  474.  
  475.        Release Date    IBM Machine / Update
  476.        ────────────    ────────────────────────────────────────
  477.          04/24/81      Original PC
  478.          10/19/81      Revised PC (bug fixes)
  479.          08/16/82      Original PC-XT
  480.          10/27/82      Upgrade of PC to PC-XT BIOS level
  481.          11/08/82      Original Portable PC (used in later XTs)
  482.          01/10/84      Original PC-AT (6 MHz Model 068)
  483.          06/10/85      Upgraded PC-AT
  484.          11/15/85      Upgraded PC-AT (8 MHz Model 339, with
  485.                           101-key enhanced keyboard)
  486.          01/10/86      Upgraded PC-XT **
  487.          05/09/86      Upgraded PC-XT **
  488.  
  489.                          ** Revision for 101-key enhanced keyboard.
  490.                             See the note at the end of this Chapter.
  491.  
  492.      The machine ID is a single byte located at F000:FFFE. The published 
  493. values for the IBM machine ID markers are listed below. Note that these
  494.  
  495.          ID:  Dec   Hex            Machine
  496.          ──────────────      ──────────────────────
  497.               255    FF       Original PC
  498.               254    FE       PC-XT and Portable PC
  499.               252    FC       PC-AT
  500.               251    FB       Upgraded PC-XT **
  501.  
  502. machine ID markers are apparently not always consistent: there are 
  503. reported instances of PC-XTs bearing the PC marker. In any event, you 
  504. may want use this ID marker in the ROM-BIOS as a secondary means of 
  505. identifying the code's vintage.
  506.  
  507.      Also in the PC and PC-XT models, the ROM-BASIC code resides within 
  508. a 32K byte area of F block memory from addresses F000:6000 through 
  509. F000:DFFF. As mentioned above, this code has been unchanged for quite 
  510. some time. As of now, there is no particular BASIC release date marker 
  511. to be concerned about as long as you deal with a ROM release date of 
  512. 10/27/82 or later.
  513.  
  514.      In the PC-AT model, the ROM-BIOS routines have been expanded 
  515. considerably to accommodate the additional capabilities of this machine. 
  516. The primary BIOS routines and the ROM-BASIC are in the same locations as 
  517. in the PC and PC-XT models, but the expanded BIOS routines have been 
  518. "wrapped around" to occupy the lowest 24K bytes of F block memory from 
  519. addresses F000:0000 through F000:5FFF.
  520.  
  521. 4.2  ROM HARDWARE ON THE SYSTEM BOARD
  522.  
  523.      In keeping with the 8K byte sub-block convention described above, 
  524. the system motherboard in the IBM PC and PC-XT models carries five 8K 
  525.  
  526. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 9
  527.  
  528.  
  529. byte ROM chips for a total of 40K bytes (32K bytes of ROM-BASIC and 8K 
  530. bytes of BIOS) of system ROM.
  531.  
  532.      Components on the motherboard are indexed by means of alphanumeric 
  533. codes printed on the circuit board. The ROM sockets on the IBM PC/XT 
  534. motherboard are labeled with a code sequence such as U29 through U33, 
  535. for a five ROM chip setup. The highest number socket typically 
  536. corresponds to the highest F block memory addresses. Additional 
  537. information on the location of the ROM sockets on the motherboard may be 
  538. found in Chapter 7.
  539.  
  540.      The socket containing the PC/XT ROM-BIOS will be the highest 
  541. address portion of memory in the F block. This BIOS is typically carried 
  542. in an 8K byte ROM chip, using memory addresses F000:E000 through 
  543. F000:FFFF, as described earlier. The full set of 8K byte ROM chips fill 
  544. up the IBM PC/XT ROM sockets as shown below. Note that the eight 
  545. possible 8K byte ROM chip/sockets are numbered 0 to 7, from lowest to 
  546. highest memory address.
  547.  
  548.       ROM Socket No.    Memory Addresses       Function
  549.       ──────────────  ─────────────────────   ──────────
  550.        7 (U33)        F000:E000 - F000:FFFF    ROM-BIOS
  551.        6 (U32)        F000:C000 - F000:DFFF    ROM-BASIC
  552.        5 (U31)        F000:A000 - F000:BFFF       "
  553.        4 (U30)        F000:8000 - F000:9FFF       "
  554.        3 (U29)        F000:6000 - F000:7FFF       "
  555.  
  556. As shown above, additional ROM chips for the ROM-BASIC routines will be 
  557. located below (address-wise) the ROM-BIOS in contiguous memory.
  558.  
  559.      The IBM PC-AT utilizes a quite different ROM hardware configuration 
  560. to make optimal use of the 16-bit data bus on the PC-AT's 80286 
  561. microprocessor.  The ROM chips are typically designed as "by 8" devices, 
  562. meaning that they can be accessed 8 bits at a time.  Since 16-bit data 
  563. read accesses are faster if the system doesn't have to read the same ROM 
  564. chip twice in sequence, IBM arranged the PC-AT ROMs as two 8-bit ROMs 
  565. with their addresses interleaved.  In other words, all of the even 
  566. numbered bytes (at offsets 0,2,4,6,....) are on one chip and all of the 
  567. odd numbered bytes (at offsets 1,3,5,7,....) are on the other chip.  
  568. With this arrangement, each 16-bit data access can set a single 
  569. segmented address and read one "slice" out of the pair of interleaved 
  570. ROM chips.
  571.  
  572.      Even though the ROM chip hardware addresses are interleaved on the 
  573. data bus in the PC-AT, the F-block ROM-BIOS and ROM-BASIC code is still 
  574. located within the same memory address areas described in section 4.1.
  575.  
  576.      The original model IBM PC-AT motherboard used four 16K byte ROM 
  577. chips to carry the full 64K bytes of ROM available in the F block. The 
  578. four-chip ROM arrangement in this model IBM PC-AT is as follows;
  579.  
  580. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 10
  581.  
  582.  
  583.      ROM Socket No.    Memory Addresses         Function
  584.      ──────────────  ─────────────────────   ───────────────
  585.           3          F000:8001 - F000:FFFF   ROM-BIOS, BASIC: Odd Bytes
  586.           2          F000:8000 - F000:FFFE   ROM-BIOS, BASIC: Even Bytes
  587.           1          F000:0001 - F000:7FFF   ROM-BIOS, BASIC: Odd Bytes
  588.           0          F000:0000 - F000:7FFE   ROM-BIOS, BASIC: Even Bytes
  589.  
  590.      Although the current IBM PC-AT motherboard has four ROM sockets as 
  591. in the original model, apparently only two of these sockets are mapped 
  592. to the F block of memory. A pair of the newer 32K byte ROM chips are now 
  593. used to carry the F block memory. This two-chip ROM arrangement in the 
  594. IBM PC-AT is as follows;
  595.  
  596.      ROM Socket No.    Memory Addresses         Function
  597.      ──────────────  ─────────────────────   ───────────────
  598.            1         F000:0001 - F000:FFFF   ROM-BIOS, BASIC: Odd Bytes
  599.            0         F000:0000 - F000:FFFE   ROM-BIOS, BASIC: Even Bytes
  600.  
  601.  
  602.  
  603.  
  604. ════════════════════════════════════════════════════════════════════════
  605.  
  606. NOTE: Upgraded PC-XT ROM-BIOS for Enhanced Keyboard
  607.  
  608.      The PC-XT ROM-BIOS versions dated after 01/10/86 and containing a 
  609. machine ID marker of FB hex are upgrades to accommodate the new 101-key 
  610. enhanced keyboard.  The new features of this keyboard can be used only 
  611. with systems that support it by means of a substantially enhanced 
  612. interrupt 16H handler in the BIOS.  This additional code now causes the 
  613. PC-XT's BIOS to spill out of the previous F000:E000 to F000:FFFF memory 
  614. space and into the 8K byte sub-block at F000:0000 to F000:1FFF.  This is 
  615. similar to the manner in which the PC-AT's expanded BIOS routines have 
  616. been "wrapped around" to occupy the lowest F block memory addresses.
  617.  
  618.      Working with the ROM software from these latest model PC-XT's will 
  619. require that extra steps be taken, similar in theory and technique to 
  620. those described in this manual, to provide for the additional ROM-BIOS 
  621. 8K byte sub-block at addresses F000:0000 to F000:1FFF.  This may include 
  622. using a different capacity ROM chip and a modified allocation of code 
  623. among the chips than what is described elsewhere based on the earlier 
  624. model PC-XT.
  625.  
  626. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 11
  627.  
  628.  
  629. 5.  THE MAKING OF A ROM CHIP
  630.  
  631.      This section describes the Erasable Programmable Read Only Memory 
  632. (EPROM) chips used to backup the PC's ROM software, and the hardware 
  633. used to burn the program code into these chips.
  634.  
  635. 5.1  EPROM INTEGRATED CIRCUIT CHIPS
  636.  
  637.      The types of EPROM chips used to backup the PC, PC-XT and PC-AT ROM 
  638. software are members of what is known as the 27xxx series. The chips in 
  639. this series are similar in physical appearance, as shown in Figure 5.1, 
  640. but vary in capacity, access speed, and programming characteristics.
  641.  
  642.  
  643.        ┌────────────────── figure goes here ───────────────────┐
  644.        │                                                       │
  645.        │                                                       │
  646.        │                                                       │
  647.        │                                                       │
  648.        │                                                       │
  649.        │                                                       │
  650.        │                                                       │
  651.        │                                                       │
  652.        │                                                       │
  653.        │                                                       │
  654.        │                                                       │
  655.        │                                                       │
  656.        │                                                       │
  657.        └───────────────────────────────────────────────────────┘
  658.  
  659.             Figure 5-1.  Features of the 27xxx EPROM Family
  660.  
  661.  
  662.      You will need to obtain and work with the correct capacity 27xxx 
  663. EPROMs for your ROM backup. The "xxx" characters in the 27xxx chip 
  664. number stand for the EPROM capacity in kilobits, or eight times the 
  665. kilobyte capacity. The table below shows the capacities for several 
  666. members of this series.
  667.  
  668.                          Chip Capacity
  669.        Chip Number       bits     bytes
  670.        ───────────     ───────   ───────
  671.          2764           65,536    8,182 (8K)
  672.          27128         131,072   16,384 (16K)
  673.          27256         262,144   32,768 (32K)
  674.          27512         524,288   65,536 (64K)
  675.  
  676. Throughout this manual, the PC ROM software has been described in terms 
  677. of kilobytes, so the capacities shown in parentheses are the ones that 
  678. you need to work with.
  679.  
  680. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 12
  681.  
  682.  
  683.       In addition to capacity, the 27xxx series EPROMs are available in 
  684. different access speeds of 200, 250, or 450 nanoseconds. This access 
  685. speed is typically designated by some form of suffix (usually 2 or 3 
  686. digits) to the basic chip number. For instance, a number 2764-25 would 
  687. indicate an 8K byte capacity with a 250 nanosecond access time. You 
  688. should use EPROMs with access speeds that at least meet your PC's 
  689. original specifications, but faster chips will also work.
  690.  
  691.      Other letters may appear in the chip number, such as 27xxxA (a 
  692. lower programming voltage) or 27Cxxx (low power consumption CMOS 
  693. technology chips). Consult with your EPROM vendor for issues of chip 
  694. compatibility. Also, some EPROM manufacturers may add characters to 
  695. these basic chip numbers, and, again, your vendor can help in making 
  696. sure that you obtain the functional type that you need.
  697.  
  698.      As the "E" in EPROM stands for erasable, a few words about the 
  699. erasure window are definitely in order. If you look through the small 
  700. circular window on the EPROM you can see the tiny semiconductor chip 
  701. that constitutes the memory. While the 27xxx series EPROMs are 
  702. programmed by applying varying voltages to the device's pins, they are 
  703. erased by ultraviolet light shining through the erasure window onto the 
  704. integrated circuit chip. This erasure technique typically involves 
  705. exposing the unshielded EPROM for 10 to 20 minutes under a high 
  706. intensity ultraviolet bulb in a specially built EPROM eraser. An EPROM's 
  707. contents can, however, be lost by prolonged exposure to the low level of 
  708. ultraviolet light present in common light sources. Before you burn your 
  709. code onto an EPROM, permanently cover the erasure window with a piece of 
  710. opaque tape or other such material.
  711.  
  712.      In addition to normal erasure, the EPROM's contents can be zapped 
  713. by static charges developed during handling. Be cautious about grounding 
  714. your equipment and yourself before handling these devices. Your vendor 
  715. should place the EPROMs in a protective anti-static tube typically used 
  716. for transporting integrated circuit chips.
  717.  
  718.      As far as EPROM sources and prices, a good place to start is with 
  719. the advertisements in the back sections of major computer magazines such 
  720. as BYTE or PC MAGAZINE where numerous vendors offer fairly low mail 
  721. order prices. If you can find a local discount electronics supplier, you 
  722. may well be able to beat the mail order houses' total cost.
  723.  
  724. 5.2  EPROM PROGRAMMERS
  725.  
  726.      The programming hardware used to record code onto a blank EPROM 
  727. chip is commonly referred to as a "blaster" or "burner". Originally, 
  728. these devices were available as costly stand-alone professional 
  729. equipment, usually designed to program a wide variety of ROM chips. If 
  730. you have access to one of these commercial style EPROM burners and plan 
  731. to use it for your ROM backup procedures, then you can probably skip the 
  732. rest of this section. Continue reading if you need to obtain an EPROM 
  733. programmer.
  734.  
  735. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 13
  736.  
  737.  
  738.      Recently, a number of very specific and relatively inexpensive 
  739. EPROM blasters have appeared that are obviously targeted for the PC 
  740. hobbyist market. These new PC-based EPROM blasters are designed as 
  741. plug-in circuit cards that fit into one of the PC's expansion slots and 
  742. are typically capable of burning only the 27xxx series of EPROMs. These 
  743. blasters come with software that runs on an IBM PC or compatible. While 
  744. these blasters are pretty much "bare bones" hardware for one-at-a-time 
  745. burning, the accompanying software usually offers the following 
  746. convenient features;
  747.  
  748.      o  Programs various 27xxx series EPROMs
  749.      o  Menu driven selection of EPROM type sets programming voltage
  750.      o  Read/write EPROM to/from buffer
  751.      o  Read/write buffer from/to disk file
  752.      o  Verify EPROM is blank
  753.      o  Compare EPROM and buffer
  754.      o  Variable buffer and EPROM offsets and read/write length
  755.      o  Copy PC memory into buffer
  756.      o  Edit buffer contents
  757.  
  758. You should look for at least these features in a PC-based EPROM blaster 
  759. that you would obtain to use to backup your PC's ROM. You can do without 
  760. the last two features on this list if you make use of other available 
  761. software. For example, you could use the public domain program PC-DUMP 
  762. (see Appendix C.) to download PC memory to a disk file which could then 
  763. be edited using the DOS utility DEBUG.
  764.  
  765.      With reasonable user documentation and good menu driven software, 
  766. the process of burning an EPROM is actually quite simple. At the risk of 
  767. appearing to stop short of giving out the really meaty information on 
  768. the actual process of blasting the EPROMs, we can only advise you that 
  769. using one of these PC-based menu driven EPROM programmers is a pretty 
  770. uninspiring operation. Other than some of the helpful hints contained in 
  771. Chapter 8, there is not much more that this manual can do to prepare you 
  772. to use one of these devices.
  773.  
  774.      Appendix D. discusses some of the sources where you can find these 
  775. low cost PC-based EPROM blasters for sale, as well as some typical 
  776. prices at the time of this writing.
  777.  
  778. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 14
  779.  
  780.  
  781. 6.  PUTTING IT ALL TOGETHER
  782.  
  783.  
  784.      Now that you have covered all of the background details related to 
  785. backing up your ROM software, its time to develop a summary of the steps 
  786. that you might typically go through.
  787.  
  788.      The first step, obviously, is to prepare your backup disk files of 
  789. the ROM software and store these away for safekeeping. The whole point 
  790. of this manual is protection against a failure of, or damage to, the ROM 
  791. chips, so download your backup now.
  792.  
  793. 1.   Download specific portions of the ROM code to individual disk  
  794. files. Depending on the capacity of the ROM chips used in your  
  795. particular model of PC (Chapter 4), the code in these downloaded  
  796. disk files should correspond exactly to the ROM memory addresses  
  797. that would be occupied by the replacement EPROM chips. (You could  
  798. download the entire F block contents to a single file and later  
  799. break this up into the appropriate sub-blocks using the software  
  800. provided with some EPROM programmers, but the specific file  
  801. approach will assure flexibility and reduce the risk of errors down  
  802. the road.)
  803.  
  804.      As an example, you might backup your PC-XT ROM using the following  
  805. parameters with the PC-DUMP program (Appendix C).
  806.  
  807.         Segment Paragraph   Bytes Written
  808.              Address        to Disk File      Disk File Name
  809.         ─────────────────   ─────────────     ──────────────
  810.               FE00           2000 (hex)        FE00ROM.DAT
  811.               FC00             "               FC00ROM.DAT
  812.               FA00             "               FA00ROM.DAT
  813.               F800             "               F800ROM.DAT
  814.               F600             "               F600ROM.DAT
  815.  
  816.      The five backup files created in this example correspond to the  
  817. five 8k byte type 2764 EPROM chips that could be programmed as  
  818. replacements.
  819.  
  820. In the event that you someday need to replace a damaged or faulty ROM 
  821. chip(s) in your PC, the following steps are typical.
  822.  
  823. 2.   Determine, if possible, which of the original ROM chips is faulty.  
  824. If this is not possible, plan on replacing the full set. If you  
  825. replace the full set and your curiosity is high, you can return the  
  826. individual original chips on a trial-and-error basis and isolate  
  827. the culprit chip.
  828.  
  829. 3.   Purchase the type of blank EPROM chip(s) that are to be used with  
  830. your PC's particular ROM hardware capacity and speed (Chapter 5).  
  831.  
  832. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 15
  833.  
  834.  
  835. For a full ROM set in a PC-XT, you would buy five type 2764 EPROMs  
  836. with an access speed of 250 nanoseconds (or faster).
  837.  
  838. 4.   Using either a PC-based or a stand-alone EPROM programmer, burn the  
  839. code from the backup disk file(s) onto the blank EPROM(s). If you  
  840. have prepared your backup disk files as described in step (1)  
  841. above, this operation will involve one EPROM per disk file. Label  
  842. the programmed EPROM(s) with the corresponding ROM software memory  
  843. address to assure matching with the proper ROM socket(s) during  
  844. installation.
  845.  
  846. 5.   Open up your PC's case, locate the row of motherboard sockets  
  847. holding the ROM chips, and look for the individual socket labels  
  848. printed on the circuit board (Chapter 4). Determine the ROM sockets  
  849. corresponding to high and low memory addresses, and make certain  
  850. that you can identify the memory addresses of all involved sockets.  
  851. Note the orientation of the casing notches on the existing ROM  
  852. chips.
  853.  
  854. 6.   Remove the existing ROM chip(s) and insert the replacement  
  855. EPROM(s), making certain that all of the EPROM's pins properly  
  856. contact in the socket. If the two pin rows seem to be wider than  
  857. the socket holes, tilt the chip and lightly insert one row then  
  858. press the chip towards the inserted row until the other row can be  
  859. inserted. Be sure that the replacement EPROM and the socket are  
  860. properly matched according to the ROM memory addresses described in  
  861. Chapter 4.
  862.  
  863. 7.   After installing the replacement EPROM(s) and successfully booting  
  864. the PC, verify the contents of the replacement chip(s). In the same  
  865. manner that the original ROM software backup disk file was made,  
  866. download a disk file copy of the memory contents on the replacement  
  867. EPROM(s). Check this validation disk file against the original  
  868. backup disk file using the DOS file comparison utility program  
  869. COMP.COM. The two files should compare with no reported mismatches.
  870.  
  871.  
  872.  
  873. ════════════════════════════════════════════════════════════════════════
  874.                              IMPORTANT NOTE
  875. The ROM chips used in some models of the IBM PC are not pin-compatible 
  876. with the 27xxx series EPROM chips.  If you encounter this situation, the 
  877. EPROM usage described here will not allow you to install the backup 
  878. read-only memory on your original IBM motherboard.  Obtaining and 
  879. installing an inexpensive clone motherboard to carry your 27xxx 
  880. EPROM-based backup ROM set may be an attractive option in the event of 
  881. an original ROM malfunction, depending upon the price of the IBM 
  882. replacement ROMs and how you value inconvenience and/or loss of business 
  883. due to delays.
  884. ════════════════════════════════════════════════════════════════════════
  885.  
  886. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 16
  887.  
  888.  
  889. 7.  SO YOU BOUGHT A PC-CLONE
  890.  
  891.      The personal computer marketplace has seen a proliferation of new 
  892. machines that are often described as IBM "compatibles" or "clones". Some 
  893. of these models, usually from major manufacturers of computer hardware 
  894. and peripherals, are unique hardware designs offering IBM compatibility 
  895. by running the MS-DOS operating system and the applications software 
  896. originally written for the IBM PC. More common now are the PC-Clone 
  897. computers that clearly attempt to duplicate the look, feel, and 
  898. circuitry design of the real IBM models. Assembled from generic 
  899. components, these low price PC-Clones are being sold by hundreds of 
  900. vendors, from chain computer stores and large mail order outlets to the 
  901. garage and swap meet crowd.
  902.  
  903.      These PC-Clones are available due to the fact that IBM chose to 
  904. design its family of personal computers around readily available 
  905. components and to openly disclose the details of the system architecture 
  906. and operation. This open architecture cleared the way for the avalanche 
  907. of third-party hardware and software enhancements that are on the market 
  908. today. It also allowed a number of enterprising printed circuit board 
  909. designers and manufacturers to provide the inexpensive IBM compatible 
  910. motherboards for the PC-Clones.
  911.  
  912.      One part of the PC design, however, that IBM did not release into 
  913. the public domain is the system software that is permanently recorded in 
  914. read-only-memory (ROM) integrated circuit chips mounted on the 
  915. motherboard. This built-in software contains the primitive system 
  916. startup and initialization routines, the Basic Input/Output System 
  917. (ROM-BIOS), and the core of the BASIC and BASICA programming languages 
  918. (ROM-BASIC). By copyrighting the ROM software and declining to license 
  919. its use in any computers but its own, IBM managed to retain control of 
  920. the key to this otherwise open system.
  921.  
  922.      Over the years, PC systems programmers have been able to write 
  923. legal functional equivalents of the system startup routines and the 
  924. ROM-BIOS machine language routines that provide support services for the 
  925. operation of the computer. Every PC-Clone comes equipped with a 
  926. work-alike ROM-BIOS, some of which are reputed to be very good and some 
  927. of which are homebrew hacks of unknown reliability and compatibility. 
  928. The frequently seen PC-Clone advertising claim of "fully IBM compatible" 
  929. may be a compromise: while the well behaved popular software may work 
  930. fine, the more quirky and/or aggressive system utilities and 
  931. applications programs may fail due to an unsupported or incomplete BIOS.
  932.  
  933.      The PC-Clones do not, as a rule, come with a hardware functional 
  934. equivalent of the ROM-BASIC software, even though most of the PC-Clone 
  935. motherboards are built with the appropriate sockets to hold these ROM 
  936. chips. (This may be a measure of the degree to which clone components 
  937. are carbon copies, when circuit board space is taken up by sockets that 
  938. the merchants can not possibly fill with the intended chips.) Instead, 
  939.  
  940. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 17
  941.  
  942.  
  943. PC-Clone owners wishing to run interpreted IBM BASIC or BASICA programs 
  944. must use an all-disk-based functional equivalent, such as Microsoft's 
  945. GW-BASIC, which combines the disk and ROM routines of the original IBM 
  946. BASIC and BASICA. Not all of the disk-based BASIC interpreters are fully 
  947. compatible with the IBM BASIC interpreters, and disk versions will not 
  948. usually support add-on language extensions, such as the Hercules HBASIC 
  949. graphics extension, designed to look for and modify IBM BASICA.
  950.  
  951.      You do not, however, have to pass up the tremendous price advantage 
  952. of a PC-Clone just because it does not come equipped with a True Blue 
  953. set of ROM software. If you are willing to be a do-it-yourself computer 
  954. experimenter, you can make a full set of 100% IBM compatible ROM chips 
  955. and install them in your PC-Clone. You can begin by exploring the 
  956. structure of ROM-based software on a PC using convenient public domain 
  957. software. And your ROM programming experiment can be completed with 
  958. fairly inexpensive and easy-to-use hardware advertised in the major 
  959. computer magazines or available through local electronics suppliers 
  960. (yes, and even at some swap meets).
  961.  
  962.      Since the marketplace in filled with clones of the IBM PC, PC-XT, 
  963. and PC-AT models, this manual describes the differences in ROM software 
  964. and hardware among these three original IBM computers. In keeping with 
  965. the theme of this manual as an educational text, you will not find 
  966. specific references or instructions for any particular brand or model of 
  967. PC-Clone. In mastering this material, you should acquire an 
  968. understanding of ROM software and hardware anatomy and learn what to 
  969. look for to determine if your PC-Clone is a suitable candidate for 
  970. surgery. It is up to you, however, to perform the operation to find out 
  971. if the patient will be better than new.
  972.  
  973.      One final note. It should be perfectly clear that, in making your 
  974. own experimental set of compatible ROM chips, you will be dealing with 
  975. software copyrighted by IBM. YOU ARE RESPONSIBLE FOR ASSURING THAT YOUR 
  976. USE DOES NOT VIOLATE THE COPYRIGHT LAWS PROTECTING IBM'S SOFTWARE. The 
  977. PC-Clone vendors already know all that there is to learn from this 
  978. manual, and they are not foolish enough to make illegal copies of ROM 
  979. sets for sale or trade. Keep your activities educational and hobby 
  980. oriented, and enjoy the experience of learning about ROM technology and 
  981. the inner workings of your computer.
  982.  
  983. 7.1  PC-CLONE ROM HARDWARE
  984.  
  985.      The PC/XT-Clone motherboards typically contain at least five 
  986. sockets for Erasable Programmable Read Only Memory (EPROM) chips, only 
  987. one of which will be used for the clone's BIOS. Figure 7-1 illustrates 
  988. the general location of the ROM chips/sockets on an PC/XT-Clone 
  989. motherboard. Although the position of the EPROM sockets is different on 
  990. some of the clone motherboards, the row of sockets is easily identified 
  991. by the presence of the EPROM chip that carries the ROM-BIOS. (The EPROM 
  992. chips themselves are described in Chapter 5.)
  993.  
  994. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 18
  995.  
  996.  
  997.        ┌────────────────── figure goes here ───────────────────┐
  998.        │                                                       │
  999.        │                                                       │
  1000.        │                                                       │
  1001.        │                                                       │
  1002.        │                                                       │
  1003.        │                                                       │
  1004.        │                                                       │
  1005.        │                                                       │
  1006.        │                                                       │
  1007.        │                                                       │
  1008.        │                                                       │
  1009.        │                                                       │
  1010.        │                                                       │
  1011.        │                                                       │
  1012.        │                                                       │
  1013.        │                                                       │
  1014.        │                                                       │
  1015.        │                                                       │
  1016.        │                                                       │
  1017.        │                                                       │
  1018.        │                                                       │
  1019.        │                                                       │
  1020.        │                                                       │
  1021.        │                                                       │
  1022.        │                                                       │
  1023.        │                                                       │
  1024.        │                                                       │
  1025.        └───────────────────────────────────────────────────────┘
  1026.  
  1027.  
  1028.                 Figure 7-1. Typical XT-Clone Motherboard
  1029.                             Component Layout
  1030.  
  1031.  
  1032.      Components on the motherboard are indexed by means of alphanumeric
  1033. codes printed on the circuit board. Depending on the manufacturer, the
  1034. EPROM sockets on the PC/XT-Clone motherboard will be labeled with a code
  1035. sequence such as U30 through U34 (for a five-socket setup), or perhaps
  1036. something a little more obvious like ROM3 through ROM 7. Look at the
  1037. label for the socket that holds the ROM-BIOS, it should be the highest 
  1038. numbered socket.
  1039.  
  1040.      The socket containing the PC/XT-Clone ROM-BIOS will be the highest 
  1041. address portion of memory in the F block. This BIOS is typically carried 
  1042. in an 8K byte EPROM chip, using memory addresses F000:E000 through 
  1043. F000:FFFF, as described earlier. If you continue to use 8K byte EPROMs 
  1044. for your experiment, you would fill up your PC/XT-Clone's EPROM sockets 
  1045. as follows;
  1046.  
  1047. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 19
  1048.  
  1049.  
  1050.       ROM Socket No.    Memory Addresses       Function
  1051.       ──────────────  ─────────────────────   ──────────
  1052.             7         F000:E000 - F000:FFFF    ROM-BIOS
  1053.             6         F000:C000 - F000:DFFF    ROM-BASIC
  1054.             5         F000:A000 - F000:BFFF       "
  1055.             4         F000:8000 - F000:9FFF       "
  1056.             3         F000:6000 - F000:7FFF       "
  1057.             2                                 (not used)
  1058.             1                                     "
  1059.             0                                     "
  1060.  
  1061. As shown above, additional EPROMs for the ROM-BASIC routines will be 
  1062. located below (address-wise) the ROM-BIOS in contiguous memory. Note 
  1063. also that if your PC/XT-Clone motherboard has more than five ROM 
  1064. sockets, these extras will not be used when installing a compatible ROM 
  1065. set.
  1066.  
  1067.      Although the new IBM PC-AT model uses two F block ROM sockets in 
  1068. what appears to be a bank of four sockets, many of the AT-Clones are 
  1069. built with only two EPROM sockets on the motherboard. For this reason, 
  1070. the AT-Clone ROM will be described for a two-chip two-socket setup. If 
  1071. you find that your AT-Clone has two EPROMs residing in a four-socket 
  1072. bank, you can adapt the following descriptions to the even and odd 
  1073. address sockets of the pair that are used.
  1074.  
  1075.      Since the PC-AT hardware design uses interlaced address ROMs to 
  1076. cover the entire F-block of memory addresses, your AT-Clone will have 
  1077. EPROMs in both of the available sockets. You will have to look at the 
  1078. printed component labels and/or consult your machine's documentation to 
  1079. determine which is the even or odd address socket. When you experiment 
  1080. with your compatible ROM set, you will fill up your AT-Clone's EPROM 
  1081. sockets as follows;
  1082.  
  1083.      ROM Socket No.    Memory Addresses         Function
  1084.      ──────────────  ─────────────────────   ───────────────
  1085.            1         F000:0001 - F000:FFFF   ROM-BIOS, BASIC: Odd Bytes
  1086.            0         F000:0000 - F000:FFFE   ROM-BIOS, BASIC: Even Bytes
  1087.  
  1088. Unused ROM sockets are not an issue in those AT-Clones designed to use a 
  1089. pair of 32K byte EPROMs.
  1090.  
  1091.      For those of you receiving your initial introduction to the 27xxx 
  1092. family of EPROM chips used on the PC-Clone motherboard, a good place to 
  1093. start is "under the hood" of your computer. Remove the case from your 
  1094. PC-Clone and look for the ROM sockets, as shown in Figure 7-1, and the 
  1095. ROM-BIOS chip(s). The ROM BIOS chip supplied with your PC/XT-Clone is 
  1096. typically a type 2764 EPROM. In an AT-Clone, the ROM-BIOS will typically 
  1097. be provided on a pair of type 27256 EPROMs.
  1098.  
  1099.      If you are "under the hood", note the chip number and speed 
  1100.  
  1101. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 20
  1102.  
  1103.  
  1104. designation printed on the ROM-BIOS chip(s). The numbers may be covered 
  1105. up by a piece of tape or other opaque material placed over the erasure 
  1106. window. If so, you should CAREFULLY peel back enough of the tape so that 
  1107. you can read the chip number. If you have correctly located the ROM 
  1108. chip(s), and your PC-Clone is a candidate for the type of ROM software 
  1109. backup covered by this manual, then the chip designations should 
  1110. correspond to the descriptions in Chapter 5.
  1111.  
  1112.      You should obtain and use a uniform set of 27xxx series EPROMs with 
  1113. an access time equal to, or less than, that of the ROM-BIOS EPROM that 
  1114. was supplied with your PC-Clone. You should probably stay with the same 
  1115. type of 27xxx chip as provided for your PC-Clone's ROM-BIOS, or consult 
  1116. with your EPROM vendor for issues of chip compatibility.
  1117.  
  1118. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 21
  1119.  
  1120.  
  1121. 8.  HELPFUL HINTS
  1122.  
  1123.      This section contains an assortment of additional helpful hints and 
  1124. practical ideas related to PC ROM backup procedures, based on the ROM 
  1125. programming experiences of others.
  1126.  
  1127. A.   First and foremost, there is NO CERTAINTY that either the IBM BIOS  
  1128. or ROM-BASIC will work on all PC motherboards - although it seems  
  1129. more likely that the ROM-BASIC should work in cases where system  
  1130. hardware incompatibility prevents a BIOS replacement.
  1131.  
  1132. B.   Compatibility of the ROM-BIOS can require a specific release date  
  1133. (See Chapter 4.). For example, a motherboard designed as an XT may  
  1134. not work with a BIOS associated with one of the original/updated  
  1135. IBM-PC release dates.
  1136.  
  1137. C.   Buy an extra EPROM chip or two. These devices are sensitive to  
  1138. static charges, and you can easily zap one during handling and  
  1139. installation. Having an extra one on hand may save a lot of  
  1140. frustration, especially if you buy them through the mail.
  1141.  
  1142. D.   Make a disk copy of the applicable memory contents before you  
  1143. attempt to remove any ROM chip from the motherboard of a PC. This  
  1144. is easy insurance in the event that you damage the original chip in  
  1145. removing it from its socket and later decide to use it again. With  
  1146. a backup disk copy on hand, you can always program a replacement.
  1147.  
  1148. E.   The variations in the 27xxx series EPROMs (27xxx, 27Cxxx, 27xxxA)  
  1149. require different programming voltages to be applied, either 21 or  
  1150. 12.5 volts. The EPROM programmer hardware or software should  
  1151. clearly allow you to either specify exactly which chip variation is  
  1152. to be programmed or allow you to specify which voltage level to  
  1153. use. Using too high of a programming voltage can damage a chip. If  
  1154. in doubt, ask your EPROM vendor about the proper voltage for the  
  1155. chips that you buy.
  1156.  
  1157. F.   Pulling EPROM chips from their sockets without damaging them can be  
  1158. a little tricky if you aren't using the proper tool. The fingers  
  1159. often aren't enough to do the job and you can easily mutilate the  
  1160. chip's pins or fracture the casing by extracting it with pliers  
  1161. large enough to span the chip. If you are going to do much  
  1162. reinstalling of EPROMs, you should consider obtaining a special  
  1163. chip puller tool. These are available at electronics suppliers for  
  1164. about the same price as two or three ruined EPROM chips.
  1165.  
  1166. G.   The EPROM chips must be oriented properly when installed in the  
  1167. sockets on the motherboard. Before removing your PC's ROM chips,  
  1168. note the location of the notched end of the chip casing. Any EPROMs  
  1169. that you install should be inserted into the sockets with the  
  1170. casing notches aligned in this same direction.
  1171.  
  1172. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 22
  1173.  
  1174.  
  1175. APPENDIX A.   HEXADECIMAL ARITHMETIC
  1176.  
  1177.      Every operation in a computer is based on binary numbers, which 
  1178. tend to become cumbersome to represent in print when the numerical 
  1179. values are large. Hexadecimal notation is a convenient way to represent 
  1180. large binary numbers.
  1181.  
  1182.      Hexadecimal numbers are base-16, just as the familiar decimal 
  1183. numbers are base-10. Since we still are limited to the ten digits (0 
  1184. through 9) in our decimal system, we need to define an additional six 
  1185. characters to use to represent the sixteen digits (0 through 15) 
  1186. necessary for a base-16 numbering system. In hexadecimal notation, the 
  1187. characters A through F are used to represent the values 10 through 15, 
  1188. as shown below.
  1189.  
  1190.           Hex     Decimal            Hex     Decimal
  1191.         ───────   ───────          ───────   ───────
  1192.            0         0                8          8
  1193.            1         1                9          9
  1194.            2         2                A         10
  1195.            3         3                B         11
  1196.            4         4                C         12
  1197.            5         5                D         13
  1198.            6         6                E         14
  1199.            7         7                F         15
  1200.  
  1201.      Hexadecimal numbers are constructed from hex digits in the same 
  1202. manner that you build decimal numbers. For example, the decimal number 
  1203. 5500 would be expressed as 157C in hex notation, as follows;
  1204.  
  1205.                1 times 4096 (16x256) = 4096
  1206.                5 times  256 (16x16)  = 1280
  1207.                7 times   16          =  112
  1208.               12 times    1          =   12
  1209.                                       ─────
  1210.                                        5500
  1211.  
  1212. Just as each successive place in decimal notation represents the next 
  1213. higher power of ten, each successive place in hexadecimal notation 
  1214. represents the next higher power of sixteen.
  1215.  
  1216.      Hex numbers work so well as substitutes for binary numbers because 
  1217. each hex digit represents four binary bits. As shown in Figure A-1, a 
  1218. four bit binary number has sixteen possible combinations, requiring a 
  1219. base-16 system to cover all combinations with one character. The PC 
  1220. generally handles data as either eight bit bytes or two byte (16-bit)  
  1221. words requiring two or four digit hex representations, respectively. The 
  1222. decimal and hex values of the bit positions are shown in Figure A-2.
  1223.  
  1224. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 23
  1225.  
  1226.  
  1227.        ┌────────────── reduced table goes here ────────────────┐
  1228.        │                                                       │
  1229.        │                                                       │
  1230.        │                                                       │
  1231.        │                                                       │
  1232.        │                                                       │
  1233.        │                                                       │
  1234.        │                                                       │
  1235.        │                                                       │
  1236.        └───────────────────────────────────────────────────────┘
  1237.  
  1238.          Figure A-1.  Binary Bit Values and Hexadecimal Digits
  1239.  
  1240.  
  1241.  
  1242.        ┌────────────── reduced table goes here ────────────────┐
  1243.        │                                                       │
  1244.        │                                                       │
  1245.        │                                                       │
  1246.        │                                                       │
  1247.        │                                                       │
  1248.        │                                                       │
  1249.        │                                                       │
  1250.        │                                                       │
  1251.        │                                                       │
  1252.        │                                                       │
  1253.        │                                                       │
  1254.        │                                                       │
  1255.        │                                                       │
  1256.        └───────────────────────────────────────────────────────┘
  1257.  
  1258.  
  1259.   Figure A-2.  Decimal and Hexadecimal Values of the Bit
  1260.                Positions in an 8-Bit Byte and a 2-Byte Word
  1261.  
  1262.  
  1263.      As described in Chapter 3, the segmented addressing scheme of the 
  1264. PC's 8088 microprocessor employs a pair of 16-bit binary numbers to 
  1265. construct a complete 20-bit memory address. Each of these 16-bit binary 
  1266. numbers can be represented by a four digit hex number from 0000 through 
  1267. FFFF. You can verify this range for yourself by adding up the decimal 
  1268. values listed in Figure A-2.
  1269.  
  1270.      As an aid in converting hexadecimal numbers to decimal numbers, and 
  1271. vice versa, the decimal equivalents of each hex digit in the first five 
  1272. places are shown in Figure A-3. To convert a hex value into a decimal 
  1273. value, you can work in either direction across the five places. To 
  1274. convert a decimal number to hex notation, start with the fifth (or left) 
  1275. position and work to the first place successively finding the largest 
  1276. hex digit that is less than, or equal to, the remaining decimal value.
  1277.  
  1278. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 24
  1279.  
  1280.  
  1281.        ┌────────────── reduced table goes here ────────────────┐
  1282.        │                                                       │
  1283.        │                                                       │
  1284.        │                                                       │
  1285.        │                                                       │
  1286.        │                                                       │
  1287.        │                                                       │
  1288.        │                                                       │
  1289.        │                                                       │
  1290.        │                                                       │
  1291.        │                                                       │
  1292.        │                                                       │
  1293.        │                                                       │
  1294.        │                                                       │
  1295.        └───────────────────────────────────────────────────────┘
  1296.  
  1297.  
  1298.                 Figure A-3.  Decimal Equivalents of the
  1299.                              Hexadecimal Digit Positions
  1300.  
  1301.  
  1302. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 25
  1303.  
  1304.  
  1305. APPENDIX B.  ASCII CHARACTERS
  1306.  
  1307.      The 8-bit bytes of data stored and manipulated by the IBM PC family 
  1308. have values ranging from 0 through 255 (0 through FF hex), which also 
  1309. represent the numeric codes for the 256 distinct characters used by 
  1310. these computers. These characters and numeric codes are known as ASCII 
  1311. characters and codes.
  1312.  
  1313.     The first 128 characters (0-127 decimal, or 0-7F hex) are the 
  1314. standard or true ASCII characters, which date from the pre-PC days. 
  1315. These standard characters are handled consistently among many computers, 
  1316. except for variations in the first 32 characters which have uniform 
  1317. ASCII meanings as codes for printer and console control, but which IBM 
  1318. also uses for special display characters. The second 128 characters 
  1319. (128-255 decimal, or 80-FF hex) make up the extended ASCII character set 
  1320. that is unique to the IBM PC family and, of course, the PC-Clones.
  1321.  
  1322.      Memory display utility programs such as CORELOOK and DEBUG will 
  1323. display both the hex code and the standard ASCII character representing 
  1324. each byte of memory. As a ready reference for translation between these 
  1325. byte representations, the ASCII codes, in hex notation, and the screen 
  1326. display are shown for the full standard and extended IBM character set 
  1327. in Figure B-1. For quick reference, Figure B-2 translates hex notation 
  1328. to decimal values. In both of these figures, the most significant hex 
  1329. digits are at the top of the columns and the least significant hex 
  1330. digits are at the beginning of the rows. For example, the "?" character 
  1331. has the ASCII code 3F hex or 63 decimal.
  1332.  
  1333.  
  1334.        ┌──────────────── figure goes here ─────────────────────┐
  1335.        │                                                       │
  1336.        │                                                       │
  1337.        │                                                       │
  1338.        │                                                       │
  1339.        │                                                       │
  1340.        │                                                       │
  1341.        │                                                       │
  1342.        │                                                       │
  1343.        │                                                       │
  1344.        │                                                       │
  1345.        │                                                       │
  1346.        │                                                       │
  1347.        │                                                       │
  1348.        │                                                       │
  1349.        │                                                       │
  1350.        │                                                       │
  1351.        │                                                       │
  1352.        └───────────────────────────────────────────────────────┘
  1353.  
  1354.       Figure B-1.  Standard and IBM Extended Character ASCII Codes
  1355.  
  1356. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 26
  1357.  
  1358.  
  1359.  
  1360.        ┌──────────────── figure goes here ─────────────────────┐
  1361.        │                                                       │
  1362.        │                                                       │
  1363.        │                                                       │
  1364.        │                                                       │
  1365.        │                                                       │
  1366.        │                                                       │
  1367.        │                                                       │
  1368.        │                                                       │
  1369.        │                                                       │
  1370.        │                                                       │
  1371.        │                                                       │
  1372.        │                                                       │
  1373.        │                                                       │
  1374.        │                                                       │
  1375.        │                                                       │
  1376.        │                                                       │
  1377.        │                                                       │
  1378.        └───────────────────────────────────────────────────────┘
  1379.  
  1380.               Figure B-2.  Hex-to-Decimal Conversion Chart
  1381.  
  1382.  
  1383.      Note that some of the special and extended characters will not 
  1384. always appear as a screen display when a program produces video output 
  1385. using a print function rather than poking the character code into the 
  1386. display memory. For instance, CORELOOK's ASCII display shows a blank and 
  1387. DEBUG substitutes a period for the special and extended characters.
  1388.  
  1389. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 27
  1390.  
  1391.  
  1392. APPENDIX C.  USEFUL SOFTWARE
  1393.  
  1394.      In order to easily browse through the contents of the PC's memory 
  1395. or download a portion of those contents to a disk file, you should 
  1396. consider collecting a minimum set of software tools. These tools range 
  1397. from the DOS utility DEBUG and a few lines of BASIC programming to some 
  1398. more powerful and convenient public domain programs such as CORELOOK and 
  1399. PC-DUMP.
  1400.  
  1401.      One simple way to look at the contents of the PC's memory is to use 
  1402. the DOS utility program DEBUG. For example, you can display the ROM-BIOS 
  1403. release date by means of the following commands from the DOS prompt;
  1404.  
  1405.           A>DEBUG
  1406.           - D F000:FFF5 L 8
  1407.  
  1408. This will list (the L) the ASCII codes and characters for the eight 
  1409. contiguous bytes (the 8) of memory beginning at the address F000:FFF5. 
  1410. Consult the DOS manual for descriptions of the other features of DEBUG 
  1411. that you can use to view the memory contents.
  1412.  
  1413.      You can also use a short BASIC program to display the ASCII 
  1414. characters representing the contents of specific memory locations. The 
  1415. following code will display the ROM-BIOS release date.
  1416.  
  1417.           10 DEF SEG = &HF000
  1418.           20 FOR I = 0 TO 7
  1419.           30    PRINT CHR$(PEEK(&HFFF5 + I));
  1420.           40 NEXT I
  1421.           50 END
  1422.  
  1423. If, rather than the ASCII characters, you want to display the two-digit 
  1424. hex values of the memory locations, substitute HEX$ for the CHR$ in line 
  1425. 30.
  1426.  
  1427.       A much more convenient way to quickly scan through the memory 
  1428. contents is to use the public domain program CORELOOK, which is 
  1429. available on many computer bulletin boards. CORELOOK is a menu driven 
  1430. program that displays both the hex and ASCII representations of the 
  1431. contents of a block of memory. Using single keystrokes, you can 
  1432. literally fly through memory locations to any block that you desire. The 
  1433. display is formatted for a logical sixteen bytes per line, and you have 
  1434. full control in selecting the basis to be used for the segmented 
  1435. addresses. You don't have to do much scanning of PC memory to really 
  1436. appreciate the value of using this great little program.
  1437.  
  1438.      If you are an experienced BASIC programmer, you can see how the 
  1439. simple program listed above could be expanded to include the provision 
  1440. for writing the contents of a specific portion of PC memory to a disk 
  1441. file. You need not bother, however, as this function is already 
  1442.  
  1443. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 28
  1444.  
  1445.  
  1446. available in the public domain program PC-DUMP, which is also available 
  1447. for downloading on some computer bulletin boards. PC-DUMP is a menu 
  1448. driven program that lets you select the segment paragraph address, the 
  1449. number of bytes to be written to the disk file and the disk file name. 
  1450. The program provides rigorous input formats and checking of the input 
  1451. data for allowable and/or expected values. The latest update (Rev. 2.0) 
  1452. of PC-DUMP also contains the option for downloading either the even 
  1453. numbered or the odd numbered bytes from a given block of memory 
  1454. addresses, as required for the PC-AT ROM hardware design.  In the event 
  1455. that you do not obtain an EPROM blaster with software that includes a 
  1456. full featured download function that can be used without the blaster 
  1457. being installed, you may save a good deal of time and frustration by 
  1458. using PC-DUMP.
  1459.  
  1460. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 29
  1461.  
  1462.  
  1463. APPENDIX D.  EPROM PROGRAMMER SOURCES
  1464.  
  1465.      At the time of this writing (October 1986), the type of PC-based 
  1466. EPROM blasters described in Chapter 5 are available by mail order from 
  1467. several computer components suppliers and manufacturers that advertise 
  1468. in the major computer magazines. Two sources that currently offer models 
  1469. in the $130 price range are:
  1470.  
  1471.    Apparat, Inc.
  1472.    4401 So. Tamarac Parkway
  1473.    Denver, Colorado  80237
  1474.    (303) 741-1778
  1475.  
  1476.    JDR Microdevices
  1477.    110 Knowles Drive
  1478.    Los Gatos, California  95030
  1479.    800-538-5000
  1480.  
  1481. Both of these models include software that provides the necessary 
  1482. functions described in Chapter 5.
  1483.  
  1484.      No-name versions of this type of PC-based EPROM blaster, some 
  1485. selling for around $100, are starting to appear at computer shows and 
  1486. swapmeets where vendors are selling various PC-Clone components. 
  1487. Apparently nothing is immune to the cloning phenomena. Since these 
  1488. devices are fairly new and are just catching on with the PC hobbyist 
  1489. crowd, future price reductions are sure to be seen.
  1490.  
  1491.      For you hobby purists, the perfect compliment to your ROM software 
  1492. experimentation is an EPROM programmer that you build yourself. An 
  1493. intelligent serial EPROM programmer is the topic of Steve Ciarcia's 
  1494. Circuit Cellar feature in the October 1986 issue of BYTE magazine. Like 
  1495. the stand-alone commercial programmers, this type of design interfaces 
  1496. via the PC's serial I/O port rather than through an expansion card 
  1497. connector. This arrangement is convenient if your PC has an available 
  1498. serial port and would even allow you to do your EPROM burning using 
  1499. computers other than the IBM/clone family. Ciarcia's project includes 
  1500. the menu-driven programming system software to make using the programmer 
  1501. a breeze. Typical of the exceptional quality of the Circuit Cellar 
  1502. build-it-yourself projects, this update of an earlier design is a real 
  1503. gem.
  1504.  
  1505.      The PC-based EPROM blasters may see limited use and it may be 
  1506. possible to pick up a used unit from another PC owner. You might check 
  1507. the specialized computer/electronics classified add publications, the 
  1508. posted notices at your local computer and electronics retailers, or the 
  1509. PC User's Group in your area.
  1510.  
  1511. THE IBM PC READ-ONLY-MEMORY BACKUP MANUAL                       Page 30
  1512.  
  1513.  
  1514.  
  1515. NOTES
  1516.  
  1517.