Solved

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

Posted on 1998-04-08
3
839 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

752 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