Solved

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

Posted on 1998-04-08
3
823 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

6 Experts available now in Live!

Get 1:1 Help Now