Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

send and recieve info over a com port

Posted on 1998-08-31
3
Medium Priority
?
189 Views
Last Modified: 2010-04-04
I am looking for C++ (or dos)source code to send and receive info over a com port. How do I acces and turn on the com port and set the baud rate? Specifically on an HP200lx palmtop computer. I am trying to download information to the palmtop, the program is very low level and the dos interupt is not working. It is intended for a CMT datalogger but I am trying to adapt it to the HP, and it needs the COM port address.

Thanks,
Antonio Llanos  
0
Comment
Question by:llanos
3 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1338262
I'm not sure if this is what you are looking for but still....i hope it's a bit helpful
To read a port...
//This is assembler for Delphi
function ReadPortB( wPort : Word ) : Byte;
begin
  asm
    mov dx, wPort
    in al, dx
    mov result, al
   end;
end;
//To write to a Port
//This one is assembler for Delphi too..I mean the function is implemented with Delphi code
procedure WritePortB( wPort : Word; bValue : Byte );
begin
  asm
    mov dx, wPort
    mov al, bValue
    out dx, al
  end;
end;

Hope this helps ;-)

Regards,
Viktor Ivanov
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 300 total points
ID: 1338263
If you want C++, or dos source then you're in the wrong place, this is Delphi place!!

But if you want source : here is a very good component, freeware, with source :

http://www.torry.ru/vcl/comms/cd320108.zip

and another :

http://www.torry.ru/vcl/comms/async32.zip

regards, Zif.
0
 

Author Comment

by:llanos
ID: 1338264
Thanks, I will check the URLs, I am really looking for something in C++ but that was my
mistake for posting on the Delphi area, I am new at this.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

773 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