예제 #1
0
Export* CreateSectionExport (unsigned Name, Section* Sec, unsigned long Offs)
/* Create a relative export to a section */
{
    /* Create a new export */
    Export* E = NewExport (EXP_EXPR | EXP_LABEL, Sec->AddrSize, Name, 0);

    /* Assign the value */
    E->Expr = SectionExpr (Sec, Offs, 0);

    /* Insert the export */
    InsertExport (E);

    /* Return the new export */
    return E;
}
예제 #2
0
Export* CreateMemoryExport (unsigned Name, Memory* Mem, unsigned long Offs)
/* Create an relative export for a memory area offset */
{
    /* Create a new export */
    Export* E = NewExport (EXP_EXPR | EXP_LABEL, ADDR_SIZE_ABS, Name, 0);

    /* Assign the value */
    E->Expr = MemoryExpr (Mem, Offs, 0);

    /* Insert the export */
    InsertExport (E);

    /* Return the new export */
    return E;
}
예제 #3
0
Export* CreateConstExport (unsigned Name, long Value)
/* Create an export for a literal date */
{
    /* Create a new export */
    Export* E = NewExport (EXP_CONST | EXP_EQUATE, ADDR_SIZE_ABS, Name, 0);

    /* Assign the value */
    E->Expr = LiteralExpr (Value, 0);

    /* Insert the export */
    InsertExport (E);

    /* Return the new export */
    return E;
}
예제 #4
0
파일: exports.c 프로젝트: Aliandrana/cc65
Export* CreateSegmentExport (unsigned Name, Segment* Seg, unsigned long Offs)
/* Create a relative export to a segment */
{
    /* Create a new export */
    Export* E = NewExport (SYM_EXPR | SYM_LABEL, Seg->AddrSize, Name, 0);

    /* Assign the value */
    E->Expr = SegmentExpr (Seg, Offs, 0);

    /* Insert the export */
    InsertExport (E);

    /* Return the new export */
    return E;
}
예제 #5
0
파일: exports.c 프로젝트: Aliandrana/cc65
Export* CreateExprExport (unsigned Name, ExprNode* Expr, unsigned char AddrSize)
/* Create an export for an expression */
{
    /* Create a new export */
    Export* E = NewExport (SYM_EXPR|SYM_EQUATE, AddrSize, Name, 0);

    /* Assign the value expression */
    E->Expr = Expr;

    /* Insert the export */
    InsertExport (E);

    /* Return the new export */
    return E;
}
예제 #6
0
파일: objdata.c 프로젝트: PanchoManera/cc65
void InsertObjGlobals (ObjData* O)
/* Insert imports and exports from the object file into the global import and
 * export lists.
 */
{
    unsigned I;

    /* Insert exports and imports */
    for (I = 0; I < CollCount (&O->Exports); ++I) {
        InsertExport (CollAt (&O->Exports, I));
    }
    for (I = 0; I < CollCount (&O->Imports); ++I) {
        InsertImport (CollAt (&O->Imports, I));
    }
}