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

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

?? nasmdoc3.htm

?? nasm手冊 大家可以看看 對要寫匯編程序的幫助很大
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<html><head><title>NASM Manual</title></head><body><h1 align=center>The Netwide Assembler: NASM</h1><p align=center><a href="nasmdoc4.html">Next Chapter</a> |<a href="nasmdoc2.html">Previous Chapter</a> |<a href="nasmdoc0.html">Contents</a> |<a href="nasmdoci.html">Index</a><h2><a name="chapter-3">Chapter 3: The NASM Language</a></h2><h3><a name="section-3.1">3.1 Layout of a NASM Source Line</a></h3><p>Like most assemblers, each NASM source line contains (unless it is amacro, a preprocessor directive or an assembler directive: see<a href="nasmdoc4.html">chapter 4</a> and <a href="nasmdoc5.html">chapter5</a>) some combination of the four fields<p><pre>label:    instruction operands        ; comment</pre><p>As usual, most of these fields are optional; the presence or absence ofany combination of a label, an instruction and a comment is allowed. Ofcourse, the operand field is either required or forbidden by the presenceand nature of the instruction field.<p>NASM uses backslash (\) as the line continuation character; if a lineends with backslash, the next line is considered to be a part of thebackslash-ended line.<p>NASM places no restrictions on white space within a line: labels mayhave white space before them, or instructions may have no space beforethem, or anything. The colon after a label is also optional. (Note thatthis means that if you intend to code <code><nobr>lodsb</nobr></code> aloneon a line, and type <code><nobr>lodab</nobr></code> by accident, thenthat's still a valid source line which does nothing but define a label.Running NASM with the command-line option<code><nobr>-w+orphan-labels</nobr></code> will cause it to warn you if youdefine a label alone on a line without a trailing colon.)<p>Valid characters in labels are letters, numbers,<code><nobr>_</nobr></code>, <code><nobr>$</nobr></code>,<code><nobr>#</nobr></code>, <code><nobr>@</nobr></code>,<code><nobr>~</nobr></code>, <code><nobr>.</nobr></code>, and<code><nobr>?</nobr></code>. The only characters which may be used as the<em>first</em> character of an identifier are letters,<code><nobr>.</nobr></code> (with special meaning: see<a href="#section-3.9">section 3.9</a>), <code><nobr>_</nobr></code> and<code><nobr>?</nobr></code>. An identifier may also be prefixed with a<code><nobr>$</nobr></code> to indicate that it is intended to be read asan identifier and not a reserved word; thus, if some other module you arelinking with defines a symbol called <code><nobr>eax</nobr></code>, you canrefer to <code><nobr>$eax</nobr></code> in NASM code to distinguish thesymbol from the register.<p>The instruction field may contain any machine instruction: Pentium andP6 instructions, FPU instructions, MMX instructions and even undocumentedinstructions are all supported. The instruction may be prefixed by<code><nobr>LOCK</nobr></code>, <code><nobr>REP</nobr></code>,<code><nobr>REPE</nobr></code>/<code><nobr>REPZ</nobr></code> or<code><nobr>REPNE</nobr></code>/<code><nobr>REPNZ</nobr></code>, in theusual way. Explicit address-size and operand-size prefixes<code><nobr>A16</nobr></code>, <code><nobr>A32</nobr></code>,<code><nobr>O16</nobr></code> and <code><nobr>O32</nobr></code> areprovided - one example of their use is given in<a href="nasmdoc9.html">chapter 9</a>. You can also use the name of asegment register as an instruction prefix: coding<code><nobr>es mov [bx],ax</nobr></code> is equivalent to coding<code><nobr>mov [es:bx],ax</nobr></code>. We recommend the latter syntax,since it is consistent with other syntactic features of the language, butfor instructions such as <code><nobr>LODSB</nobr></code>, which has nooperands and yet can require a segment override, there is no cleansyntactic way to proceed apart from <code><nobr>es lodsb</nobr></code>.<p>An instruction is not required to use a prefix: prefixes such as<code><nobr>CS</nobr></code>, <code><nobr>A32</nobr></code>,<code><nobr>LOCK</nobr></code> or <code><nobr>REPE</nobr></code> can appearon a line by themselves, and NASM will just generate the prefix bytes.<p>In addition to actual machine instructions, NASM also supports a numberof pseudo-instructions, described in <a href="#section-3.2">section3.2</a>.<p>Instruction operands may take a number of forms: they can be registers,described simply by the register name (e.g. <code><nobr>ax</nobr></code>,<code><nobr>bp</nobr></code>, <code><nobr>ebx</nobr></code>,<code><nobr>cr0</nobr></code>: NASM does not use the<code><nobr>gas</nobr></code>-style syntax in which register names must beprefixed by a <code><nobr>%</nobr></code> sign), or they can be effectiveaddresses (see <a href="#section-3.3">section 3.3</a>), constants(<a href="#section-3.4">section 3.4</a>) or expressions(<a href="#section-3.5">section 3.5</a>).<p>For floating-point instructions, NASM accepts a wide range of syntaxes:you can use two-operand forms like MASM supports, or you can use NASM'snative single-operand forms in most cases. Details of all forms of eachsupported instruction are given in <a href="nasmdocb.html">appendix B</a>.For example, you can code:<p><pre>        fadd    st1             ; this sets st0 := st0 + st1         fadd    st0,st1         ; so does this         fadd    st1,st0         ; this sets st1 := st1 + st0         fadd    to st1          ; so does this</pre><p>Almost any floating-point instruction that references memory must useone of the prefixes <code><nobr>DWORD</nobr></code>,<code><nobr>QWORD</nobr></code> or <code><nobr>TWORD</nobr></code> toindicate what size of memory operand it refers to.<h3><a name="section-3.2">3.2 Pseudo-Instructions</a></h3><p>Pseudo-instructions are things which, though not real x86 machineinstructions, are used in the instruction field anyway because that's themost convenient place to put them. The current pseudo-instructions are<code><nobr>DB</nobr></code>, <code><nobr>DW</nobr></code>,<code><nobr>DD</nobr></code>, <code><nobr>DQ</nobr></code> and<code><nobr>DT</nobr></code>, their uninitialised counterparts<code><nobr>RESB</nobr></code>, <code><nobr>RESW</nobr></code>,<code><nobr>RESD</nobr></code>, <code><nobr>RESQ</nobr></code> and<code><nobr>REST</nobr></code>, the <code><nobr>INCBIN</nobr></code>command, the <code><nobr>EQU</nobr></code> command, and the<code><nobr>TIMES</nobr></code> prefix.<h4><a name="section-3.2.1">3.2.1 <code><nobr>DB</nobr></code> and friends: Declaring Initialised Data</a></h4><p><code><nobr>DB</nobr></code>, <code><nobr>DW</nobr></code>,<code><nobr>DD</nobr></code>, <code><nobr>DQ</nobr></code> and<code><nobr>DT</nobr></code> are used, much as in MASM, to declareinitialised data in the output file. They can be invoked in a wide range ofways:<p><pre>      db    0x55                ; just the byte 0x55       db    0x55,0x56,0x57      ; three bytes in succession       db    'a',0x55            ; character constants are OK       db    'hello',13,10,'$'   ; so are string constants       dw    0x1234              ; 0x34 0x12       dw    'a'                 ; 0x61 0x00 (it's just a number)       dw    'ab'                ; 0x61 0x62 (character constant)       dw    'abc'               ; 0x61 0x62 0x63 0x00 (string)       dd    0x12345678          ; 0x78 0x56 0x34 0x12       dd    1.234567e20         ; floating-point constant       dq    1.234567e20         ; double-precision float       dt    1.234567e20         ; extended-precision float</pre><p><code><nobr>DQ</nobr></code> and <code><nobr>DT</nobr></code> do notaccept numeric constants or string constants as operands.<h4><a name="section-3.2.2">3.2.2 <code><nobr>RESB</nobr></code> and friends: Declaring Uninitialised Data</a></h4><p><code><nobr>RESB</nobr></code>, <code><nobr>RESW</nobr></code>,<code><nobr>RESD</nobr></code>, <code><nobr>RESQ</nobr></code> and<code><nobr>REST</nobr></code> are designed to be used in the BSS sectionof a module: they declare <em>uninitialised</em> storage space. Each takesa single operand, which is the number of bytes, words, doublewords orwhatever to reserve. As stated in<a href="nasmdoc2.html#section-2.2.7">section 2.2.7</a>, NASM does notsupport the MASM/TASM syntax of reserving uninitialised space by writing<code><nobr>DW ?</nobr></code> or similar things: this is what it doesinstead. The operand to a <code><nobr>RESB</nobr></code>-typepseudo-instruction is a <em>critical expression</em>: see<a href="#section-3.8">section 3.8</a>.<p>For example:<p><pre>buffer:         resb    64              ; reserve 64 bytes wordvar:        resw    1               ; reserve a word realarray       resq    10              ; array of ten reals</pre><h4><a name="section-3.2.3">3.2.3 <code><nobr>INCBIN</nobr></code>: Including External Binary Files</a></h4><p><code><nobr>INCBIN</nobr></code> is borrowed from the old Amigaassembler DevPac: it includes a binary file verbatim into the output file.This can be handy for (for example) including graphics and sound datadirectly into a game executable file. It can be called in one of thesethree ways:<p><pre>    incbin  "file.dat"             ; include the whole file     incbin  "file.dat",1024        ; skip the first 1024 bytes     incbin  "file.dat",1024,512    ; skip the first 1024, and                                    ; actually include at most 512</pre><h4><a name="section-3.2.4">3.2.4 <code><nobr>EQU</nobr></code>: Defining Constants</a></h4><p><code><nobr>EQU</nobr></code> defines a symbol to a given constantvalue: when <code><nobr>EQU</nobr></code> is used, the source line mustcontain a label. The action of <code><nobr>EQU</nobr></code> is to definethe given label name to the value of its (only) operand. This definition isabsolute, and cannot change later. So, for example,<p><pre>message         db      'hello, world' msglen          equ     $-message</pre><p>defines <code><nobr>msglen</nobr></code> to be the constant 12.<code><nobr>msglen</nobr></code> may not then be redefined later. This isnot a preprocessor definition either: the value of<code><nobr>msglen</nobr></code> is evaluated <em>once</em>, using thevalue of <code><nobr>$</nobr></code> (see <a href="#section-3.5">section3.5</a> for an explanation of <code><nobr>$</nobr></code>) at the point ofdefinition, rather than being evaluated wherever it is referenced and usingthe value of <code><nobr>$</nobr></code> at the point of reference. Notethat the operand to an <code><nobr>EQU</nobr></code> is also a criticalexpression (<a href="#section-3.8">section 3.8</a>).<h4><a name="section-3.2.5">3.2.5 <code><nobr>TIMES</nobr></code>: Repeating Instructions or Data</a></h4><p>The <code><nobr>TIMES</nobr></code> prefix causes the instruction to beassembled multiple times. This is partly present as NASM's equivalent ofthe <code><nobr>DUP</nobr></code> syntax supported by MASM-compatibleassemblers, in that you can code<p><pre>zerobuf:        times 64 db 0</pre><p>or similar things; but <code><nobr>TIMES</nobr></code> is more versatilethan that. The argument to <code><nobr>TIMES</nobr></code> is not just anumeric constant, but a numeric <em>expression</em>, so you can do thingslike<p><pre>buffer: db      'hello, world'         times 64-$+buffer db ' '</pre><p>which will store exactly enough spaces to make the total length of<code><nobr>buffer</nobr></code> up to 64. Finally,<code><nobr>TIMES</nobr></code> can be applied to ordinary instructions, soyou can code trivial unrolled loops in it:<p><pre>        times 100 movsb</pre><p>Note that there is no effective difference between<code><nobr>times 100 resb 1</nobr></code> and<code><nobr>resb 100</nobr></code>, except that the latter will beassembled about 100 times faster due to the internal structure of theassembler.<p>The operand to <code><nobr>TIMES</nobr></code>, like that of<code><nobr>EQU</nobr></code> and those of <code><nobr>RESB</nobr></code>and friends, is a critical expression (<a href="#section-3.8">section3.8</a>).<p>Note also that <code><nobr>TIMES</nobr></code> can't be applied tomacros: the reason for this is that <code><nobr>TIMES</nobr></code> isprocessed after the macro phase, which allows the argument to<code><nobr>TIMES</nobr></code> to contain expressions such as

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产拍揄自揄精品视频麻豆| 欧美日韩国产一二三| 天堂在线一区二区| 一区二区三区成人在线视频| 国产精品久久久久精k8| 国产日韩欧美亚洲| 国产精品久久综合| 国产精品国产自产拍高清av王其| 精品人伦一区二区色婷婷| 欧美tickle裸体挠脚心vk| 日韩情涩欧美日韩视频| 日韩免费高清视频| 亚洲精品一区二区三区福利| 久久久五月婷婷| 国产精品人妖ts系列视频| 国产精品婷婷午夜在线观看| 亚洲欧美日本韩国| 香蕉乱码成人久久天堂爱免费| 亚洲电影在线免费观看| 秋霞影院一区二区| 国产成人综合网站| 日本电影欧美片| 欧美日韩成人激情| 久久人人超碰精品| 一区二区在线看| 日韩电影在线一区| 国产乱码精品一区二区三区五月婷| 国产麻豆精品theporn| 99久久精品费精品国产一区二区| 在线观看亚洲a| 精品国产91洋老外米糕| 中文字幕中文字幕一区二区| 亚洲一区二区三区国产| 久久国产三级精品| 一本久久a久久精品亚洲| 在线成人午夜影院| 国产亚洲精久久久久久| 一区二区三区四区不卡在线| 理论片日本一区| 在线观看一区不卡| 国产日韩亚洲欧美综合| 午夜精品福利视频网站| 福利91精品一区二区三区| 欧美网站一区二区| 国产精品免费网站在线观看| 亚洲第一搞黄网站| 成人精品视频一区| 日韩精品一区二区三区中文精品| 国产精品久99| 国精产品一区一区三区mba桃花| 色乱码一区二区三区88| 国产视频视频一区| 裸体一区二区三区| 欧美日韩一区中文字幕| 亚洲欧洲国产日韩| 国产美女av一区二区三区| 欧美电影影音先锋| 亚洲成人免费观看| 日本黄色一区二区| 日韩毛片一二三区| 99在线精品一区二区三区| 精品捆绑美女sm三区| 午夜久久久久久久久久一区二区| 成人av资源在线观看| 国产日韩欧美一区二区三区乱码| 免费成人在线网站| 欧美欧美午夜aⅴ在线观看| 一区二区三区四区蜜桃| 色噜噜狠狠成人网p站| 国产精品国产三级国产普通话99 | 日韩极品在线观看| 99国产精品久久久久久久久久久| 精品电影一区二区三区| 奇米777欧美一区二区| 51久久夜色精品国产麻豆| 亚洲综合在线观看视频| 色94色欧美sute亚洲线路二| 国产精品久久久久精k8| 91香蕉视频mp4| 亚洲激情在线播放| 精品视频在线免费观看| 五月天亚洲婷婷| 91精品国产欧美日韩| 久久99久久99| 久久综合给合久久狠狠狠97色69| 久久国产精品露脸对白| 久久久国产精华| caoporn国产精品| 亚洲欧美日韩国产综合| 欧美综合欧美视频| 日韩av电影天堂| 精品福利av导航| 成人一区二区三区在线观看| 国产精品久久久久三级| 91九色02白丝porn| 琪琪久久久久日韩精品| 欧美精品一区二区三区蜜臀| 国产一区二区美女| 亚洲视频电影在线| 欧美电影在线免费观看| 国产综合久久久久久久久久久久| 国产精品女同一区二区三区| 不卡的av网站| 五月天丁香久久| 26uuu精品一区二区三区四区在线| 国产宾馆实践打屁股91| 亚洲国产综合在线| 久久久久久亚洲综合影院红桃| 99久久婷婷国产| 另类人妖一区二区av| 亚洲人成影院在线观看| 精品国产sm最大网站免费看| a亚洲天堂av| 美女一区二区在线观看| 亚洲视频一区在线| 欧美一区二区成人6969| 成人午夜短视频| 男男成人高潮片免费网站| 亚洲国产精品二十页| 欧美精品久久天天躁| 97久久久精品综合88久久| 日本不卡一二三| 国产精品高潮呻吟| 26uuu精品一区二区| 欧美日韩亚洲另类| 99vv1com这只有精品| 韩国精品主播一区二区在线观看 | 日韩亚洲国产中文字幕欧美| heyzo一本久久综合| 国产自产2019最新不卡| 亚洲成a天堂v人片| 成人免费在线播放视频| 久久久久久免费网| 69堂亚洲精品首页| 欧美午夜一区二区三区| www.亚洲在线| 春色校园综合激情亚洲| 加勒比av一区二区| 水野朝阳av一区二区三区| 亚洲激情图片一区| 亚洲婷婷综合色高清在线| 国产亚洲精品7777| 精品国产一区二区三区忘忧草| 欧美日韩大陆一区二区| 日本韩国一区二区三区| 色综合天天综合| heyzo一本久久综合| 成人美女视频在线观看18| 国产69精品久久久久777| 精品一区中文字幕| 激情深爱一区二区| 久久国内精品自在自线400部| 日韩黄色小视频| 天天色天天操综合| 免费在线欧美视频| 久久精品99国产精品日本| 蜜臀av一区二区在线免费观看| 三级欧美韩日大片在线看| 婷婷中文字幕一区三区| 亚洲一二三四在线观看| 亚洲成av人在线观看| 日日骚欧美日韩| 美日韩一区二区| 国产精品一区二区三区99| 国产91丝袜在线观看| 成人动漫av在线| 日本国产一区二区| 欧美人xxxx| 精品盗摄一区二区三区| 国产网红主播福利一区二区| 国产精品久久久久国产精品日日 | 婷婷综合在线观看| 美女网站一区二区| 国产成人免费av在线| 99久免费精品视频在线观看 | 一区二区三区丝袜| 天天操天天综合网| 经典三级一区二区| 99精品视频在线观看免费| 91蝌蚪porny成人天涯| 7777精品伊人久久久大香线蕉超级流畅 | 日韩女同互慰一区二区| 久久精品男人的天堂| 亚洲精品伦理在线| 蜜桃久久久久久| 丁香另类激情小说| 欧美日韩一级片网站| xnxx国产精品| 一区二区三区四区不卡在线| 久久不见久久见免费视频7| 成人中文字幕在线| 欧美一区二区三区四区久久 | 欧美色涩在线第一页| 欧美videofree性高清杂交| 亚洲欧洲另类国产综合| 日韩av不卡一区二区| 99久久99久久精品免费观看| 日韩精品一区二区三区在线播放| 亚洲欧美怡红院| 国产露脸91国语对白|