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

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

?? nasm.c

?? 32位匯編編譯器nasm源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* 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];
        snprintf(temp, sizeof(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;
};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产99久久6| 蜜乳av一区二区| 中文字幕国产精品一区二区| 日韩欧美国产一区在线观看| 在线不卡免费欧美| 欧美一区二区三区成人| 91精品国产日韩91久久久久久| 欧美精品国产精品| 日韩欧美在线网站| 日韩精品一区二区三区在线播放| 日韩一区二区三区免费看| 欧美一区二区三区人| 精品少妇一区二区三区视频免付费 | 91视频在线看| 91亚洲国产成人精品一区二三| 91黄色小视频| 欧美精品一卡两卡| 久久久久久综合| 国产精品福利一区二区三区| 一区二区三区中文字幕| 日韩精品国产精品| 国产精品影音先锋| 欧美亚洲一区二区在线观看| 欧美一区二区三区视频免费播放| 2024国产精品视频| 亚洲天堂a在线| 天天操天天干天天综合网| 另类调教123区| 成人高清免费在线播放| 欧洲生活片亚洲生活在线观看| 日韩一区二区在线看| 国产精品久久久久精k8 | 日韩欧美成人一区| 国产精品污网站| 亚洲综合男人的天堂| 久久99国产精品尤物| 91视频一区二区三区| 欧美一级高清片| 亚洲精品视频在线观看网站| 另类人妖一区二区av| 欧美在线视频全部完| 久久久精品综合| 午夜精品久久久久久久99水蜜桃 | 在线观看亚洲专区| 久久久不卡网国产精品二区| 一区二区不卡在线播放| 国产高清精品网站| 91麻豆精品国产91久久久使用方法 | 欧美精品一区二区三| 亚洲乱码精品一二三四区日韩在线| 日韩精品福利网| 99久精品国产| 国产丝袜美腿一区二区三区| 亚洲成人激情综合网| 91毛片在线观看| 久久精品人人爽人人爽| 奇米亚洲午夜久久精品| 91久久精品一区二区三区| 欧美激情一区二区三区| 极品少妇xxxx偷拍精品少妇| 欧美日韩性生活| 一个色在线综合| 91免费版pro下载短视频| www国产成人| 久久国产欧美日韩精品| 欧美精品久久99| 亚洲成a人v欧美综合天堂下载| 91麻豆视频网站| 亚洲欧美激情小说另类| 96av麻豆蜜桃一区二区| 一区在线中文字幕| av高清久久久| 亚洲丝袜制服诱惑| 99久久伊人久久99| 国产精品视频第一区| 成人高清在线视频| 中文字幕一区三区| 91麻豆高清视频| 亚洲欧洲成人av每日更新| 成人a区在线观看| 中文字幕在线不卡一区| 一本一本久久a久久精品综合麻豆| 亚洲欧洲性图库| 91福利精品第一导航| 亚洲永久精品国产| 欧美精品精品一区| 狠狠v欧美v日韩v亚洲ⅴ| 26uuu成人网一区二区三区| 国产精品一级片在线观看| 国产午夜精品久久久久久免费视| 国产大陆精品国产| 亚洲欧洲国产日韩| 欧美日韩五月天| 精品中文av资源站在线观看| 久久亚洲春色中文字幕久久久| 国产精品一二三四区| 国产精品福利一区| 欧美日韩在线播| 六月丁香婷婷久久| 国产女人水真多18毛片18精品视频| 成人黄色在线网站| 午夜久久久影院| 2024国产精品| 色就色 综合激情| 免费av网站大全久久| 国产精品污污网站在线观看 | 日本色综合中文字幕| 日韩欧美色综合网站| 成人午夜精品在线| 午夜精品福利一区二区蜜股av| 日韩欧美一级二级三级| 91视视频在线直接观看在线看网页在线看| 亚洲激情男女视频| 精品国产乱码久久久久久闺蜜| 国产成人免费xxxxxxxx| 五月天一区二区| 国产精品久久久久久久久搜平片| 777欧美精品| 99久久久精品免费观看国产蜜| 肉肉av福利一精品导航| 国产精品免费人成网站| 在线成人午夜影院| 91黄视频在线观看| 成人av小说网| 久久精品国产久精国产爱| 亚洲综合丝袜美腿| 中文av字幕一区| 337p粉嫩大胆色噜噜噜噜亚洲 | www欧美成人18+| 精品视频全国免费看| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 色噜噜狠狠成人中文综合| 狠狠色综合色综合网络| 视频一区在线播放| 亚洲综合精品自拍| 中文字幕欧美一区| 国产精品久久99| 久久伊人中文字幕| 欧美电影免费观看高清完整版在线观看 | 精品动漫一区二区三区在线观看| 欧美亚洲国产一区二区三区va | 欧美性一二三区| 北条麻妃一区二区三区| 国产综合一区二区| 精品一区二区三区欧美| 日韩精品成人一区二区在线| 亚洲综合区在线| 亚洲一区影音先锋| 亚洲激情五月婷婷| 亚洲一区二区三区爽爽爽爽爽| 亚洲视频在线一区二区| 亚洲人亚洲人成电影网站色| 国产精品久久久久三级| 国产精品久久久久久久第一福利 | 欧美精品一区二区蜜臀亚洲| 日韩欧美国产精品一区| 日韩欧美一区二区免费| 欧美一级淫片007| 精品国产乱码久久久久久图片| 欧美一级一区二区| 精品国产一区二区三区忘忧草| 久久综合色综合88| 国产欧美日韩视频一区二区 | 一二三区精品福利视频| 亚洲成a人片在线不卡一二三区| 婷婷国产v国产偷v亚洲高清| 免费成人深夜小野草| 狠狠色狠狠色综合日日91app| 国精产品一区一区三区mba视频| 国产一区二区三区最好精华液| 国产电影精品久久禁18| 99精品一区二区| 欧美人动与zoxxxx乱| 精品三级av在线| 国产目拍亚洲精品99久久精品| 亚洲天堂中文字幕| 午夜日韩在线观看| 国精产品一区一区三区mba桃花| 国产91在线观看丝袜| 欧美日韩综合色| 欧美精品一区二区三区视频| 亚洲欧洲另类国产综合| 日韩精品一二三四| 国产不卡视频在线观看| 欧美亚洲一区二区三区四区| 精品人伦一区二区色婷婷| 国产精品成人免费在线| 三级久久三级久久久| 成人性生交大合| 欧美日韩美女一区二区| 欧美激情中文字幕| 爽好久久久欧美精品| 波多野结衣中文字幕一区二区三区| 欧美主播一区二区三区美女| 久久人人97超碰com| 亚洲国产精品视频| 成人黄色片在线观看| 日韩女同互慰一区二区| 一区二区三区四区激情| 精品一区二区三区日韩|