Solved

How to set DTR & RTS  for a Modem using INT 14h

Posted on 1998-04-08
3
844 Views
Last Modified: 2013-12-03
I wrote a program for COM port communication using Assembly.
I could initialize COM port, send and receive data by calling BIOS's INT 14h. Howerver, I have to change RTS and
DTR bit in my program. Does int 14 support this operation?
How to implemente this? Do I have to write assembly code
for 8250 Controller?
0
Comment
Question by:hbh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Accepted Solution

by:
eek105 earned 100 total points
ID: 1412630
In general, there is no bios function.  PS/2 function 5 would do what you want.  It is just an io port, so's all you have to do is
read in the value of the modem control register(base + 4) and then set bit 1 for RTS and set bit 0 for DTR.  
You can read the bios area for the base addresses or trust that the following is correct:
#ifdef COM1
#define SERIAL_OUT 0x3f8
#define SERIAL_IN 0x3f8
#define SERIAL_STATUS 0x3fd

#define FIFO_CONTROL 0x3fa
#define LINE_CONTROL 0x3fb
#define MODEM_CONTROL 0x3fc
#define LINE_STATUS 0x3fd
#define MODEM_STATUS 0x3fe
#define BAUD_LOW 0x3f8
#define BAUD_HIGH 0x3f9
#define INT_ENABLE 0x3f9
#endif
               
#ifdef COM2
#define SERIAL_OUT 0x2f8
#define SERIAL_IN 0x2f8
#define SERIAL_STATUS 0x2fd

#define FIFO_CONTROL 0x2fa
#define LINE_CONTROL 0x2fb
#define MODEM_CONTROL 0x2fc
#define LINE_STATUS 0x2fd
#define MODEM_STATUS 0x2fe
#define BAUD_LOW 0x2f8
#define BAUD_HIGH 0x2f9
#define INT_ENABLE 0x2f9
#endif        
0
 

Author Comment

by:hbh
ID: 1412631
I know these addresses, my question is:
Can I write an assembly code to make some OUT or IN operation
to these ports together with calling BIOS interrupt (INT 14h)?

0
 

Expert Comment

by:eek105
ID: 1412632
ok, so i left out one step above
It is just an io port, so's all you have to do is
       read in the value of the modem control register(base + 4) and then set bit 1 for RTS and set bit 0 for DTR, then write the result back to the modem control register.  No bios call.
If you are doing this under windows this will do you no good at all, you have to use the operating system API.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question