亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧洲生活片亚洲生活在线观看| 国产精品一区三区| 日韩有码一区二区三区| 亚洲v中文字幕| 奇米色一区二区| 九九九久久久精品| 国产91精品久久久久久久网曝门| 国产尤物一区二区| 91丨porny丨户外露出| 色综合天天综合网天天看片| 欧美午夜免费电影| 在线综合视频播放| 久久久一区二区三区| 亚洲视频在线一区二区| 精品影视av免费| 日韩你懂的电影在线观看| 日日夜夜一区二区| 欧美精品久久天天躁| 中文字幕亚洲一区二区av在线| 卡一卡二国产精品| 精品国产一区二区三区av性色| 久久99国产精品久久99果冻传媒 | 国产精品久久久久一区二区三区共| 国产在线视频不卡二| 久久久91精品国产一区二区精品 | 亚洲视频在线观看一区| 精品一区二区三区日韩| 欧美日本在线观看| 亚洲一区在线视频观看| 91久久精品网| 中文字幕日韩一区| 高清国产一区二区三区| 精品成人免费观看| 国产一二三精品| 中文字幕精品一区二区精品绿巨人| 麻豆精品一二三| 久久一日本道色综合| 精品制服美女丁香| 久久精品一区四区| 高清国产午夜精品久久久久久| 国产精品三级电影| 91啪亚洲精品| 天天免费综合色| 精品精品欲导航| youjizz久久| 日韩黄色小视频| 国产日韩欧美麻豆| 一本到三区不卡视频| 天天综合天天做天天综合| 日韩欧美国产麻豆| 91麻豆免费观看| 日韩国产欧美视频| 视频一区二区欧美| 久久一夜天堂av一区二区三区| 国产亚洲视频系列| 亚洲国产日韩a在线播放| 蜜桃久久久久久久| 成人91在线观看| 一区二区三区色| 91在线视频免费观看| 一区二区三区中文在线| 久久久精品tv| 色婷婷综合激情| 欧美www视频| 久久成人久久鬼色| 欧美日韩一区三区四区| 午夜久久福利影院| 在线中文字幕一区二区| 欧美激情中文字幕一区二区| 99国产麻豆精品| 久久99久久99| 亚洲成a人片在线不卡一二三区| 欧美刺激午夜性久久久久久久| 91丝袜国产在线播放| 精品一区二区三区免费观看| 性做久久久久久久免费看| 国产精品国产三级国产专播品爱网 | 亚洲欧洲日韩女同| 久久久国产精品午夜一区ai换脸| 欧美日韩一区二区三区四区五区| 成人毛片老司机大片| 国产精品自拍三区| 国产一区二区福利| 国产精品一区二区免费不卡 | 日韩欧美一级二级三级| 欧美日本国产一区| 91精品国产一区二区人妖| 色婷婷国产精品久久包臀 | 欧美极品xxx| 国产日韩欧美精品综合| 国产欧美一区在线| 国产精品无圣光一区二区| 中文字幕+乱码+中文字幕一区| 久久久久久久久岛国免费| 日本一区二区免费在线观看视频| 久久久久国产免费免费| 中文字幕精品在线不卡| 18涩涩午夜精品.www| 又紧又大又爽精品一区二区| 一区二区视频在线看| 亚洲一区二区三区在线播放| 日韩高清中文字幕一区| 国产一区二区在线看| 成人h动漫精品一区二区| 欧美在线免费视屏| 精品国产91乱码一区二区三区| 精品国产凹凸成av人导航| 国产精品久久久久影视| 水蜜桃久久夜色精品一区的特点| 精品一区二区在线播放| 欧美一a一片一级一片| 精品国产乱码久久久久久牛牛| 亚洲精品久久久久久国产精华液| 日本网站在线观看一区二区三区| 国产成人精品免费在线| 88在线观看91蜜桃国自产| 国产精品成人在线观看| 美女国产一区二区三区| 欧美日韩一区在线| 亚洲天堂av一区| 成人亚洲一区二区一| 欧美精品一区二区三区高清aⅴ | 国产午夜精品一区二区三区嫩草 | 91福利资源站| 最新中文字幕一区二区三区 | 久久久精品免费免费| 日韩avvvv在线播放| 欧美精品v国产精品v日韩精品| 亚洲精品国产精华液| 99久久久久久99| 亚洲欧洲成人自拍| 99精品视频中文字幕| 亚洲日本va在线观看| 欧美曰成人黄网| 亚洲影视在线观看| 欧美精品乱人伦久久久久久| 亚洲一区二区三区视频在线| 欧美专区在线观看一区| 三级欧美韩日大片在线看| 欧美一级xxx| 国产91精品精华液一区二区三区| 日本一区二区三区dvd视频在线| 成人一级黄色片| 亚洲h在线观看| 欧美大片一区二区三区| 99这里只有久久精品视频| 亚洲一区二区三区四区不卡| 欧美一区二区三区四区久久| 麻豆91免费看| 国产精品国产精品国产专区不片| 在线观看一区二区精品视频| 青青国产91久久久久久| |精品福利一区二区三区| 欧美三级视频在线| 久久爱另类一区二区小说| 欧美在线|欧美| 九色|91porny| 丝袜美腿亚洲综合| 国产精品第13页| 国产午夜一区二区三区| 7777精品伊人久久久大香线蕉的| 国产成人午夜精品影院观看视频| 亚洲国产欧美日韩另类综合 | 成人免费的视频| 狠狠狠色丁香婷婷综合久久五月| 亚洲影视资源网| 亚洲码国产岛国毛片在线| 日本一区二区成人在线| 精品电影一区二区三区 | 青青草91视频| 日韩av电影天堂| 日日摸夜夜添夜夜添亚洲女人| 亚洲激情网站免费观看| 一区二区三区在线免费观看| 国产精品毛片大码女人| 亚洲欧美一区二区三区久本道91| 国产精品免费视频观看| 亚洲少妇中出一区| 一区二区久久久久久| 亚洲国产精品久久艾草纯爱| 一级中文字幕一区二区| 日韩精品乱码av一区二区| 日韩黄色免费网站| 国产福利精品一区二区| 99精品视频一区| 欧美美女bb生活片| 国产丝袜欧美中文另类| 一区二区三区欧美视频| 亚洲第一狼人社区| 国产麻豆日韩欧美久久| 成人网男人的天堂| 欧美日韩在线亚洲一区蜜芽| 日韩无一区二区| 中文字幕亚洲电影| 奇米影视一区二区三区小说| 国产91丝袜在线观看| 欧美日韩一区三区| 国产日本欧美一区二区| 免费人成黄页网站在线一区二区| 国产成人精品免费在线|