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

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

?? nasmdoc4.htm

?? nasm手冊 大家可以看看 對要寫匯編程序的幫助很大
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<p><pre>%ifdef SOME_MACRO     ; do some setup %elifdef SOME_OTHER_MACRO     ; do some different setup %else     %error Neither SOME_MACRO nor SOME_OTHER_MACRO was defined. %endif</pre><p>Then any user who fails to understand the way your code is supposed tobe assembled will be quickly warned of their mistake, rather than having towait until the program crashes on being run and then not knowing what wentwrong.<h3><a name="section-4.5">4.5 Preprocessor Loops: <code><nobr>%rep</nobr></code></a></h3><p>NASM's <code><nobr>TIMES</nobr></code> prefix, though useful, cannot beused to invoke a multi-line macro multiple times, because it is processedby NASM after macros have already been expanded. Therefore NASM providesanother form of loop, this time at the preprocessor level:<code><nobr>%rep</nobr></code>.<p>The directives <code><nobr>%rep</nobr></code> and<code><nobr>%endrep</nobr></code> (<code><nobr>%rep</nobr></code> takes anumeric argument, which can be an expression;<code><nobr>%endrep</nobr></code> takes no arguments) can be used toenclose a chunk of code, which is then replicated as many times asspecified by the preprocessor:<p><pre>%assign i 0 %rep    64         inc     word [table+2*i] %assign i i+1 %endrep</pre><p>This will generate a sequence of 64 <code><nobr>INC</nobr></code>instructions, incrementing every word of memory from<code><nobr>[table]</nobr></code> to <code><nobr>[table+126]</nobr></code>.<p>For more complex termination conditions, or to break out of a repeatloop part way along, you can use the <code><nobr>%exitrep</nobr></code>directive to terminate the loop, like this:<p><pre>fibonacci: %assign i 0 %assign j 1 %rep 100 %if j &gt; 65535     %exitrep %endif         dw j %assign k j+i %assign i j %assign j k %endrep fib_number equ ($-fibonacci)/2</pre><p>This produces a list of all the Fibonacci numbers that will fit in 16bits. Note that a maximum repeat count must still be given to<code><nobr>%rep</nobr></code>. This is to prevent the possibility of NASMgetting into an infinite loop in the preprocessor, which (on multitaskingor multi-user systems) would typically cause all the system memory to begradually used up and other applications to start crashing.<h3><a name="section-4.6">4.6 Including Other Files</a></h3><p>Using, once again, a very similar syntax to the C preprocessor, NASM'spreprocessor lets you include other source files into your code. This isdone by the use of the <code><nobr>%include</nobr></code> directive:<p><pre>%include "macros.mac"</pre><p>will include the contents of the file<code><nobr>macros.mac</nobr></code> into the source file containing the<code><nobr>%include</nobr></code> directive.<p>Include files are searched for in the current directory (the directoryyou're in when you run NASM, as opposed to the location of the NASMexecutable or the location of the source file), plus any directoriesspecified on the NASM command line using the <code><nobr>-i</nobr></code>option.<p>The standard C idiom for preventing a file being included more than onceis just as applicable in NASM: if the file<code><nobr>macros.mac</nobr></code> has the form<p><pre>%ifndef MACROS_MAC     %define MACROS_MAC     ; now define some macros %endif</pre><p>then including the file more than once will not cause errors, becausethe second time the file is included nothing will happen because the macro<code><nobr>MACROS_MAC</nobr></code> will already be defined.<p>You can force a file to be included even if there is no<code><nobr>%include</nobr></code> directive that explicitly includes it,by using the <code><nobr>-p</nobr></code> option on the NASM command line(see <a href="nasmdoc2.html#section-2.1.11">section 2.1.11</a>).<h3><a name="section-4.7">4.7 The Context Stack</a></h3><p>Having labels that are local to a macro definition is sometimes notquite powerful enough: sometimes you want to be able to share labelsbetween several macro calls. An example might be a<code><nobr>REPEAT</nobr></code> ... <code><nobr>UNTIL</nobr></code> loop,in which the expansion of the <code><nobr>REPEAT</nobr></code> macro wouldneed to be able to refer to a label which the<code><nobr>UNTIL</nobr></code> macro had defined. However, for such amacro you would also want to be able to nest these loops.<p>NASM provides this level of power by means of a <em>context stack</em>.The preprocessor maintains a stack of <em>contexts</em>, each of which ischaracterised by a name. You add a new context to the stack using the<code><nobr>%push</nobr></code> directive, and remove one using<code><nobr>%pop</nobr></code>. You can define labels that are local to aparticular context on the stack.<h4><a name="section-4.7.1">4.7.1 <code><nobr>%push</nobr></code> and <code><nobr>%pop</nobr></code>: Creating and Removing Contexts</a></h4><p>The <code><nobr>%push</nobr></code> directive is used to create a newcontext and place it on the top of the context stack.<code><nobr>%push</nobr></code> requires one argument, which is the name ofthe context. For example:<p><pre>%push    foobar</pre><p>This pushes a new context called <code><nobr>foobar</nobr></code> on thestack. You can have several contexts on the stack with the same name: theycan still be distinguished.<p>The directive <code><nobr>%pop</nobr></code>, requiring no arguments,removes the top context from the context stack and destroys it, along withany labels associated with it.<h4><a name="section-4.7.2">4.7.2 Context-Local Labels</a></h4><p>Just as the usage <code><nobr>%%foo</nobr></code> defines a label whichis local to the particular macro call in which it is used, the usage<code><nobr>%$foo</nobr></code> is used to define a label which is local tothe context on the top of the context stack. So the<code><nobr>REPEAT</nobr></code> and <code><nobr>UNTIL</nobr></code>example given above could be implemented by means of:<p><pre>%macro repeat 0     %push   repeat     %$begin: %endmacro %macro until 1         j%-1    %$begin     %pop %endmacro</pre><p>and invoked by means of, for example,<p><pre>        mov     cx,string         repeat         add     cx,3         scasb         until   e</pre><p>which would scan every fourth byte of a string in search of the byte in<code><nobr>AL</nobr></code>.<p>If you need to define, or access, labels local to the context<em>below</em> the top one on the stack, you can use<code><nobr>%$$foo</nobr></code>, or <code><nobr>%$$$foo</nobr></code> forthe context below that, and so on.<h4><a name="section-4.7.3">4.7.3 Context-Local Single-Line Macros</a></h4><p>NASM also allows you to define single-line macros which are local to aparticular context, in just the same way:<p><pre>%define %$localmac 3</pre><p>will define the single-line macro <code><nobr>%$localmac</nobr></code>to be local to the top context on the stack. Of course, after a subsequent<code><nobr>%push</nobr></code>, it can then still be accessed by the name<code><nobr>%$$localmac</nobr></code>.<h4><a name="section-4.7.4">4.7.4 <code><nobr>%repl</nobr></code>: Renaming a Context</a></h4><p>If you need to change the name of the top context on the stack (inorder, for example, to have it respond differently to<code><nobr>%ifctx</nobr></code>), you can execute a<code><nobr>%pop</nobr></code> followed by a<code><nobr>%push</nobr></code>; but this will have the side effect ofdestroying all context-local labels and macros associated with the contextthat was just popped.<p>NASM provides the directive <code><nobr>%repl</nobr></code>, which<em>replaces</em> a context with a different name, without touching theassociated macros and labels. So you could replace the destructive code<p><pre>%pop %push   newname</pre><p>with the non-destructive version<code><nobr>%repl newname</nobr></code>.<h4><a name="section-4.7.5">4.7.5 Example Use of the Context Stack: Block IFs</a></h4><p>This example makes use of almost all the context-stack features,including the conditional-assembly construct<code><nobr>%ifctx</nobr></code>, to implement a block IF statement as aset of macros.<p><pre>%macro if 1     %push if     j%-1  %$ifnot %endmacro %macro else 0   %ifctx if         %repl   else         jmp     %$ifend         %$ifnot:   %else         %error  "expected `if' before `else'"   %endif %endmacro %macro endif 0   %ifctx if         %$ifnot:         %pop   %elifctx      else         %$ifend:         %pop   %else         %error  "expected `if' or `else' before `endif'"   %endif %endmacro</pre><p>This code is more robust than the <code><nobr>REPEAT</nobr></code> and<code><nobr>UNTIL</nobr></code> macros given in<a href="#section-4.7.2">section 4.7.2</a>, because it uses conditionalassembly to check that the macros are issued in the right order (forexample, not calling <code><nobr>endif</nobr></code> before<code><nobr>if</nobr></code>) and issues a <code><nobr>%error</nobr></code>if they're not.<p>In addition, the <code><nobr>endif</nobr></code> macro has to be able tocope with the two distinct cases of either directly following an<code><nobr>if</nobr></code>, or following an<code><nobr>else</nobr></code>. It achieves this, again, by usingconditional assembly to do different things depending on whether thecontext on top of the stack is <code><nobr>if</nobr></code> or<code><nobr>else</nobr></code>.<p>The <code><nobr>else</nobr></code> macro has to preserve the context onthe stack, in order to have the <code><nobr>%$ifnot</nobr></code> referredto by the <code><nobr>if</nobr></code> macro be the same as the one definedby the <code><nobr>endif</nobr></code> macro, but has to change thecontext's name so that <code><nobr>endif</nobr></code> will know there wasan intervening <code><nobr>else</nobr></code>. It does this by the use of<code><nobr>%repl</nobr></code>.<p>A sample usage of these macros might look like:<p><pre>        cmp     ax,bx         if ae                cmp     bx,cx                if ae                        mov     ax,cx                else                        mov     ax,bx                endif         else                cmp     ax,cx                if ae                        mov     ax,cx                endif         endif</pre><p>The block-<code><nobr>IF</nobr></code> macros handle nesting quitehappily, by means of pushing another context, describing the inner<code><nobr>if</nobr></code>, on top of the one describing the outer<code><nobr>if</nobr></code>; thus <code><nobr>else</nobr></code> and<code><nobr>endif</nobr></code> always refer to the last unmatched<code><nobr>if</nobr></code> or <code><nobr>else</nobr></code>.<h3><a name="section-4.8">4.8 Standard Macros</a></h3><p>NASM defines a set of standard macros, which are already defined when itstarts to process any source file. If you really need a program to beassembled with no pre-defined macros, you can use the<code><nobr>%clear</nobr></code> directive to empty the preprocessor ofeverything.<p>Most user-level assembler directives (see<a href="nasmdoc5.html">chapter 5</a>) are implemented as macros whichinvoke primitive directives; these are described in<a href="nasmdoc5.html">chapter 5</a>. The rest of the standard macro setis described here.<h4><a name="section-4.8.1">4.8.1 <code><nobr>__NASM_MAJOR__</nobr></code>, <code><nobr>__NASM_MINOR__</nobr></code>, <code><nobr>__NASM_SUBMINOR__</nobr></code> and <code><nobr>___NASM_PATCHLEVEL__</nobr></code>: NASM Version</a></h4><p>The single-line macros <code><nobr>__NASM_MAJOR__</nobr></code>,<code><nobr>__NASM_MINOR__</nobr></code>,<code><nobr>__NASM_SUBMINOR__</nobr></code> and<code><nobr>___NASM_PATCHLEVEL__</nobr></code> expand to the major, minor,subminor and patch level parts of the version number of NASM being used.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频一区二区三区不卡| 日本91福利区| 久久国产尿小便嘘嘘尿| 91性感美女视频| 精品国产一区二区三区久久影院| 综合久久久久综合| 国产福利一区在线观看| 欧美另类一区二区三区| 亚洲男人电影天堂| 懂色av一区二区三区蜜臀| 欧美一卡2卡三卡4卡5免费| 日韩久久一区二区| 粉嫩aⅴ一区二区三区四区五区| 91精品国产入口在线| 亚洲一区二区在线观看视频| 波多野结衣精品在线| 久久精品一区二区三区四区| 麻豆精品一区二区av白丝在线 | 伊人色综合久久天天人手人婷| 国产主播一区二区| 日韩欧美在线1卡| 午夜激情久久久| 欧美制服丝袜第一页| 国产精品国产三级国产| 99在线热播精品免费| 国产精品免费网站在线观看| 高清在线观看日韩| 亚洲国产精品黑人久久久| 国产一区二区主播在线| 久久久久久免费网| 国产乱一区二区| 久久久国产一区二区三区四区小说 | 国产不卡视频在线播放| 国产午夜精品在线观看| 国产91高潮流白浆在线麻豆 | 亚洲人午夜精品天堂一二香蕉| 国产91丝袜在线18| 综合av第一页| 欧美在线观看18| 日韩精品电影一区亚洲| 欧美一级理论片| 国产一区二区三区香蕉| 欧美国产日本视频| 色综合 综合色| 亚洲第一在线综合网站| 4438x亚洲最大成人网| 久久国产欧美日韩精品| 亚洲国产精品二十页| 91在线播放网址| 亚洲超碰精品一区二区| 欧美不卡一区二区| 成人免费高清视频在线观看| 亚洲精品国产一区二区三区四区在线| 在线观看91精品国产入口| 日韩精品久久理论片| 久久综合久久综合久久| av激情综合网| 日韩专区一卡二卡| 国产欧美日韩在线看| 色av一区二区| 麻豆精品国产传媒mv男同| 久久综合国产精品| 一本色道久久综合亚洲91 | 怡红院av一区二区三区| 7777精品久久久大香线蕉| 国产精品1区2区3区在线观看| 亚洲三级在线播放| 日韩免费视频线观看| 91在线精品一区二区三区| 婷婷激情综合网| 欧美国产欧美综合| 欧美精品tushy高清| 国产成人综合视频| 午夜视频在线观看一区二区三区| 久久久精品一品道一区| 欧美网站一区二区| 国产91精品欧美| 看片网站欧美日韩| 一区二区三区av电影| 久久亚洲一级片| 91精品婷婷国产综合久久性色| 成人av电影在线| 久久99久国产精品黄毛片色诱| 亚洲精品视频在线观看网站| 国产人妖乱国产精品人妖| 91麻豆精品国产91久久久使用方法| 成人综合在线视频| 久久精品久久综合| 天天av天天翘天天综合网| 中文字幕日本不卡| 国产亚洲精品精华液| 日韩欧美成人午夜| 欧美顶级少妇做爰| 欧美艳星brazzers| 日本久久一区二区三区| 9l国产精品久久久久麻豆| 狠狠色狠狠色合久久伊人| 婷婷国产在线综合| 五月婷婷另类国产| 亚洲图片自拍偷拍| 一区二区三区在线视频观看| 国产精品不卡一区二区三区| 国产调教视频一区| 国产欧美日韩视频在线观看| 日韩女优av电影在线观看| 91麻豆精品国产91久久久久久久久| 色8久久精品久久久久久蜜| 99天天综合性| 色av成人天堂桃色av| 欧美这里有精品| 欧美三级日韩在线| 欧美日韩一区视频| 欧美一三区三区四区免费在线看| 欧美天堂一区二区三区| 在线观看一区日韩| 欧美日韩不卡一区| 日韩免费电影一区| 精品久久人人做人人爽| 久久亚洲精华国产精华液| 久久女同性恋中文字幕| 国产亚洲短视频| 中文久久乱码一区二区| 最新国产成人在线观看| 亚洲免费电影在线| 亚洲va国产va欧美va观看| 日韩成人精品在线| 精品亚洲免费视频| 国产精品一二三在| 91一区二区三区在线观看| 在线区一区二视频| 欧美xxxx老人做受| 国产精品青草久久| 一区二区三区高清| 天堂va蜜桃一区二区三区| 精品一区二区三区免费播放| 成人av网站免费| 欧美三级在线视频| 欧美tk—视频vk| 中文字幕一区二区5566日韩| 亚洲摸摸操操av| 日本午夜精品视频在线观看| 国产乱淫av一区二区三区| 色狠狠综合天天综合综合| 欧美精品在线视频| 久久午夜电影网| 亚洲午夜久久久久中文字幕久| 青青青伊人色综合久久| 成人免费看的视频| 91麻豆精品国产91久久久久久久久 | 成人在线一区二区三区| 欧美日韩在线观看一区二区| 久久综合999| 亚洲国产综合色| 国产成人av资源| 欧美一区二区国产| 中文字幕在线视频一区| 七七婷婷婷婷精品国产| 波多野结衣91| 欧美电影免费观看高清完整版在线| 中文字幕一区二区三区在线观看| 三级不卡在线观看| 99re视频精品| 精品少妇一区二区三区视频免付费| 亚洲四区在线观看| 国内精品写真在线观看| 欧美午夜电影网| 国产精品初高中害羞小美女文| 日本成人在线看| 欧美在线视频全部完| 亚洲国产精品黑人久久久| 麻豆一区二区三| 欧美日韩一区二区三区四区| 国产精品毛片a∨一区二区三区| 青青草国产成人av片免费| 91网站最新网址| 亚洲国产成人私人影院tom| 免费美女久久99| 欧美日韩高清在线播放| 亚洲精品日日夜夜| 不卡视频一二三| 久久精品欧美一区二区三区麻豆| 日本欧美一区二区| 91精品国产综合久久小美女| 亚洲青青青在线视频| 成人免费福利片| 欧美国产成人在线| 国产精品自拍在线| 精品88久久久久88久久久| 日韩一区精品视频| 欧美伦理视频网站| 日韩福利电影在线| 欧美一二三区在线| 男女性色大片免费观看一区二区| 欧美日韩视频在线第一区| 亚洲愉拍自拍另类高清精品| 色婷婷精品久久二区二区蜜臂av| 中文字幕在线免费不卡| 色综合中文字幕国产 | 亚洲精品一线二线三线无人区| 免费日本视频一区|