Solved

D3 and serial port under W98/NT

Posted on 1998-09-07
9
325 Views
Last Modified: 2010-04-06
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
Comment
Question by:titz
9 Comments
 

Expert Comment

by:clopez
ID: 1338835
Can you post what are you looking for?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1338836
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
 
LVL 20

Expert Comment

by:Madshi
ID: 1338837
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Expert Comment

by:clopez
ID: 1338838
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
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1338839
whoops.
lopez -

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

Black Death.
0
 
LVL 1

Author Comment

by:titz
ID: 1338840
hi clopez,

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

0
 
LVL 1

Author Comment

by:titz
ID: 1338841
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
 

Accepted Solution

by:
clopez earned 100 total points
ID: 1338842
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
 
LVL 1

Author Comment

by:titz
ID: 1338843
hi clopez,

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

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

837 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