Thread: COM1 and COM2 ports writing

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    COM1 and COM2 ports writing

    How can I in C, write to the COM1/2 ports?
    Is there a function? or something?

    Can I do it with _outp(), if so, what is the address of the COM1 and COM2 ports?

    Thanks.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    I'm using the Borland 5.5 C++ compiler, and the win98/2000/XP OS.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Thanks.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    I know ms-dos used some special filenames like lpt1 as fake filenames for printers. How involved was that? Was that just a ms-dos shell thing?

  5. #5
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    Its because its treated as a file, lpt1 and the COM ports
    Monday - what a way to spend a seventh of your life

  6. #6
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    www.robbayer.com has a "tutorial" on connecting to serial ports (connecting to COM1, etc... works with this).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM