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. Advertisements

  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. Advertisements

  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. Advertisements

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. Bob

    Re: unused input ports

    Bob, Jul 22, 2003, in forum: VHDL
    Replies:
    1
    Views:
    1,817
    Mario Trams
    Jul 22, 2003
  2. Marek Ponca

    Initial value on ports

    Marek Ponca, Aug 8, 2003, in forum: VHDL
    Replies:
    0
    Views:
    2,874
    Marek Ponca
    Aug 8, 2003
  3. Valentin Tihomirov

    using buffer mode ports

    Valentin Tihomirov, Nov 8, 2003, in forum: VHDL
    Replies:
    10
    Views:
    1,396
    Paul Uiterlinden
    Nov 10, 2003
  4. Anand P Paralkar

    Buffer Mode Ports

    Anand P Paralkar, Nov 24, 2003, in forum: VHDL
    Replies:
    1
    Views:
    701
    Mike Treseler
    Nov 24, 2003
  5. Marius Vollmer
    Replies:
    6
    Views:
    1,033
    Jim Lewis
    Dec 10, 2003
  6. Oraklet på første

    Accessing COM ports in Win32

    Oraklet på første, Nov 3, 2004, in forum: C++
    Replies:
    2
    Views:
    356
    Mike Wahler
    Nov 4, 2004
  7. rookie
    Replies:
    2
    Views:
    441
    Ian Collins
    Mar 29, 2006
  8. mreister
    Replies:
    1
    Views:
    4,835
    mreister
    May 25, 2010
Loading...