static void do_init_stuff( char **cmdline ) /*****************************************/ { char *env; char buff[80]; if( !MsgInit() ) exit(1); AsmInit( -1, -1, -1, -1 ); // initialize hash table strcpy( buff, "__WASM__=" BANSTR( _BANVER ) ); add_constant( buff ); ForceInclude = getenv( "FORCE" ); do_envvar_cmdline( "WASM" ); parse_cmdline( cmdline ); set_build_target(); get_os_include(); env = getenv( "INCLUDE" ); if( env != NULL ) AddStringToIncludePath( env ); if( !Options.quiet && !Options.banner_printed ) { Options.banner_printed = TRUE; trademark(); } open_files(); PushLineQueue(); AsmLookup( "$" ); // create "$" symbol for current segment counter }
CurrSeg->seg->e.seginfo->length = CurrSeg->seg->e.seginfo->current_loc; } return( NOT_ERROR ); } int OrgDirective( int i ) /***********************/ { struct asm_sym *sym; int_32 value = 0; if( AsmBuffer[i+1]->class == TC_NUM ) { return( ChangeCurrentLocation( FALSE, AsmBuffer[i+1]->u.value, FALSE ) ); } else if( AsmBuffer[i+1]->class == TC_ID ) { sym = AsmLookup( AsmBuffer[i+1]->string_ptr ); if( AsmBuffer[i+2]->class == TC_OP_SQ_BRACKET && AsmBuffer[i+3]->class == TC_NUM ) { value = AsmBuffer[i+3]->u.value; } return( ChangeCurrentLocation( FALSE, sym->offset + value, FALSE ) ); } AsmError( EXPECTING_NUMBER ); return( ERROR ); } static void fill_in_objfile_space( uint size ) /********************************************/ { int i; int nop_type;