home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / comadr11.zip / COMADDR.TXT < prev    next >
Text File  |  1994-11-11  |  20KB  |  380 lines

  1. COMADDR.EXE  version 1.1            COMADDR.TXT
  2. Copyright (c) 1994 K. D. Smyth All Rights Reserved
  3.  
  4. What it does, briefly:
  5.     COMADDR can reset the COM port I/O address list (those "3F8" 
  6. and "2E8" things you set jumpers for on adapter cards) stored in 
  7. your computer's memory to either the PC standard defaults or any 
  8. others that you like. This lets the digital address that the 
  9. application software reads in for the COM port actually agree 
  10. with the jumper setting; correcting mistakes your BIOS loaded in 
  11. during start-up.  It also allows use of COM3 and COM4 on older PC 
  12. and XT machines.  COMADDR is especially useful for machines with 
  13. lots of add-ons, or ones using extended adapters like the Mouse 
  14. Systems Serial Card, or the Quickpath Portfolio I/O card, which 
  15. allow you to set different addresses to resolve various I/O and 
  16. hardware interrupt (IRQ) conflicts.  It is compatible with both 
  17. DOS and Windows, and will help resolve a lot of confusing adapter 
  18. address problems.  It is not a TSR and does not take up RAM space.
  19.  
  20. Compatibility:MS/PC DOS 3.3 or higher, DR DOS 6.0, Novell DOS 7.0
  21.             works with Windows 3.1/3.11
  22.  
  23. How to Use:  Three Ways!!
  24.  
  25. Setting System Back to Defaults
  26.  
  27.         COMADDR   (nothing afterward)
  28.         sets all four COM ports to their default I/O 
  29.         addresses (COM1=3F8, COM2=2F8, C0M3=3E8, COM4=2E8)
  30.         example:"C:\comaddr".  Very useful in your
  31.         AUTOEXEC.BAT file, and a big help for older 
  32.         machines which may only look for COM1 and COM2.              This will let them also load COM3 and COM4.
  33.  
  34. Setting System to Custom Addresses
  35.  
  36.         COMADDR (address 1),(address 2),(address 3),(address 4)
  37.         sets COM1 to address 1, COM2 to address 2, etc.
  38.         example: "C:\comaddr 03F8,02F8,0338,0300" will            set COM1 to 3F8, COM2 to 2F8 (both normal), COM3
  39.             to 338 and COM4 to 300 (both weird) 
  40.  
  41. Changing Just One Address
  42.  
  43.         COMADDR (address 1),,,
  44.         sets COM1 to address 1 but leaves others unchanged
  45.         ("COMADDR ,address 2,," sets COM2 to address 2, 
  46.         "COMADDR ,,address 3, sets COM3 to address 3, and 
  47.         and so on.)
  48.         example: "C:\comaddr ,,02E8," will change COM3 to 
  49.         to 2E8 and not disturb any settings for COM1, COM2
  50.         and COM4
  51.                            
  52. Entering the Numbers
  53.  
  54.     Easy.  "02f8", "2f8", "02F8" and "2F8" all mean the 
  55. same thing.  Commas (,) or semicolons (;) are used to separate 
  56. the data.  Leave out the quote marks when you enter things, but I 
  57. assume if you're smart enough to know that you need this program, 
  58. you'll already have figured that one out!  Addresses below 0200 
  59. or above 03FF will not be accepted, except for 0000.
  60.  
  61. Technical Discussion 
  62.  
  63. 1. What does this thing do?
  64.  
  65.     This program was written to solve a simple, stupid problem: 
  66. setting up the I/O (input /output) addresses for the COM ports on 
  67. a PC.  Your computer's start-up sequence that runs when you turn 
  68. the computer on has a routine to do this; it tests certain ad-
  69. dresses and records which ones respond, and in which order; and 
  70. stores them in hexadecimal form in an area of memory called the 
  71. "ROM BIOS Data Area".  (You can look at this area with the DEBUG 
  72. or SID utilities included with Microsoft or Digital Research 
  73. DOS'es, and make some sense of it sense if you are familiar with 
  74. the way assembly language writes things into memory.)  The first 
  75. responding COM address is stored in the location reserved for 
  76. COM1, the second in the one for COM2, etc.  This isn't a bad 
  77. system, but it has some limitations which became problems as the 
  78. capabilities of PC's grew.  COM3 and COM4 were not often used in 
  79. XT's so some old BIOS's leave these address locations blank.  
  80. Also, this method assumes that all COM port numbers are being 
  81. used in order.  For example, if COM1 is disabled but COM2 and 
  82. COM3 are used; then the address for COM2 will be written in the 
  83. COM1 location, and the COM3 address will be written in the COM2 
  84. location.  The computer then gets lost when it tries to communi-
  85. cate with COM2 or COM3. Problems like this didn't happen much 
  86. before things like scanners, bus mice, and other goodies became 
  87. common, but now as you fill up your PC you may need to disable 
  88. COM ports to use IRQ lines normally assigned to them, or to 
  89. prevent IRQ's from being shared by incompatible devices; and 
  90. things just don't run right, or in extreme cases, the computer 
  91. locks up when you try to access things in certain combinations.  
  92. Your Mac user buddies get a good laugh, and make smug comments.  
  93. (If they get on your nerves, ask them if they could get all of 
  94. their older software to run under System 7) The COM/IRQ silliness 
  95. is a legacy (actually a inherited birth defect) from the original 
  96. IBM-PC and is carried on by the need to keep software and hard
  97. ware (at least some of it) compatible with older machines. 
  98.  
  99.     COMADDR is a solution to these problems. It allows you to 
  100. change any or all of the four COM port addresses in the ROM BIOS 
  101. Data Area, so that the addresses called by your software, the 
  102. addresses in the data area, and the REAL address that the silicon 
  103. on the card is set up to use will ALL AGREE.  It does not change 
  104. the IRQ numbers that each function uses, but gives you some more 
  105. ways around that problem.  It also reads and resets the machine 
  106. configuration word in the BIOS area to reflect the new number of 
  107. COM ports, if you've added any.  It is not a TSR (Terminate, Stay
  108. Resident) program so it does not sit and occupy precious lower RAM
  109. space When the addresses set in the data area, the addresses set up
  110. physically on the cards (those jumpers or DIP switches) and the ad-
  111. dresses your software sends the data to are all the same, you can go
  112. on to more important problems, like whats for lunch.  Invite the Mac
  113. users along; we're really all together in this.
  114.  
  115. 2. I/O Addresses and IRQ's - What ARE they?? (and what do they do?)
  116.  
  117.     These I/O addresses and IRQ's are two things that give 
  118. migraines when setting up Intel-based PC's, and finding a decent 
  119. explanation of their functions is very difficult.  Let's try a 
  120. simple analogy.  Think of things as a classroom with chairs 
  121. spread around in a neat arrangement, and a teacher with a bad 
  122. memory for names who must rely on a seating chart.  When a hand 
  123. goes up, the teacher looks at the chart to see who sits in that 
  124. chair, and calls on that person by name. When the teacher wants 
  125. to call on someone, he or she looks at the chart to find out what 
  126. their name is and in what chair they're sitting. In the computer, 
  127. the processor is the teacher, the chairs are the "IRQ's" (or 
  128. "hardware Interrupt ReQuests", an interrupt being something that 
  129. causes the processor to stop what it is doing and react to 
  130. something else) and the seating chart is the list of "I/O ad
  131. dresses".  The software is the key to tying all of these things 
  132. together, or in the analogy, keeping the chairs arranged and the 
  133. seating list up to date so that our absent-minded professor 
  134. doesn't get hopelessly lost.  Sort of like the instructor's aide.  
  135. Now, when we set addresses on the circuit cards we're giving each 
  136. student a name, then we need to write the student names in a 
  137. place where the software can read them.  This is where COMADDR 
  138. can help.  We also need to put our cards into the chairs, er, 
  139. IRQ's where the software will tell the processor to look.
  140.  
  141.     The original PC and XT that followed had eight IRQ's, 
  142. numbered 0 to 7 and the AT bus machines (including most 286's, 
  143. 386's, 486's and Pentiums) have 16, numbered 0 to 15.  We should 
  144. have plenty to choose from; but some are used for system func-
  145. tions, like IRQ0 and IRQ1; the system timer and keyboard inter-
  146. rupts, respectively.  Each available IRQ has a signal line on the 
  147. connector that the cards plug into.  For a PC or XT 8-bit bus 
  148. computer, the IRQ's are set up as follows:
  149.  
  150. IRQ2 "reserved", see text - sometimes used by EGA or VGA cards
  151. IRQ3  shared by COM2 and COM4
  152. IRQ4  shared by COM1 and COM3
  153. IRQ5  hard disk, if installed
  154. IRQ6  floppy disk
  155. IRQ7  parallel printer (LPT1), if installed 
  156.  
  157.     As you can see, there's not a lot of room on the 8-bit bus.  
  158. Some references list IRQ 2 as 'reserved', since it is used in a 
  159. screwy way on AT and up machines and by some XT EGA and VGA 
  160. cards, try using it if its open on your XT; it might be the only 
  161. way to make things work.  (The Mouse Systems Serial Card allows 
  162. you to use IRQ's 2,3,4,5 or 7 for a serial port, and can be very 
  163. useful when you want to add something to a crowded box.)  On an 
  164. AT (or above) machine, there are an extra 36 pins on the card to 
  165. run signals on, so they added IRQ's along with 8 more bits of 
  166. data.  IRQ2 really is 'reserved' on an AT (don't use it) and is 
  167. tied into IRQ9, don't ask why, just don't use that either; it makes 
  168. strange things happen on some machines.  The rest of the AT IRQ's 
  169. are assigned as follows:
  170.  
  171. IRQ 3 COM2/COM4        IRQ 8 Real Time Clock (not available)
  172. IRQ 4 COM1/COM3        IRQ10 not assigned
  173. IRQ 5 second printer    IRQ11 not assigned 
  174. IRQ 6 floppy disk    IRQ12 not assigned
  175. IRQ 7 first printer       IRQ13 Math Coprocessor (not available)
  176.             IRQ 14 Hard Disk
  177.             IRQ 15 not assigned, used by some SCSI boards
  178.  
  179.     If you're keeping score, you notice that an XT bus has IRQ's 
  180. 2,3, and 4 available, three total assuming that you have a hard 
  181. disk and a standard printer attached; and the AT bus has 
  182. 3,4,10,11,12, and 15 available.  You can also disable the second 
  183. printer function on most AT cards to allow use of IRQ5 on the AT 
  184. bus, to get a total of seven available loose IRQ's for use on the 
  185. various adapters.  As a general rule, if something is not installed
  186. on your machine but the IRQ line is available on the bus, you can 
  187. use that vacant IRQ line for something else if your software can 
  188. recognize that IRQ line.  
  189.         
  190.     That's the big if.  Most hardware makers like to use cheaper 
  191. 8-bit ("XT-AT compatible") cards instead of 16 bit cards, so they 
  192. cheat us out of many possible configuration options and make 
  193. IRQ's 3 through 5 very much in demand.  You can try to avoid 
  194. filling them but lots of DOS driver software doesn't recognize 
  195. any other IRQ's and doesn't like to share them.  That makes it hard 
  196. to get around this difficulty.  For example, if you are trying to run 
  197. your mouse on COM3/IRQ11 so that you can install that new CD-ROM on 
  198. IRQ4 but your mouse driver doesn't recognize IRQ11, the mouse won't 
  199. work. This is particularly bothersome when you look at history - the 
  200. IBM AT came out about ten years ago so the manufacturers have had 
  201. plenty of time to work on these things.  Be aware that this can 
  202. happen and ask a lot of questions when you buy add-ons to your 
  203. computer.  One of the nice things about Windows is that you can 
  204. load non-standard IRQ's for COM ports via the Ports Control Panel 
  205. - Advanced menu, but these settings will only hold for Windows 
  206. applications that rely on the Windows I/O routines.  But remem-
  207. ber, if a card is a short, "XT" type, IRQ's 8-16 are not there.
  208.  
  209.     This discussion went on longer than intended, but I hope 
  210. the explanations were helpful.  If you want to avoid IRQ crowding 
  211. problems; use an AT (286 or above) and pay extra if need be for 
  212. cards that have the added IRQ lines.  Mouse hookups are the 
  213. easiest things to move around, if your driver software will 
  214. cooperate.  If a software driver cannot access these IRQ's, get  
  215. a better one.  Use COMADDR to make certain that the COM port ad-
  216. dresses are set correctly if addresses are the problem.  With a 
  217. little shuffling, hopefully you'll get everyone in the "class" 
  218. seated and participating (or in the pedagogical vernacular 
  219. "interacting") just fine.
  220.  
  221. 3. Setting things up
  222.  
  223.     Plug-in cards will have a set of jumper plugs or DIP switch
  224. es to let you set the I/O address and IRQ line that the card will 
  225. use. There are usually a few options available and the documenta
  226. tion that came with the card (NEVER throw that away!!) will tell 
  227. you what they are and how to set-up the card.  Once you've 
  228. 'configured' the card, be sure to write the information down so 
  229. that you can refer to it when you set up software, a drawing of 
  230. where the jumpers or switches are on the card is also a good 
  231. idea.  If you don't know how your computer is configured, but 
  232. want to find out, the simplest way is to use the Microsoft 
  233. MSD.EXE utility (comes with MS DOS 6 or Windows) or Norton Utili-
  234. ties System Configuration command, or Quarterdeck's Manifest to 
  235. give you a readout of the I/O address and IRQ assignment of each 
  236. installed function.  When installing new cards, pick an address 
  237. that's not used by anything else and try not to share an IRQ line 
  238. between functions if at all possible. Printers can usually share 
  239. IRQ's with other printers, but CDROMS, mice, scanners, fax cards, 
  240. and modems frequently have problems.  When in doubt, don't share.
  241.  
  242.     The standard ('default') COM port I/O addresses are: COM1 
  243. 3F8, COM2 2F8, COM3 3E8 and COM4 2E8.  Almost all serial cards 
  244. have these COM1 and COM2 addresses jumpered in at the factory, 
  245. and provide at least the COM3 and COM4 addresses as alternates.  
  246. Better cards have more options to help you set up the machine so 
  247. that everything will work. From a hardware point of view, its 
  248. perfectly o.k. to use a non-standard address for something, as 
  249. long as you don't have two functions sharing the same address.  
  250. Most of the system functions have addresses below 200, and this 
  251. version of COMADDR will give you an illegal input message and not 
  252. change anything if you try to write in one of these.  Other ad-
  253. dresses to avoid are 3F0-3F7 (floppy disk controller), 378-37F 
  254. (LPT1, if enabled) and 278-27F (LPT2, if enabled).   Anything 
  255. above 03FF will also cause COMADDR to do nothing except give an 
  256. error message.  You may enter a 0000 address to shut off a port.
  257.  
  258. 4. Using this with Windows
  259.  
  260.           The easiest way to use this program with Windows is to 
  261. either place the "COMADDR" command into your AUTOEXEC.BAT file, 
  262. before your "cd windows" line if you use that, or to exit Windows 
  263. (press "Alt-F4"), run COMADDR, then restart Windows. When Windows 
  264. is restarted, the Port Addresses listed in the Control Panel will 
  265. automatically be updated.  Running COMADDR from the Windows "MS-
  266. DOS" shell (that icon thing) may cause the address table that 
  267. Windows previously loaded and is using to disagree with the new 
  268. one you've set up with COMADDR.  This may cause problems. If you 
  269. do this anyway, and then reset the Port Addresses in the Windows 
  270. Control Panel (or SYSTEM.INI), Windows will tell you to restart, 
  271. so you will not save any time. (Note:  this program has been 
  272. tested only with Windows 3.1,  it should not crash or wreak havoc 
  273. with older versions of Windows, but this has not been tested.)  
  274. So, be safe, exit Windows before you run COMADDR, then restart 
  275. Windows.  Also, Windows documentation states that Windows will 
  276. not recognize a mouse on COM3 or COM4 but some drivers have 
  277. overcome this limitation.  A feature of Windows that not many are 
  278. aware of is that it will allow you to have up to nine COM ports.  
  279. COMADDR will only set addresses for the original four that are 
  280. used by plain DOS programs.  Use the Windows Control Panel or 
  281. edit SYSTEM.INI to insert addresses for COM 5 through COM 9.  You 
  282. will probably need to share IRQ's for these.  Windows IRQ sharing 
  283. can be enabled by adding the line "COMIrqSharing=True" to the 
  284. [386Enh] section of your SYSTEM.INI file. (Now there is a mouth-
  285. ful of jargon!)  The Windows documentation states that this does 
  286. not work with all adapters.  There are some good shareware pack-
  287. ages out there that automate this procedure.
  288.  
  289. 5. Network Environments
  290.  
  291.     This program alters only COM port addresses.  It has been 
  292. tested with a Novell Netware configuration which uses an Ethernet 
  293. card and caused no conflict there, but that is only one configu-
  294. ration.  If your network does not use a COM port there should be 
  295. no problem, but the easiest way to be certain of what will happen 
  296. when using COMADDR in a network 'environment' is to use COMADDR 
  297. in your AUTOEXEC.BAT before loading the network shell files.
  298.   
  299. WARNING WARNING WARNING WARNING WARNING
  300.  
  301.     This program will allow you to reset COM port addresses to 
  302. whatever you need.  It will also allow you to set the COM port to 
  303. the same address as a floppy disk or some other vital organ of your 
  304. computer.  This mistake could have catastrophic results.  I am not 
  305. responsible for any misuse of this program, or any data lost as a 
  306. result.  Please be careful, and enter only those addresses for 
  307. which your cards are programmed. If you are not certain of these
  308. addresses, consult the data sheets for the particular adapter cards 
  309. you are using; and check out your system configuration using a 
  310. utility such as Microsoft's MSD (included with MS-DOS 6.x and 
  311. Windows 3.1), Quarterdeck's Manifest, or Norton Utilities System 
  312. Configuration.  If you are still not too sure, use only the first 
  313. mode described; which sets all four addresses to the IBM defaults
  314. and set the address jumpers on the cards accordingly.
  315.  
  316. Disclaimer of Warranty
  317.  
  318. THIS PROGRAM IS SUPPLIED WITH NO WARRANTIES, EXPRESS OR IMPLIED, 
  319. AND SPECIFICALLY NO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR 
  320. A PARTICULAR PURPOSE.  THE USER ASSUMES ALL LIABILITY FOR DAMAGES 
  321. RESULTING FROM LOSS OF DATA, INTERRUPTION OF BUSINESS, LOSS OF 
  322. PROFITS, USE OF EQUIPMENT, DAMAGE TO EQUIPMENT, OR INCIDENTAL OR 
  323. CONSEQUENTIAL DAMAGES.  
  324.  
  325. In using this software you are assuming all risk as to its re-
  326. sults and performance.  Use of this program for any period of 
  327. time constitute your agreement with and acceptance of these 
  328. conditions and responsibilities.  I am not responsible for 
  329. maintaining and updating this software on your system, except
  330. as stated below.
  331.  
  332. Please report any bugs.  I cannot guarantee that I can fix all
  333. of them, but I will try.
  334.  
  335. REGISTRATION
  336.  
  337.      This is a copyrighted program, and all rights are specifi-
  338. cally reserved.  To legally use this software after a 30-day 
  339. evaluation period, you must register and receive a license.  
  340. Registration entitles you to a free copy of any upgrade and 
  341. use of the executable COMADDR.EXE on up to three computers.  The 
  342. registration fee is ten dollars US ($10) for all users with the 
  343. exception of teachers in public schools, who may register this 
  344. program and receive a license for use in a classroom or 
  345. other educational purpose at no cost.  These requests must be made
  346. on the school letterhead.
  347.  
  348.     This program may be freely distributed by wire or electronic 
  349. means (i.e., bulletin boards and online information services) or 
  350. by shareware distributors.  You must still register this software 
  351. even if you paid the distributor for the medium on which it was 
  352. transmitted to you.  Any form of distribution must be complete 
  353. and include the three files listed below.  These files may be com-
  354. pressed for distribution but not otherwise altered in any other way.
  355.  
  356. Files included: 
  357.         COMADDR.EXE  Executable
  358.         COMADDR.TXT  Long-winded Documentation (this file)
  359.         READIT.1ST   Short Documentation
  360.         
  361.  
  362. K.D. Smyth                email:k.smyth1@genie.geis.com
  363. 1618 Quail Ave                 ksmyth@aol.com
  364. Sunnyvale, CA 94087
  365.  
  366.  
  367.  
  368.  
  369. Legal Disclaimers
  370.  
  371. Mouse Systems is a registered trademark of Mouse Systems Corporation.
  372. Microsoft, MS and MS-DOS are registered trademarks, and Windows 
  373. is a trademark of Microsoft Corporation
  374. Manifest is a registered trademark of Quarterdeck Systems Inc.
  375. Norton Utilities is a registered trademark of Symantec Corporation.
  376. Portfolio is a registered trademark of Quickpath Company
  377. DR DOS and Novell Dos are registered trademarks of Novell Inc
  378. Pentium is a trademark of Intel Corporation
  379.     
  380.