示例#1
0
trap_retval ReqRead_io( void )
{
    read_io_req *acc;
    void        *ret;

    acc = GetInPtr(0);
    ret = GetOutPtr(0);
    if( acc->len == 1 ) {
        *( (byte *)ret ) = In_b( acc->IO_offset );
    } else if( acc->len == 2 ) {
        *( (word *)ret ) = In_w( acc->IO_offset );
    } else {
        *( (dword *)ret ) = In_d( acc->IO_offset );
    }
    return( acc->len );
}
示例#2
0
unsigned ReqRead_io()
{
    read_io_req         *acc;
    void                *data;

    acc = GetInPtr(0);
    data = GetOutPtr(0);
    if( acc->len == 1 ) {
        *( (byte *)data ) = In_b( acc->IO_offset );
    } else if( acc->len == 2 ) {
        *( (word *)data ) = In_w( acc->IO_offset );
    } else {
        *( (dword *)data ) = In_d( acc->IO_offset );
    }
    return( acc->len );
}
示例#3
0
trap_retval ReqRead_io( void )
/*************************/
{
    read_io_req         *acc;
    void                *data;

    acc = GetInPtr(0);
    data = GetOutPtr(0);
    if( acc->len == 1 ) {
        *(byte *)data = In_b( acc->IO_offset );
    } else if( acc->len == 2 ) {
        *(word *)data = In_w( acc->IO_offset );
    } else {
        *(dword *)data = In_d( acc->IO_offset );
    }
    return( acc->len );
}
示例#4
0
trap_retval ReqRead_io( void )
{
    read_io_req     *acc;
    void            *data;
    trap_elen       len;

    acc = GetInPtr(0);
    data = GetOutPtr(0);
    if( acc->len == 1 ) {
       *( (byte __far *)data ) = In_b( acc->IO_offset );
       len = 1;
    } else if( acc->len == 2 ) {
       *( (word __far *)data ) = In_w( acc->IO_offset );
       len = 2;
    } else if( Flags.Is386 ) {
       *( (dword __far *)data ) = In_d( acc->IO_offset );
       len = 4;
    } else {
       len = 0;
    }
    return( len );
}