亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nasm.c

?? nasm匯編編譯器源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* The Netwide Assembler main program module
 *
 * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
 * Julian Hall. All rights reserved. The software is
 * redistributable under the licence given in the file "Licence"
 * distributed in the NASM archive.
 */

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#include "nasm.h"
#include "nasmlib.h"
#include "insns.h"
#include "preproc.h"
#include "parser.h"
#include "eval.h"
#include "assemble.h"
#include "labels.h"
#include "outform.h"
#include "listing.h"

struct forwrefinfo {		       /* info held on forward refs. */
    int lineno;
    int operand;
};

static int get_bits (char *value);
static unsigned long get_cpu (char *cpu_str);
static void parse_cmdline (int, char **);
static void assemble_file (char *);
static int getkw (char **directive, char **value);
static void register_output_formats(void);
static void report_error_gnu (int severity, const char *fmt, ...);
static void report_error_vc (int severity, const char *fmt, ...);
static void report_error_common (int severity, const char *fmt, va_list args);
static int is_suppressed_warning (int severity);
static void usage(void);
static efunc report_error;

static int using_debug_info, opt_verbose_info;
int	   tasm_compatible_mode = FALSE;
int pass0;

static char inname[FILENAME_MAX];
static char outname[FILENAME_MAX];
static char listname[FILENAME_MAX];
static int globallineno;	       /* for forward-reference tracking */
/* static int pass = 0; */
static struct ofmt *ofmt = NULL;

static FILE *error_file;	       /* Where to write error messages */

static FILE *ofile = NULL;
int optimizing = -1;		/* number of optimization passes to take */
static int sb, cmd_sb = 16;		       /* by default */
static unsigned long cmd_cpu = IF_PLEVEL;	/* highest level by default */
static unsigned long cpu = IF_PLEVEL;		/* passed to insn_size & assemble.c */
int global_offset_changed;             /* referenced in labels.c */

static loc_t location;
int in_abs_seg;			/* Flag we are in ABSOLUTE seg */
long abs_seg;			/* ABSOLUTE segment basis */
long abs_offset;		/* ABSOLUTE offset */

static struct RAA *offsets;

static struct SAA *forwrefs;	       /* keep track of forward references */
static struct forwrefinfo *forwref;

static Preproc *preproc;
enum op_type {
  op_normal,			/* Preprocess and assemble */
  op_preprocess,		/* Preprocess only */
  op_depend			/* Generate dependencies */
};
static enum op_type operating_mode;

/*
 * Which of the suppressible warnings are suppressed. Entry zero
 * doesn't do anything. Initial defaults are given here.
 */
static char suppressed[1+ERR_WARN_MAX] = {
  0, TRUE, TRUE, TRUE, FALSE, TRUE
};

/*
 * The option names for the suppressible warnings. As before, entry
 * zero does nothing.
 */
static const char *suppressed_names[1+ERR_WARN_MAX] = {
    NULL, "macro-params", "macro-selfref", "orphan-labels", "number-overflow",
    "gnu-elf-extensions"
};

/*
 * The explanations for the suppressible warnings. As before, entry
 * zero does nothing.
 */
static const char *suppressed_what[1+ERR_WARN_MAX] = {
    NULL,
    "macro calls with wrong no. of params",
    "cyclic macro self-references",
    "labels alone on lines without trailing `:'",
    "numeric constants greater than 0xFFFFFFFF",
    "using 8- or 16-bit relocation in ELF, a GNU extension"
};

/*
 * This is a null preprocessor which just copies lines from input
 * to output. It's used when someone explicitly requests that NASM
 * not preprocess their source file.
 */

static void no_pp_reset (char *, int, efunc, evalfunc, ListGen *);
static char *no_pp_getline (void);
static void no_pp_cleanup (int);
static Preproc no_pp = {
    no_pp_reset,
    no_pp_getline,
    no_pp_cleanup
};

/*
 * get/set current offset...
 */
#define GET_CURR_OFFS (in_abs_seg?abs_offset:\
		      raa_read(offsets,location.segment))
#define SET_CURR_OFFS(x) (in_abs_seg?(void)(abs_offset=(x)):\
			 (void)(offsets=raa_write(offsets,location.segment,(x))))

static int want_usage;
static int terminate_after_phase;
int user_nolist = 0;             /* fbk 9/2/00 */

static void nasm_fputs(const char *line, FILE *outfile)
{
    if (outfile) {
	fputs(line, outfile);
	fputc('\n', outfile);
    } else
	puts(line);
}

int main(int argc, char **argv)
{
    pass0 = 1;
    want_usage = terminate_after_phase = FALSE;
    report_error = report_error_gnu;

    nasm_set_malloc_error (report_error);
    offsets = raa_init();
    forwrefs = saa_init ((long)sizeof(struct forwrefinfo));

    preproc = &nasmpp;
    operating_mode = op_normal;

    error_file = stderr;

    seg_init();

    register_output_formats();

    parse_cmdline(argc, argv);

    if (terminate_after_phase)
    {
	if (want_usage)
	    usage();
	return 1;
    }

    /* If debugging info is disabled, suppress any debug calls */
    if (!using_debug_info)
        ofmt->current_dfmt = &null_debug_form;

    if (ofmt->stdmac)
	pp_extra_stdmac (ofmt->stdmac);
    parser_global_info (ofmt, &location);
    eval_global_info (ofmt, lookup_label, &location);

    /* define some macros dependent of command-line */
    {
	char temp [64];
	sprintf (temp, "__OUTPUT_FORMAT__=%s\n", ofmt->shortname);
	pp_pre_define (temp);
    }

    switch ( operating_mode ) {
    case op_depend:
      {
	char *line;
	preproc->reset (inname, 0, report_error, evaluate, &nasmlist);
	if (outname[0] == '\0')
	  ofmt->filename (inname, outname, report_error);
	ofile = NULL;
	fprintf(stdout, "%s: %s", outname, inname);
	while ( (line = preproc->getline()) )
	  nasm_free (line);
	preproc->cleanup(0);
	putc('\n', stdout);
      }
    break;

    case op_preprocess:
    {
      char *line;
      char *file_name = NULL;
      long  prior_linnum=0;
      int   lineinc=0;

      if (*outname) {
	ofile = fopen(outname, "w");
	if (!ofile)
	  report_error (ERR_FATAL | ERR_NOFILE,
			"unable to open output file `%s'", outname);
      } else
	ofile = NULL;

      location.known = FALSE;

/*      pass = 1; */
      preproc->reset (inname, 2, report_error, evaluate, &nasmlist);
      while ( (line = preproc->getline()) ) {
	/*
	 * We generate %line directives if needed for later programs
	 */
	long linnum = prior_linnum += lineinc;
	int  altline = src_get(&linnum, &file_name);
	if (altline) {
	  if (altline==1 && lineinc==1)
	    nasm_fputs("", ofile);
	  else {
	    lineinc = (altline != -1 || lineinc!=1);
	    fprintf(ofile ? ofile : stdout, "%%line %ld+%d %s\n",
		    linnum, lineinc, file_name);
	  }
	  prior_linnum = linnum;
	}
	nasm_fputs(line, ofile);
	nasm_free (line);
      }
      nasm_free(file_name);
      preproc->cleanup(0);
      if (ofile)
	fclose(ofile);
      if (ofile && terminate_after_phase)
	remove(outname);
    }
    break;

    case op_normal:
      {
	/*
	 * We must call ofmt->filename _anyway_, even if the user
	 * has specified their own output file, because some
	 * formats (eg OBJ and COFF) use ofmt->filename to find out
	 * the name of the input file and then put that inside the
	 * file.
	 */
	ofmt->filename (inname, outname, report_error);
	
	ofile = fopen(outname, "wb");
	if (!ofile) {
	  report_error (ERR_FATAL | ERR_NOFILE,
			"unable to open output file `%s'", outname);
	}
	
	/*
	 * We must call init_labels() before ofmt->init() since
	 * some object formats will want to define labels in their
	 * init routines. (eg OS/2 defines the FLAT group)
	 */
	init_labels ();
	
	ofmt->init (ofile, report_error, define_label, evaluate);
	
	assemble_file (inname);
	
        if (!terminate_after_phase) {
	  ofmt->cleanup (using_debug_info);
	  cleanup_labels ();
	    } else {
	  /*
	   * We had an fclose on the output file here, but we
	   * actually do that in all the object file drivers as well,
	   * so we're leaving out the one here.
	   *     fclose (ofile);
	   */
	  remove(outname);
          if (listname[0])
             remove(listname);
	}
      }
    break;
    }

    if (want_usage)
      usage();

    raa_free (offsets);
    saa_free (forwrefs);
    eval_cleanup ();
    nasmlib_cleanup ();

    if (terminate_after_phase)
	return 1;
    else
	return 0;
}


/*
 * Get a parameter for a command line option.
 * First arg must be in the form of e.g. -f...
 */
