Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

Accessinf the Serial Ports from a Console program

I am currently developing a DOS program to test modems. I need some sample code to enable myself to better deelop this program.
0
WayneESS
Asked:
WayneESS
  • 3
  • 2
1 Solution
 
WayneESSAuthor Commented:
Adjusted points to 200
0
 
kjtengCommented:
Your question is too general. Could you be more specific on the problem you faced. Are you looking for third party component?
Are you using delphi 1, 2 or 3?
0
 
WayneESSAuthor Commented:
Well I am using Delphi 3 and I am just looking for some example code fragments to give me an idea how to access the SERIAL PORTS FROM DOS...
0
 
kjtengCommented:
The following is a simple example from Lloyd's help file:

program PortAccess;

var
  port: TextFile;
  x: char;

begin
  Assign(port, 'COM2');
  Rewrite(port);
  write(port, 'AS5', #13);
  { sample uses:
  read(port, x);
  write(port, x);
  }
  close(port);
end.


0
 
WayneESSAuthor Commented:
Thanks I think it is what I am looking for, I have not tested the Idea as of this time.  I will do some work on the project later today. I will try to let you know how it works...  
Wayne Stevens (Owner ESS)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now