• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 342
  • Last Modified:

D3 and serial port under W98/NT

hi,
i have done a nice working program which works with the serial port under W98/NT in D3.
for some tests i need to know the status of (nearly) every pin of the serial port, not only CTS or RTS. These i can get by CLEARCOMMERROR and the COMSTAT-Field.
GETCOMMMODEMSTATUS too is not the right one.
but it should not be in assembler!! i need it in D3 (or D4)!
thanks
titz
0
titz
Asked:
titz
1 Solution
 
clopezCommented:
Can you post what are you looking for?
0
 
viktornetCommented:
Here is some assembler even thought you said not to use assembler...

//Read port
function ReadPortB( wPort : Word ) : Byte;
begin
  asm
    mov dx, wPort
    in al, dx
    mov result, al
   end;
end;

//Write To Port
procedure WritePortB( wPort : Word; bValue : Byte );
begin
  asm
    mov dx, wPort
    mov al, bValue
    out dx, al
  end;
end;

Anyway, I hope you find it useful some how... =)

Regards,
Viktor Ivanov
0
 
MadshiCommented:
viktornet,

nice but doesn't work with winNT... There are little freeware components for NT, but I don't know where you can get them and how their name is.

Regards, Madshi.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
clopezCommented:
I have a comm component that check the Break, CTS, DRS, Error, Ring, Rlsd, RxChar, RxFlag, TxEmpty and its freeware.  Send me an e-mail if you want it.

0
 
BlackDeathCommented:
whoops.
lopez -

would u do me a favour & send it to me, too?
andreas.naguschewski@vt.siemens.de

Black Death.
0
 
titzAuthor Commented:
hi clopez,

my email adress is
peter.helm@t-online.de
send it to me and you will have the points.

0
 
titzAuthor Commented:
hi victornet,

i do not want to use assembler, for it will work now under perhaps WIN95. but i fear, that it will not work under microsofts next system. and it will not work under win nt.
therefore i will use the API.
tnx !
titz

0
 
clopezCommented:
I have sent the file to both of you.

The file name is Async32.zip and you can find it also at DSP:

   http://SunSITE.icm.edu.pl/delphi/

Under Delphi 3/All files

Hope it works.
0
 
titzAuthor Commented:
hi clopez,

thanks for th quick posting of the Conn-Component.
titz

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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