🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.msdos.programmer
5 messages
5 total messages Started by Ron Feigen Wed, 30 Dec 1992 20:09
Setting up serial ports
#908
Author: Ron Feigen
Date: Wed, 30 Dec 1992 20:09
21 lines
1029 bytes
Being my first post, I hope this is the appropriate newgroup.

I am a Unix/C/Assembler type that finds himself in the position of having to
write/port an app. on an IBM PC.  One of the functions needed is to establish
carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
Asking the user to use the DOS mode command would be sort of kludgy.
Can anybody give some leads?  Books?  Examples?

Anyhelp would be greatly appreciated!!!!!!!!


Thanks in advance,




-- 

>
Ron Feigen
ronf@panther.mot.com
Re: Setting up serial ports
#911
Author: John T. Penn
Date: Thu, 31 Dec 1992 14:13
30 lines
1759 bytes
In article <1992Dec30.200952.5153@panther.mot.com>, ronf@panther3.panther.mot.com (Ron Feigen) writes:
> Being my first post, I hope this is the appropriate newgroup.
> 
> I am a Unix/C/Assembler type that finds himself in the position of having to
> write/port an app. on an IBM PC.  One of the functions needed is to establish
> carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
> Asking the user to use the DOS mode command would be sort of kludgy.
> Can anybody give some leads?  Books?  Examples?
> 
> Anyhelp would be greatly appreciated!!!!!!!!
> 
> 
> Thanks in advance, 
> -- 
> 
> >
> Ron Feigen
> ronf@panther.mot.com


There are numerous ways of initializing a serial port with 'C'. My standard
method is to directly write to the UART addresses. A more commonly used method
is to use a library function such as `_bios_serialcom`. Most `C` compilers for
DOS have this function or one that is similar. If you wish to write directly
to the port addresses, the proper function to use would be 'outp','outport`,
`outportb', etc., again depending on the compiler you are using.
Good Hunting...

John
Re: Setting up serial ports
#913
Author: Rudy Witt
Date: Thu, 31 Dec 1992 17:32
37 lines
1489 bytes
In article <1992Dec30.200952.5153@panther.mot.com> ronf@panther3.panther.mot.com (Ron Feigen) writes:
>Being my first post, I hope this is the appropriate newgroup.
>
>I am a Unix/C/Assembler type that finds himself in the position of having to
>write/port an app. on an IBM PC.  One of the functions needed is to establish
>carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
>Asking the user to use the DOS mode command would be sort of kludgy.
>Can anybody give some leads?  Books?  Examples?
>
>Anyhelp would be greatly appreciated!!!!!!!!
>
>
>Thanks in advance,
>
>
>
>
>-- 
>
>>
>Ron Feigen
>ronf@panther.mot.com


I found a great book called:

Serial Communications in C and C++
written by Mark Goodwin
published by MIS:Press


good luck!
-- 
Rudy Witt                          Internet:  rudy@witt.almanac.bc.ca
Merit Technologies Ltd.               Voice:  604-245-4746
Ladysmith, BC.
---------------------------------------------------------------------
Re: Setting up serial ports
#912
Author: Bill Ruediger
Date: Thu, 31 Dec 1992 17:55
24 lines
1480 bytes
ronf@panther3.panther.mot.com (Ron Feigen) writes:

>Being my first post, I hope this is the appropriate newgroup.

>I am a Unix/C/Assembler type that finds himself in the position of having to
>write/port an app. on an IBM PC.  One of the functions needed is to establish
>carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
>Asking the user to use the DOS mode command would be sort of kludgy.
>Can anybody give some leads?  Books?  Examples?

>Anyhelp would be greatly appreciated!!!!!!!!


>Thanks in advance,



I suggest using an already made library.  I user ENCOM, from ENQUE
software.  I belive the file is ENCOM100.ZIP in the SIMTEL archives.  It
helps recognise special chips...  
I found it easy to use.  If all you need is a small model library, the
SIMTEL file should do... If you need source, the phone number for the
author is included, and I think it is about $50.00 or so.  I called for
tech. support, and they were very helpful.
Re: Setting up serial ports
#930
Author: Jen Kilmer
Date: Mon, 04 Jan 1993 04:36
29 lines
1940 bytes
In article <1992Dec30.200952.5153@panther.mot.com> ronf@panther3.panther.mot.com (Ron Feigen) writes:
>Being my first post, I hope this is the appropriate newgroup.
>
>I am a Unix/C/Assembler type that finds himself in the position of having to
>write/port an app. on an IBM PC.  One of the functions needed is to establish
>carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
>Asking the user to use the DOS mode command would be sort of kludgy.

Well, if you wanted to do what the ms-dos mode command does, it
does an int 21 to set up the serial port. The int 21 is implemented
throught the serial port device driver [also a part of msdos unless 
you've installed a replacement for the default one in io.sys] which
eventually does a BIOS call. The BIOS then talks to the UART directly.

You can of course talk to the UART or the BIOS yourself, and skip msdos
- particularily if you want to program the chip in a method not provided
by msdos/BIOS. The book _DOS Programmer's Reference_ by Terry Dettmann,
published by QUE, covers the MSDOS, BIOS, and UART. [Don't confuse this
book with the microsoft ms-dos programmer's reference - the latter is
only the official programmer's doc for ms-dos 5.]  All C compilers I've
worked with provided library functions for this - check it out.

Someone else has posted how to get the UART spec; you can purchase the
BIOS doc from IBM.

-jen
 Not speaking for microsoft. Just cause I work with msdos doesn't
 mean I'm totally nuts.
 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads