Searching \ for 'No PICLIST topic : RS232 -Reply' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'No PICLIST topic : RS232 -Reply'.

Truncated match.
PICList Thread
'No PICLIST topic : RS232 -Reply'
1997\07\11@105105 by ang (Chee Foon Tiang)

Check out the int bioscom() function under bios.h
This function makes use of the BIOS serial comm routines.

So do take care of your DTR, DSR, CTS, RTS handshaking lines as some
BIOS automatically uses them and some don't, best is to wire DTR to DSR
and CTS to RTS, otherwise you have to handle the handshaking.

Alternatively, you can use the int86() function to directly call the
BIOS routine... can't remember which interrupt but if you want I can
check it up in my "PC Programmer's Sourcebook" by Microsoft Press.
Highly recommended a few years ago when people still programs for DOS
and Win16.

Peter Tiang
Design Engineer

Example attached:

#include <bios.h>
#include <conio.h>
#include <dos.h>

#define DTR        0x01
#define RTS        0x02
#define COM1PORT   0x0000
#define COM2PORT   0x0002
#define COM1       0
#define COM2       1
#define DATA_READY 0x100
#define FALSE      0
#define TRUE       !FALSE

#define SETTINGS   ( 0xE0 | 0x00 | 0x02 | 0x00)  // 9600,N,7,1

int main(void)
   int  in, out, status, DONE = FALSE;

   far *RS232_ADDR;

   RS232_ADDR = MK_FP( 0x0040, COM1PORT );

   if( !*RS232_ADDR )
       return -1;

   bioscom( 0, SETTINGS, COM1 );
   cprintf("... BIOSCOM [ESC] to exit ...\n");

   while( !DONE )
       outportb( *RS232_ADDR + 4, DTR | RTS );
       status = bioscom( 3, 0, COM1 );
       if( status & DATA_READY )
            if( (out = bioscom( 2, 0, COM1) & 0x7F) != 0 )
       if( kbhit() )
            if( (in = getch()) == '\x1B' )
                 DONE = TRUE;
                 bioscom( 1, in, COM1 );
   return 0;

>>> Alboni Giorgio <.....rac1337KILLspamspam@spam@PROVINCIA.RA.IT> 10/July/1997 07:59pm >>>
>I made a pic circuit whit a RS232 and it work fine. I have only a problem: I
>able to make a Visual C++
>program under windows 95, using the win32 api for RS232, but i NOT able to
>do the same under DOS whit
>the Borlanc C++ 3.1 A&F. There is some one that's can help me whit C or C++
>ruotine for use RS232 under DOS?
>Thanks in Advance,
>Alboni Giorgio.

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...