Thread: DOS network..

  1. #1
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92

    DOS network..

    I want to design a chat program over a LAN in DOS operating system;but i am at dead end i even don't know how to start .
    any suggestions?
    i have quite fluent with borland c ver 3.0.
    AbHHinaay

  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    does it have to be DOS?
    winsock would be better to use

  3. #3
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92
    no i does the following code but it doen't work .what will be the problem.

    the code is
    Code:
    Hardware interaction will always take place through ports. Port I/O is not limited to functions such as inportb( ), outportb( ) etc. In this article we will see how two computers can communicate via the Serial/COM port. 
    
    The Serial/COM port is a 9/25-pin port connector at the back of a computer. 9-pin mail connectors are more common. All COM ports are mail connectors. If the connector is 25-pin and a female, it is an LPT port and not a COM port. The type of connector will not affect the performance of the port. 
    
    A serial port is so named because it transmits data serially i.e. one bit at a time. So even if there are 9/25-pins on the connector, only 3 are of importance to us. The other are either left open. Some are loped back. Looping back is something like fooling the computer to believe that it is actually connected to some serial device like a modem.
    
    The serial port is commonly used by software developers to connect two computers for testing new software. One computer runs the software while the other records the information sent by the software. This method, often known as debugging helps the developers find errors in their program. The cable used for connecting the two computers is known as Null Modem cable, debug-cable, COM port to COM Port cable or simply serial cable. We will us this cable for our program. Our program will display whatever is typed on one computer on the other computer. 
    
    The software, is actually two different programs running on two different machines. The two machines are connected through the serial cable. Select one machine as the server and other as the client. The server will be used to type whereas the client will show whatever is typed. Any machine can be made the server or client. 
    
    The client side program:
    
    /* client.c */
    #include <bios.h>
    main( )
    {
    
    int out, status ;
    bioscom ( 0, 0x80 | 0x02 | 0x00, 0 ) ;
    while ( ! kbhit( ) )
    {
    
    status = bioscom ( 3, 0, 0 ) ;
    if (status & 0x100 )
    {
    
    out = bioscom ( 2, 0, 0 ) & 0x007F ;  /* to check the 7 bit data for error condition */
    if ( out != 0 )
    
    putch ( out ) ;
    
    }
    
    bioscom ( 1, 0, 0 ) ;
    
    }
    
    }
    
    
    
    The server side program:
    
    
    
    /* server.c*/
    #include <bios.h>
    main( )
    {
    
    int in, status ;
    bioscom ( 0, 0x80 | 0x02 | 0x00, 0 ) ;
    
    while ( ( in = getch( ) != 27 )
    {
    
    status = bioscom ( 3, 0, 0 ) ;
    if ( status & 0x100 )
    
    {
    
    bioscom ( 2, 0, 0 ) ;
    bioscom ( 1, in, 0 ) ;
    
    }
    
    }
    AbHHinaay

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Network File Copy in DR DOS
    By daron in forum C Programming
    Replies: 3
    Last Post: 09-30-2005, 01:49 AM
  2. Network program for dos through c
    By planet_abhi in forum Networking/Device Communication
    Replies: 3
    Last Post: 05-23-2004, 10:12 AM
  3. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 09:08 PM
  4. real mode dos & win dos
    By scott27349 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 08-19-2002, 06:15 AM
  5. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 01:42 PM