Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!ucdavis!iris!foss From: foss@iris.ucdavis.edu (Jim Alves-Foss) Newsgroups: comp.sys.ibm.pc Subject: Re: Activating COM3 and COM4 Message-ID: <4173@ucdavis.ucdavis.edu> Date: 4 May 89 04:43:03 GMT References: <8036@fluke.COM> <4160@ucdavis.ucdavis.edu> Sender: uucp@ucdavis.ucdavis.edu Reply-To: foss@iris.ucdavis.edu (Jim Alves-Foss) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 53 In article <4160@ucdavis.ucdavis.edu> foss@iris.ucdavis.edu (Jim Alves-Foss) writes: >In article <8036@fluke.COM> lal@tc.fluke.COM (Larry Lohkamp) writes: >>difference, my DOS rev. is 3.3. Can I get all 4 ports to work, or am I >>dreaming the impossible? > >I have an internal modem using port 3 and DOS 3.3 >What I did to let the modem work was write a simple little program to do the >following: > >1. Change DOS equipment register to state I have 3 serial ports >2. Place the Port Base Address into the DOS table for serial ports - room > exists for at least 7 (maybe 8). > >I wrote the code in BASIC - less than 5 lines, compiled it and have my >autoexec.bat file automatically run it when I boot. > >Unfortunately I do not have the code here. I'll try to remember to post it >tonight. > >-Jim Alves-Foss Here it is. Just remember to run "rs232off" before and after any programs that misbehave when using com 3 or 4. (such as Procomm). ------------------------ Cut here for "addcom.bas" -------------------- REM The code was written by Jim Alves-Foss Feb. 1988. It is released REM into the public domain by the author. -Enjoy- REM This is for Microsoft Quick Basic but the concept is easy to adopt REM for other languages. REM Place this executable in your autoexec. REM Set segment to zero 10 DEF SEG = 0 REM At 400H we store the com port address information, 2 bytes gives each REM port address. Here we store 3E8 as base for COM 3: (com 4: base 2E8) 20 POKE 1028, 232: POKE 1029, 3 REM Now need to set the port information at 411H. 30 a = PEEK(1041) REM Got old equipment information. Now, zero out bits 1,2,3 (numbered 0..7) REM These hold the number of serial ports (0-7). Set this value to 3. REM Restore old information with number of ports = 3 40 POKE 1041, (a AND 241) OR 6 REM Resturn to DOS 50 SYSTEM ----------------------- End Code -- see it was REAL short ------------- -Jim Alves-Foss