Solved

send and recieve info over a com port

Posted on 1998-08-31
3
182 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 100 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

803 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