Accessing ports

Discussion in 'C Programming' started by kajdan, Aug 4, 2012.

  1. kajdan

    kajdan Guest

    Hello

    I am using the free Borland compiler.

    However I cannot find how to access I/O ports. For some reason, pin and
    pout are not available. How can I achieve this?

    I also tried with inline assembler, but the compiler doesn't support it
    (no tasm32.exe).

    Is there another other free MS-DOS based compiler that will do this?

    Thanks
    kajdan, Aug 4, 2012
    #1
    1. Advertising

  2. kajdan <> writes:
    > I am using the free Borland compiler.
    >
    > However I cannot find how to access I/O ports. For some reason, pin and
    > pout are not available. How can I achieve this?
    >
    > I also tried with inline assembler, but the compiler doesn't support it
    > (no tasm32.exe).
    >
    > Is there another other free MS-DOS based compiler that will do this?


    You're likely to get better answers in another newsgroup, perhaps
    comp.os.msdos.programmer.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Will write code for food.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Aug 5, 2012
    #2
    1. Advertising

  3. kajdan wrote:
    > Hello
    >
    > I am using the free Borland compiler.
    >
    > However I cannot find how to access I/O ports. For some reason, pin and
    > pout are not available. How can I achieve this?


    Wasn't it inp/outp or inb/outb or something? Possible different
    functions for different word lengths also..
    Johann Klammer, Aug 5, 2012
    #3
  4. kajdan

    Angel Guest

    On 2012-08-05, Johann Klammer <1.net> wrote:
    > kajdan wrote:
    >> Hello
    >>
    >> I am using the free Borland compiler.
    >>
    >> However I cannot find how to access I/O ports. For some reason, pin and
    >> pout are not available. How can I achieve this?

    >
    > Wasn't it inp/outp or inb/outb or something? Possible different
    > functions for different word lengths also..


    inb/outb and inw/outw on Linux/x86, among others for various bitlengths.
    But there doesn't seem to be any sort of standard for it so it probably
    varies by OS, by hardware and by compiler suite.


    --
    "C provides a programmer with more than enough rope to hang himself.
    C++ provides a firing squad, blindfold and last cigarette."
    - seen in comp.lang.c
    Angel, Aug 5, 2012
    #4
  5. kajdan

    Paul N Guest

    On Aug 4, 10:22 pm, kajdan <> wrote:
    > Hello
    >
    > I am using the free Borland compiler.
    >
    > However I cannot find how to access I/O ports. For some reason, pin and
    > pout are not available. How can I achieve this?
    >
    > I also tried with inline assembler, but the compiler doesn't support it
    > (no tasm32.exe).
    >
    > Is there another other free MS-DOS based compiler that will do this?
    >
    > Thanks


    In Turbo C++ (a compiler by Borland which includes a C compiler) there
    are inp, inport, inportb, outp, outport and outportb. Your compiler
    may have some or all of these.

    Failing that, try comp.os.msdos.programmer as Keith has suggested.
    Paul N, Aug 5, 2012
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mario Trams

    Re: unused input ports

    Mario Trams, Jul 22, 2003, in forum: VHDL
    Replies:
    0
    Views:
    1,102
    Mario Trams
    Jul 22, 2003
  2. Bob

    Re: unused input ports

    Bob, Jul 22, 2003, in forum: VHDL
    Replies:
    1
    Views:
    1,672
    Mario Trams
    Jul 22, 2003
  3. Oraklet på første

    Accessing COM ports in Win32

    Oraklet på første, Nov 3, 2004, in forum: C++
    Replies:
    2
    Views:
    297
    Mike Wahler
    Nov 4, 2004
  4. rookie
    Replies:
    2
    Views:
    371
    Ian Collins
    Mar 29, 2006
  5. mreister
    Replies:
    1
    Views:
    3,155
    mreister
    May 25, 2010
Loading...

Share This Page