Ramon van Handel wrote:
> > somebody provide me with a function that outputs a DWORD to a port?
> 
> Have a look in, for instance,
> guest/preemptive/include/ioport.h

Whoops those are only byte/word port ops.
Something like this should work (untested):

static inline long inportl(short port)
{
    long ret;
    asm volatile ("inl (%%dx),%%eax":"=a" (ret):"d" (port));
    return ret;
}

static inline void outportl(short port, long value)
{
    asm volatile ("outl %%eax,(%%dx)"::"d" (port), "a" (value));
}

-- Ramon

Reply via email to