www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/02/13:30:32

From: nngodinh AT pcn DOT net (NGO DINH Nhan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: reading/writing to COM ports
Date: Wed, 02 Sep 1998 17:01:55 GMT
Organization: Centro Servizi Interbusiness
Lines: 35
Message-ID: <35ec4a73.10588573@news.pcn.net>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980830183518 DOT 20257w-100000 AT is> <35E9747E DOT B7AEDED7 AT unb DOT ca>
NNTP-Posting-Host: 194.184.70.242
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sun, 30 Aug 1998 12:49:18 -0300, Endlisnis <s257m AT unb DOT ca> wrote:

>	I'm quite sure that won't work, because I have a 'WinModem'.  I've never been
>able to get it to work from DOS.  It doesn't use a standard address (like
>0x110 or something).
I think you should look at the Ralf Brown Interrupt List if you want
to go directly to read ports and get IRQ calls.

If you don't want to handle low-level code, you can modify the default
BIOS settings that says which IO/IRQ a COM Port has.

Ralf Brown Interrupt List says:

=== cut ===
MEM 0040h:0000h - BASE I/O ADDRESS OF FIRST SERIAL I/O PORT
Size:	WORD
Notes:	the BIOS sets this word to zero if is unable to find any
serial ports
	  at the addresses it is programmed to check at boot
	DOS and BIOS serial device numbers may be redefined by
re-assigning
	  these values of the base I/O addresses stored here
=== cut ==

And it means that you can modify the default COM1 port IO addres by
putting in 0040h:0000h the right value. The same thing is for COM2,
COM3 and COM4, that can be modified by putting the right value in the
address 0040h:0002h for COM2, and just add 2 to the offset for the
other 2 ports (DJGPP in flat mode need to have 400h, 402h, 404h,
406h).

bye,
---
NGO DINH Nhan
e-mail: nngodinh AT pcn DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019