object.c
/*
 *  emitLiterals - emit literals into the literals section
 */
emit literals into the literals section
emit literals into the literals section
void emitLiterals(Module *module) {
    Literal *literal;
    Section *section;
    u16 savedListControl;
    Token *str;
    Value val;
    savedListControl = currentListControl;
    section = module->firstSection->next; 
    currentListControl = 0; 
    for (literal = module->literals; literal != NULL; literal = literal->next) {
        forceWordBoundary(section);
        literal->offset = section->locationCounter;
        if (literal->expression->type == TokenType_String) {
            emitString(section, literal->expression->details.string.ptr, literal->expression->details.string.len,
                       literal->expression->details.string.count, literal->expression->details.string.justification);
        }
        else {
            (void)evaluateExpression(literal->expression, &val);
            emitFieldStart(section);
            emitFieldBits(section, &val, 64, FALSE);
            emitFieldEnd(section);
        }
    }
    currentListControl = savedListControl;
}
void emitLiterals ( Module * module ) { Literal * literal ; Section * section ; u16 savedListControl ; Token * str ; Value val ; savedListControl = currentListControl ; section = module -> firstSection -> next ; currentListControl = 0 ; for ( literal = module -> literals ; literal != NULL ; literal = literal -> next ) { forceWordBoundary ( section ) ; literal -> offset = section -> locationCounter ; if ( literal -> expression -> type == TokenType_String ) { emitString ( section , literal -> expression -> details . string . ptr , literal -> expression -> details . string . len , literal -> expression -> details . string . count , literal -> expression -> details . string . justification ) ; } else { ( void ) evaluateExpression ( literal -> expression , & val ) ; emitFieldStart ( section ) ; emitFieldBits ( section , & val , 64 , FALSE ) ; emitFieldEnd ( section ) ; } } currentListControl = savedListControl ; }
emitLiterals - emit literals into the literals section
emitLiterals - emit literals into the literals section
// Literals section is always 2nd in module // suppress listing completely