[Mingw] How to access I/O port with GCC?

Posted on 2004-11-21
Last Modified: 2012-06-21

I use the Dev-C++ as my programming environment. Mingw(GCC) is its default compiler. How to access I/O
port, just like inportb()/outportb() in C? BTW, where
can I find out the GCC/Mingw library reference? Thanks
in advance.

Question by:pommy_lu
    LVL 1

    Expert Comment

    Use winio library

    Get it from


    Author Comment

    Thank you! Does GCC do this with its library?  
    Because Linux can do. Could you tell me how to access I/O port expect GetPortVal()/SetPortVal() in WinIO library?

    Accepted Solution

    PAQed with points refunded (50)

    Community Support Moderator

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
    This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now