home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / info / com3com4.txt < prev    next >
Text File  |  1994-03-07  |  5KB  |  151 lines

  1. COM3COM4.DOC:
  2.  
  3. Tips on Using COM3 and COM4 Serial Ports
  4.  
  5. Part I - Port Address Problems
  6.  
  7. Part II - Converting the IBM Asynchronous Communications
  8.           Adapter to use as COM3 or COM4
  9.  
  10.  
  11. Part I - Port Address Problems
  12.  
  13. SETCOM3 - Set base address of COM3 serial port
  14.  
  15.           Al Stangenberger
  16.           Dept. of Forestry & Resource Mgt.
  17.           University of California
  18.           Berkeley, CA  94720
  19.  
  20.           (forags@violet.berkeley.edu)
  21.  
  22. This discussion and program is adapted from the MS-Kermit User Guide.
  23.  
  24. Some programs trying to use serial ports COM3 or COM4 will not
  25. run because the base addresses of these serial ports are not
  26. stored in the proper low-memory addresses.  There are no
  27. standards for the values for these addresses (unlike for COM1 and COM2),
  28. hence they may not be in the system ROM Bios boot code which is run
  29. when the computer is turned on.
  30.  
  31. This condition may easily be confirmed by attempting to use the
  32. MS-DOS MODE command to set parameters for COM3 or COM4.  If an otherwise
  33. valid MODE command returns diagnostics such as "Illegal device" or
  34. "Invalid parameters," then these addresses have not been defined yet.
  35.  
  36. The code in SETCOM3.RAW is a prototype of input to DEBUG
  37. which can be used to construct a small .COM program to
  38. correct this problem for serial port COM3.  A slight
  39. modification would make it suitable for COM4.  Normally,
  40. SETCOM3 is only executed once as part of the AUTOEXEC.BAT
  41. procedure.
  42.  
  43. To adapt SETCOM3.RAW to your situation, consult the
  44. documentation for your serial card or modem to find the base
  45. address used when the card or modem is set for COM3.
  46. A typical value would be 02E8 (hexadecimal).
  47. Modify lines 4 and 5 in SETCOM3.RAW to have this value.
  48.  
  49. To construct the program, type the command:
  50.  
  51. A> DEBUG < SETCOM3.RAW
  52.  
  53. It's a good idea to use DEBUG to examine the result to be
  54. sure it is correct.  To do this:
  55.  
  56. A> DEBUG setcom3.com
  57. -u
  58.      (the assembled code will be listed here)
  59. -q
  60.  
  61. The program is executed by the command
  62.  
  63. A> SETCOM3
  64.  
  65.  
  66. To change from COM3 to COM4, find the base address for COM4 as
  67. described above, and change lines 4 and 5 accordingly.
  68. Also change line 7 from [4] to [6] to store this address at the
  69. proper location in memory.  Finally, change the name of the file
  70. written (line 12) to SETCOM4.COM for clarity.
  71.  
  72. Following is a commented version of SETCOM3.RAW:
  73.  
  74. Line #  Instruction    Comment
  75. ------  ------------   -----------------------------
  76.  1      a              Assemble command (to DEBUG)
  77.  2      mov ax,40      value 40H
  78.  3      mov es,ax      put in register es
  79.  4      mov ah,02      02 part of 02E8H
  80.  5      mov al,e8      E8 part of address
  81.  6      es:
  82.  7      mov [4],ax     store in 40:4 for com3 (change to [6] for COM4)
  83.  8      int 20         return to DOS
  84.  9                     blank line ends assemble mode
  85. 10      r cx           Show contents of register cx
  86. 11      0f             Set cx to write 0fh bytes
  87. 12      n setcom3.com  name file setcom3.com
  88. 13      w              write the file
  89. 14      q              quit debug
  90.  
  91. Following is an un-commented version of SETCOM3.RAW.  Use a
  92. text editor to alter it as needed, and write it to a
  93. separate file (SETCOM3.RAW) for use as input to DEBUG.
  94.  
  95. ------------------------------- cut here -------------------
  96. a
  97. mov ax,40
  98. mov es,ax
  99. mov ah,02
  100. mov al,e8
  101. es:
  102. mov [4],ax
  103. int 20
  104.  
  105. r cx
  106. 0f
  107. n setcom3.com
  108. w
  109. q
  110.  
  111.  
  112. ------------------------------- cut here -------------------
  113.  
  114.  
  115. Part II - Converting the IBM Asynchronous Communications
  116.           Adapter to use as COM3 or COM4
  117.  
  118.  
  119. From: uw-beaver!tektronix!tekgen!ferrouss (Ferrous Steinka)
  120. Newsgroups: comp.sys.ibm.pc
  121. Subject: Serial ports 3 and 4
  122. Date: 25 Mar 88 17:55:48 GMT
  123.  
  124. So, you've upgraded to a multifunction card and you have an old
  125. IBM asynchronous communications adapter laying around that is
  126. just taking up space.  Well, with a simple mod to the board, it
  127. can be made to respond to COM3 or COM4.  Of course you will need
  128. to have appropriate software to take advantage of your new serial
  129. port. IBM MSDOS 3.3 knows about ports 3 and 4, MSDOS 3.1 doesn't
  130. and I'm not sure about 3.2 or 3.21. I tested ProComm and it DOES
  131. know about the secondary ports.  The addresses of COM1 and COM2
  132. are 3F8(h) and 2F8(h) respectively.  The addresses for COM3 and
  133. COM4 are 3E8(h) and 2E8(h) respectively. The difference is address
  134. line A4, and all you have to do is invert it on the board prior to
  135. the decoding logic. This can be done by cutting pin 5 of U-2, a
  136. 74LS30, at the surface of the board and gently bending it up so
  137. that it may be soldered to.  The pad to which pin 5 of U-2 was
  138. soldered is A4, which connects via the edge card connector to the
  139. system bus. Pin 5 of U-2 is an input to the decoding circuitry. I
  140. chose to use a 74LS04 as the inverter (piggy-backed onto U-3, also
  141. a 74LS04, to provide power and mechanical stability) . Connect pin
  142. 3 of the tacked on 74LS04 to A4 and pin 4 of the 74LS04 to pin 5 of
  143. U-2.  CAUTION: There are unused buffer/inverters on the board but
  144. they are open collector type devices.  Using these could lead to
  145. timing problems.
  146.  
  147. For additional information, consult an IBM Technical Reference
  148. Guide for either the PC or the XT.  Both have schematics of the
  149. asynchronous communications adapter.
  150.  
  151.