Exemplo n.º 1
0
void    EndFmt( void ) {
//================

// Finish format processing.

    obj_ptr     fmt_ptr;
    unsigned_16 fmt_len;

    fmt_len = ObjOffset( FormatList ) - sizeof( unsigned_16 );
    fmt_ptr = ObjSeek( FormatList );
    OutU16( fmt_len );
    ObjSeek( fmt_ptr );
}
Exemplo n.º 2
0
void    GBegDList( void ) {
//===================

// Start list of data.

    unsigned_16 const_offset;
    obj_ptr     curr_obj;

    const_offset = ObjOffset( DtConstList );
    curr_obj = ObjSeek( DtConstList );
    OutU16( const_offset );
    ObjSeek( curr_obj );
}
Exemplo n.º 3
0
void    GCheckEOF( label_id label ) {
//===================================

// Patch the label emitted by GNullEofStmt() to be the label at the end
// of the code of the ATEND statement.

    obj_ptr     curr_obj;

    curr_obj = ObjSeek( AtEndFCode );
    EmitOp( FC_SET_ATEND );
    OutU16( label );
    ObjSeek( curr_obj );
}
Exemplo n.º 4
0
void    GBegCall( itnode *itptr ) {
//=================================

// Initialize for subprogram invocation.

    sym_id      sp;
    obj_ptr     curr_obj;
    int         num_args;

    sp = itptr->sym_ptr;
#if _CPU == 386
    {
        aux_info    *aux;
        aux = AuxLookupName( sp->u.ns.name, sp->u.ns.u2.name_len );
        if( aux != NULL ) {
            if( aux->cclass & FAR16_CALL ) {
                if( (SubProgId->u.ns.flags & SY_SUBPROG_TYPE) == SY_PROGRAM ) {
                    ProgramInfo.cclass |= THUNK_PROLOG;
                } else {
                    aux = AuxLookupAdd( SubProgId->u.ns.name, SubProgId->u.ns.u2.name_len );
                    aux->cclass |= THUNK_PROLOG;
                }
            }
        }
    }
#endif
    EmitOp( FC_CALL );
    OutPtr( itptr->sym_ptr );
    curr_obj = ObjTell();
    OutU16( 0 );
    if( (Options & OPT_DESCRIPTOR) == 0 ) {
        if( (sp->u.ns.flags & SY_SUBPROG_TYPE) == SY_FUNCTION ) {
            if( (sp->u.ns.flags & SY_INTRINSIC) == 0 ) {
                if( sp->u.ns.u1.s.typ == FT_CHAR ) {
                    OutPtr( GTempString( sp->u.ns.xt.size ) );
                }
            }
        }
    }
    num_args = DumpArgInfo( itptr->list );
    curr_obj = ObjSeek( curr_obj );
    OutU16( num_args );
    ObjSeek( curr_obj );
    if( (sp->u.ns.flags & SY_SUBPROG_TYPE) == SY_FUNCTION ) {
        if( sp->u.ns.u1.s.typ == FT_CHAR ) {
            if( (Options & OPT_DESCRIPTOR) || (sp->u.ns.flags & SY_INTRINSIC) ) {
                OutPtr( GTempString( sp->u.ns.xt.size ) );
            }
        }
    }
}
Exemplo n.º 5
0
void            GEndSList( sym_id sym ) {
//=======================================

// Finish off ADV initialization.

    unsigned_16 warp_size;

    sym = sym;
    EmitOp( FC_WARP_RETURN );
    warp_size = ObjOffset( WarpLabel ) - sizeof( unsigned_16 );
    WarpLabel = ObjSeek( WarpLabel );
    OutU16( warp_size );
    ObjSeek( WarpLabel );
}