コード例 #1
0
ファイル: dbgcv.c プロジェクト: JWasm/JWlink
static void SwapRelocs( virt_mem a, virt_mem b )
/**********************************************/
{
    unsigned    diffa;
    unsigned    diffb;
    unsigned_16 a16;
    unsigned_16 b16;
    unsigned_32 a32;
    unsigned_32 b32;

    GET32INFO( a, a32 );
    GET32INFO( b, b32 );
    PUT32INFO( a, b32 );
    PUT32INFO( b, a32 );
    diffa = ( a - LineInfo.offbase ) / sizeof( unsigned_32 );
    diffa *= sizeof( unsigned_16 );
    diffa += LineInfo.numbase;
    diffb = ( b - LineInfo.offbase ) / sizeof( unsigned_32 );
    diffb *= sizeof( unsigned_16 );
    diffb += LineInfo.numbase;
    GET16INFO( diffa, a16 );
    GET16INFO( diffb, b16 );
    PUT16INFO( diffa, b16 );
    PUT16INFO( diffb, a16 );
}
コード例 #2
0
static void SwapRelocs( virt_mem a, virt_mem b )
/**********************************************/
{
    virt_mem    diffa;
    virt_mem    diffb;
    unsigned_16 a16;
    unsigned_16 b16;
    unsigned_32 a32;
    unsigned_32 b32;

    GET32INFO( a, a32 );
    GET32INFO( b, b32 );
    PUT32INFO( a, b32 );
    PUT32INFO( b, a32 );
    diffa = LineInfo.numbase + ( unsigned_32 )( ( ( a - LineInfo.offbase ) / sizeof( unsigned_32 ) ) * sizeof( unsigned_16 ) );
    diffb = LineInfo.numbase + ( unsigned_32 )( ( ( b - LineInfo.offbase ) / sizeof( unsigned_32 ) ) * sizeof( unsigned_16 ) );
    GET16INFO( diffa, a16 );
    GET16INFO( diffb, b16 );
    PUT16INFO( diffa, b16 );
    PUT16INFO( diffb, a16 );
}