🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1449

Re: Serial Port Setup

#1449
From: Frotz
Date: Fri, 11 Sep 1992 17:49
32 lines
1533 bytes
davidson@cs.ubc.ca (Mark Davidson) writes:


]I'm writing an software interface for a PS/2 model 90 to communicate
]with a Sony videodisc recorder (LVR-5000) and I'm having problems
]setting up the serial port. I looked at the FAQ BTW,

]I've defined the name and the settings of the port in the following
]macro

]#define DEFAULT_PORT "COM1: 9600, N, 8, 1"

]setup_tty(char *dev_name)
]{
]   int ofile_d;
]   if (!( ofile = fopen(dev_name, "w"))) { 

You can't open a device named "COM1: 9600,N,8,1" (or any combination
of this).  You can only open "COM1:".  If you want to set the baud
rate, you might pass this DEFAULT_PORT string through a system() call
to invoke MODE.COM, but that's slow and ugly.

The better solution is to get Ralf Brown's Interrupt List, and look at
the INT14 BIOS calls to set the baudrate. 

--
John "Frotz" Fa'atuai	frotz@novell.com		(email@domain)
Desktop Systems		uunet!novell.com!frotz		(bang address)
  Group/Novell		NOVELL:FROTZ  or  FROTZ@NOVELL	(MHS address)
c/o TS Dept.		408/645-2067			(vmail)
80 Garden Court		408/649-8209			(fax)
Monterey, CA  93940
Technical Details
Message-ID: <TQBQBYS4@dri.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!drivax!frotz
References: <1992Aug26.202240.1342@cs.ubc.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!drivax!frotz
From: frotz@dri.com (Frotz)
Subject: Re: Serial Port Setup
Message-ID: <TQBQBYS4@dri.com>
Keywords: serial input output setup
Sender: frotz@novell.com
Reply-To: frotz@novell.com
Organization: Desktop Systems Group/Novell, Monterey CA/USA
References: <1992Aug26.202240.1342@cs.ubc.ca>
Date: Fri, 11 Sep 92 17:49:24 GMT
Lines: 32