static char *get_param (char *p, char *q, int *advance)
{
    *advance = 0;
    if (p[2])  		       /* the parameter's in the option */
    {
	p += 2;
	while (isspace(*p))
	    p++;
	return p;
    }
    if (q && q[0])
    {
	*advance = 1;
	return q;
    }
    report_error (ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
		  "option `-%c' requires an argument",
		  p[1]);
    return NULL;
}

struct textargs
{
	const char *label;
	int value;
};

#define OPT_PREFIX 0
#define OPT_POSTFIX 1
struct textargs textopts[] =
{
	{"prefix",OPT_PREFIX},
	{"postfix",OPT_POSTFIX},
	{NULL,0}
};


int stopoptions = 0;
static int process_arg (char *p, char *q)
{
    char *param;
    int  i, advance = 0;

    if (!p || !p[0])
	return 0;

    if (p[0]=='-' && ! stopoptions)
    {
	switch (p[1]) {
	  case 's':
	      error_file = stdout;
	      break;
	  case 'o':		       /* these parameters take values */
	  case 'O':
	  case 'f':
	  case 'p':
          case 'P':
	  case 'd':
	  case 'D':
	  case 'i':
          case 'I':
	  case 'l':
	  case 'E':
	  case 'F':
	  case 'X':
	  case 'u':
	  case 'U':
	    if ( !(param = get_param (p, q, &advance)) )
		break;
	    if (p[1]=='o') {	       /* output file */
		strcpy (outname, param);
	    } else if (p[1]=='f') {    /* output format */
		ofmt = ofmt_find(param);
		if (!ofmt) {
		    report_error (ERR_FATAL | ERR_NOFILE | ERR_USAGE,
				  "unrecognised output format `%s' - "
				  "use -hf for a list",
				  param);
		}
		else
		    ofmt->current_dfmt = ofmt->debug_formats[0];
	    } else if (p[1]=='O') {		    /* Optimization level */
		int opt;
		opt = -99;
		while (*param) {
		    if (isdigit(*param)) {
			opt = atoi(param);
			while(isdigit(*++param)) ;
			if (opt<=0) optimizing = -1;		/* 0.98 behaviour */
			else if (opt==1) optimizing = 0;	/* Two passes, 0.98.09 behavior */
			else optimizing = opt;			/* Multiple passes */
		    } else {
			if (*param == 'v' || *param == '+') {
			    ++param;
			    opt_verbose_info = TRUE;
			    opt = 0;
			} else {	/* garbage */
			    opt = -99;
			    break;
			}
		    }
		} /* while (*param) */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人爽a毛片一区二区免费| 在线观看不卡一区| 91久久奴性调教| 久久一区二区三区四区| 亚洲乱码中文字幕| 国产米奇在线777精品观看| 欧美午夜一区二区| 欧美国产国产综合| 韩国女主播成人在线观看| 色哟哟国产精品免费观看| 国产欧美一区二区精品仙草咪| 亚洲gay无套男同| 91视频你懂的| 中文字幕精品三区| 国产一区二区精品久久| 91精品国产一区二区三区| 亚洲欧洲国产日韩| 国产精品影音先锋| 日韩免费看的电影| 午夜精品福利一区二区三区蜜桃| av资源网一区| 国产精品福利一区二区三区| 国产精品一卡二卡在线观看| 欧美高清激情brazzers| 亚洲国产精品天堂| 91行情网站电视在线观看高清版| 欧美国产日韩亚洲一区| 国产一区不卡精品| 久久久蜜臀国产一区二区| 久久精品国产一区二区三 | 亚洲欧洲av在线| 国产一区二区视频在线| 久久亚洲一级片| 国产一区二区成人久久免费影院 | 丁香一区二区三区| 久久综合九色综合97婷婷女人| 午夜不卡av在线| 91精品啪在线观看国产60岁| 日韩高清一级片| 日韩欧美高清一区| 国产专区综合网| 国产精品女主播av| 91麻豆高清视频| 亚洲最快最全在线视频| 7878成人国产在线观看| 男女视频一区二区| 欧美激情中文不卡| 91免费在线播放| 亚洲狠狠爱一区二区三区| 91 com成人网| 国产成a人无v码亚洲福利| 国产精品传媒视频| 欧美三级三级三级爽爽爽| 日韩精品91亚洲二区在线观看| 日韩精品一区二区三区视频| 国产成人在线视频免费播放| 亚洲天堂成人网| 欧美乱妇一区二区三区不卡视频| 久久精品久久综合| 日本一区二区成人| 在线精品视频免费播放| 美女国产一区二区| 国产精品视频一区二区三区不卡| 一本色道久久综合亚洲91| 丝袜美腿高跟呻吟高潮一区| 国产视频一区二区在线| 欧美中文字幕久久 | 亚洲成人激情自拍| 26uuu欧美日本| 色婷婷久久久亚洲一区二区三区 | 久国产精品韩国三级视频| 亚洲国产经典视频| 欧美图片一区二区三区| 国产资源精品在线观看| 亚洲一区二区欧美| 国产日韩影视精品| 欧美日韩日日骚| 波多野结衣的一区二区三区| 五月天久久比比资源色| 国产精品欧美久久久久一区二区 | 亚洲精品在线观| 一本色道久久综合亚洲精品按摩| 欧美成人a在线| 久久久久久亚洲综合| 成人高清在线视频| 一本大道久久a久久综合| 欧美精品一区二区三区视频| 亚洲黄色小说网站| 日韩三级免费观看| 亚洲高清免费观看高清完整版在线观看| 亚洲乱码一区二区三区在线观看| 国产在线精品不卡| 一区二区三区产品免费精品久久75| 日韩三级高清在线| 欧美在线观看一二区| 成人久久18免费网站麻豆| 另类人妖一区二区av| 亚洲制服丝袜在线| 亚洲人成人一区二区在线观看| 精品国产一二三| 日韩欧美色综合网站| 欧美日韩高清在线| 在线观看亚洲专区| 91美女精品福利| 成人久久视频在线观看| 国产一区二区精品久久91| 久久精品久久综合| 奇米综合一区二区三区精品视频| 婷婷综合另类小说色区| 亚洲图片有声小说| 一区二区三区四区高清精品免费观看| 国产精品国产三级国产aⅴ中文| 国产日韩精品一区二区三区在线| 欧美mv日韩mv国产| 精品日韩在线一区| www激情久久| 久久久久九九视频| 欧美国产精品中文字幕| 国产日产欧美一区| 日本一区二区在线不卡| 欧美国产精品一区| 亚洲色图制服诱惑| 亚洲综合激情小说| 美腿丝袜在线亚洲一区| 免费精品视频最新在线| 麻豆精品一区二区综合av| 久久成人麻豆午夜电影| 激情成人综合网| 国产九色精品成人porny| 成人性视频网站| 91视频免费看| 欧美三级电影在线看| 91精品国产91久久久久久一区二区| 3atv一区二区三区| 精品久久久久一区| 欧美国产日韩a欧美在线观看| 成人免费小视频| 亚洲电影在线播放| 久久av资源站| 成人动漫中文字幕| 欧美午夜影院一区| 日韩午夜激情视频| 国产欧美日韩在线观看| 亚洲黄色片在线观看| 丝袜美腿亚洲综合| 国产成人精品一区二区三区四区 | 国产精品第一页第二页第三页| 亚洲裸体在线观看| 午夜精品视频在线观看| 国产乱码精品一区二区三| 99久久精品免费精品国产| 欧美午夜精品久久久| 欧美xxxxx牲另类人与| 亚洲视频一区在线| 日韩黄色免费电影| 白白色亚洲国产精品| 91精品免费在线| 一色屋精品亚洲香蕉网站| 日韩av电影天堂| caoporm超碰国产精品| 3751色影院一区二区三区| 国产精品久久久爽爽爽麻豆色哟哟 | 亚洲丝袜精品丝袜在线| 成人晚上爱看视频| 91精品国产麻豆国产自产在线| 国产欧美一区在线| 午夜久久久影院| 97aⅴ精品视频一二三区| 精品国产一区久久| 午夜影视日本亚洲欧洲精品| 不卡的av在线| 欧美一区二区三区四区在线观看| 亚洲欧洲av在线| 国内久久婷婷综合| 欧美日本国产视频| 亚洲欧美日韩电影| 成人免费不卡视频| 日韩小视频在线观看专区| 亚洲免费观看高清完整| 国产寡妇亲子伦一区二区| 欧美一区二区在线观看| 亚洲午夜久久久久久久久电影网 | 不卡一区二区在线| 久久婷婷综合激情| 麻豆精品在线看| 欧美精品成人一区二区三区四区| 亚洲色图丝袜美腿| 国产1区2区3区精品美女| 精品久久久久av影院| 免费成人结看片| 欧美高清视频www夜色资源网| 亚洲夂夂婷婷色拍ww47| 色婷婷香蕉在线一区二区| 综合久久给合久久狠狠狠97色| 成人手机在线视频| 国产精品每日更新| 成人免费va视频| 中文字幕一区二区三区视频| 成人一级视频在线观看| 国产精品美女久久久久久2018|