Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now