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

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

?? preproc.html

?? vid寫的FASM向導
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
<title>FASM Preprocessor Tutorial by vid</title>
</head>

<body>

<center><b>FASM PREPROCESSOR GUIDE</b></center><br><br>


<b>Table of contents:</b><br>
<ul>
<a href=#about><li>0. About this document</a>
<a href=#what_is><li>1. What is preprocessor</a>
<a href=#basic><li>2. Basic preprocessing</a>
<ul type=square>
    <a class="light" href=#comment><li>2.1. Comment ";"</a>
    <a class="light" href=#line_br><li>2.2. Line Break "\"</a>
    <a class="light" href=#include><li>2.3. Directive "include"</a>
    <a class="light" href=#strings><li>2.4. Strings preprocessing</a>
</ul>
<a href=#equates><li>3. Equates</a>
<ul type=square>
    <a class="light" href=#equ><li>3.1. Directive "equ"</a>
    <a class="light" href=#restore><li>3.2. Directive "restore"</a>
</ul>
<a href=#simple_mac><li>4. Simple macros without aruments</a>
<ul type=square>
    <a class="light" href=#simple_def><li>4.1. Simple macro definition</a>
    <a class="light" href=#nested><li>4.2. Nested macros</a>
    <a class="light" href=#purge><li>4.3. Directive "purge" (macro undefinition)</a>
    <a class="light" href=#behave><li>4.4. Macros behavior</a>
</ul>
<a href=#fixed_mac><li>5. Macros with fixed number of arguments</a>
<ul type=square>
    <a class="light" href=#one_arg><li>5.1. Macro with one argument</a>
    <a class="light" href=#more_arg><li>5.2. Macros with more arguments</a>
    <a class="light" href=#local><li>5.3. Directive "local"</a>
    <a class="light" href=#concat><li>5.4. Operator "#" (symbol concatenation)</a>
    <a class="light" href=#to_string><li>5.5. Operator "`"</a>
</ul>
<a href=#group_mac><li>6. Macros with group argument</a>
<ul type=square>
    <a class="light" href=#group_arg><li>6.1. Declaring macro with group argument</a>
    <a class="light" href=#common><li>6.2. Directive "common"</a>
    <a class="light" href=#forward><li>6.3. Directive "forward"</a>
    <a class="light" href=#reverse><li>6.4. Directive "reverse"</a>
    <a class="light" href=#combine><li>6.5. Combining group control directives</a>
    <a class="light" href=#localgrp><li>6.6. Behavior of directive "local" inside macro with group argument</a>
    <a class="light" href=#multiple><li>6.7. Macro with multiple group arguments</a>
</ul>
<a href=#cond><li>7. Preprocessor conditionals</a>
<ul type=square>
    <a class="light" href=#eq><li>7.1. Operator "eq"</a>
    <a class="light" href=#eqtype><li>7.2. Operator "eqtype"</a>
    <a class="light" href=#in><li>7.3. Operator "in"</a>
</ul>
<a href=#struc><li>8. Structures</a>
<a href=#fix><li>9. Fixes</a>
<ul type=square>
    <a class="light" href=#fix_expl><li>9.1. Explaination of fixes</a>
    <a class="light" href=#fix_nest><li>9.2. Using fixes for nested macro declaration</a>
    <a class="light" href=#fix_move><li>9.3. Using fixes for moving part of code</a>
</ul>
</ul>

<a name="about"></a>
<b>0. About this document</b><br>
  I wrote this doc because i saw many people are asking many questions on FASM
  board because not understanding idea or some particular feature of
  preprocessor. (I dont discourage you to ask anything on forum, not
  understanding something is not shame and if your question isn't too hard
  someone will surely reply it).

<br><br>
  Please if you can't understand something from tutorial tell me about it on
<a href="http://board.flatassembler.net/viewtopic.php?t=1178">my tutorial's
thread on FASM board</a> or with <a href="mailto:vid@InMail.sk">email</a> if you like.<br>

<br><br><br>
<a name="what_is"></a>
<b>1. What is preprocessor</b>

<br>
Preprocessor is program (or usualy part of compiler), which modifies your
source code before it is compiled. For example, if you use some piece of
code very often, you can give it some name, and tell preprocessor to replace
name with the piece of code each time.

<br><br>
Another example is, when you want to simulate some instruction which doesn't
exist, you can replace it with set of instructions with same effect
automatically using preprocessor.

<br><br>
Preprocessor scans source and replaces some things with other. But how you
tell it what should it preprocess? For this "preprocessor directives" are
used. We will discuss them now.

<br><br>
Preprocessor doesn't know anything about instructions, compiler directives
etc., it has it's own set of directives and just ignores parts of source not
meant for it.

<br><br><br>
<a name="basic"></a>
<b>2. Basic</b><br>
First I describe basic preprocesing, which is done on file before any other
preprocessing.

<br><br><br>
<a name="comment"></a>
<b>2.1. Comment <code>;</code></b><br>
Like in most assemblers, comments in FASM start with semicolon (<code>;</code>).
Everything up to end of line is ignored and removed from the source.
<br><br>

For example source
<blockquote class="code"><pre>
<font color=#777777>;fill 100h bytes at EDI with zeros</font>
xor eax<font color=#333399>,</font>eax <font color=#777777>;zero value in eax</font>
mov ecx<font color=#333399>,</font><font color=#339933>100h/4</font>
rep stosd
</pre></blockquote>

will after preprocessing become
<blockquote class="code"><pre>
xor eax<font color=#333399>,</font>eax
mov ecx<font color=#333399>,</font><font color=#339933>100h/4</font>
rep stosd
</pre></blockquote>
<br>
<b>NOTE:</b> <code>;</code> can be also comprehended as preprocessor operator
which deletes text behind it up to end of line.<br><br>

<b>NOTE:</b> line that contains only comment won't be deleted, like in my
example. It will become empty line. I skipped empty line because of text
structure. This will be important in next chapter.

<br><br><br>
<a name="line_br"></a>
<b>2.2. Line Break <code>\</code></b><br>
If line seems to be too long for you, you can "break" it with <code>\</code> symbol
(or preprocessor operator). If line ends with <code>\</code> symbol then next line
will be appended to current line.<br><br>

Example:
<blockquote class="code"><pre>
db <font color=#339933>1</font><font color=#333399>,</font><font color=#339933>2</font><font color=#333399>,</font><font color=#339933>3</font><font color=#333399>,\</font>
   <font color=#339933>4</font><font color=#333399>,</font><font color=#339933>5</font><font color=#333399>,</font><font color=#339933>6</font><font color=#333399>,\</font>
   <font color=#339933>7</font><font color=#333399>,</font><font color=#339933>8</font><font color=#333399>,</font><font color=#339933>9</font>
</pre></blockquote>

will be preprocessed to
<blockquote class="code"><pre>
db <font color=#339933>1</font><font color=#333399>,</font><font color=#339933>2</font><font color=#333399>,</font><font color=#339933>3</font><font color=#333399>,</font><font color=#339933>4</font><font color=#333399>,</font><font color=#339933>5</font><font color=#333399>,</font><font color=#339933>6</font><font color=#333399>,</font><font color=#339933>7</font><font color=#333399>,</font><font color=#339933>8</font><font color=#333399>,</font><font color=#339933>9</font>
</pre></blockquote>

<br>
Of course <code>\</code> inside strings or inside comments doesn't concatenate lines,
inside string it is taken as string character (like everything except
ending quote) and comments are deleted up to the end of line without
inspecting what's inside them.
<br><br>
There can't be anything behind <code>\</code> in line, except for blank space and
comment.
<br><br>
In previous chapter i mentioned that line which contains only comment
won't be deleted, it will just become empty line. That means, that code
like this:

<blockquote class="code"><pre>
db <font color=#339933>1</font><font color=#333399>,</font><font color=#339933>2</font><font color=#333399>,</font><font color=#339933>3</font><font color=#333399>,\</font>
<font color=#777777>;   4,5,6,\   - commented</font>
   <font color=#339933>7</font><font color=#333399>,</font><font color=#339933>8</font><font color=#333399>,</font><font color=#339933>9</font>
</pre></blockquote>

will after preprocessing become
<blockquote class="code"><pre>
db <font color=#339933>1</font><font color=#333399>,</font><font color=#339933>2</font><font color=#333399>,</font><font color=#339933>3</font>
<font color=#339933>7</font><font color=#333399>,</font><font color=#339933>8</font><font color=#333399>,</font><font color=#339933>9</font>
</pre></blockquote>

and so it will cause error. To solve situation like this, you must put
line break before comment:
<blockquote class="code"><pre>
db <font color=#339933>1</font><font color=#333399>,</font><font color=#339933>2</font><font color=#333399>,</font><font color=#339933>3</font><font color=#333399>,\</font>
<font color=#333399>\<font color=#777777>;   4,5,6     - validly commented</font></font>
   <font color=#339933>7</font><font color=#333399>,</font><font color=#339933>8</font><font color=#333399>,</font><font color=#339933>9</font>
</pre></blockquote>

which will become
<blockquote class="code"><pre>
db <font color=#339933>1</font><font color=#333399>,</font><font color=#339933>2</font><font color=#333399>,</font><font color=#339933>3</font><font color=#333399>,</font><font color=#339933>7</font><font color=#333399>,</font><font color=#339933>8</font><font color=#333399>,</font><font color=#339933>9</font>
</pre></blockquote>
like we wanted.

<br><br><br>
<a name="include"></a>
<b>2.3. Directive <code>include</code></b><br>
It's syntax:
<blockquote class="code"><pre>
include <font color=#333399>&lt;</font>quoted string <font color=#333399>-</font> file name<font color=#333399>&gt;</font>
</pre></blockquote>

It will insert text file into sources. It allows you to break source into
more files. Of course inserted text will be preprocessed too. File path and
name should be quoted (enclosed in <code>'</code>,<code>'</code> or <code>"</code>,<code>"</code>).<br><br>

Examples:
<blockquote class="code"><pre>
include <font color=#bb0000>'file.asm'</font>
include <font color=#bb0000>'HEADERS\data.inc'</font>
include <font color=#bb0000>'..\lib\strings.asm'</font>
include <font color=#bb0000>'C:\config.sys'</font>
</pre></blockquote>

<br>
You can also access environment variables enclosed in <code>%</code>,<code>%</code>:
<blockquote class="code"><pre>
include <font color=#bb0000>'%FASMINC%\win32a.inc'</font>
include <font color=#bb0000>'%SYSTEMROOT%\somefile.inc'</font>
include <font color=#bb0000>'%myproject%\headers\something.inc'</font>
include <font color=#bb0000>'C:\%myprojectdir%\headers\something.inc'</font>
</pre></blockquote>

<br>
<b>TODO:</b> 1.52 paths system (someone could describe it for me...)

<br><br><br>
<a name="strings"></a>
<b>2.4. Strings preprocessing</b><br>

You may have problem to include <code>'</code> in string declared using <code>'</code>s
or <code>"</code> in string declared using <code>"</code>s. For this reason you must place
the character twice into string, in that case it won't end string and begin next as you
may think, but it will include character into string literaly.

<br><br>
For example:
<blockquote class="code"><pre>
db <font color=#bb0000>'It''s okay'</font>
</pre></blockquote>

will generate binary containing string <code>It's okay</code>.

<br><br>
It's same for <code>"</code>.

<br><br>
<a name="equates"></a>
<b>3. Equates</b>

<br><br>
<a name="equ"></a>
<b>3.1. Directive "equ"</b><br>

Simplest preprocessor command. It's syntax
<blockquote class="code"><pre>
<font color=#333399>&lt;</font>name1<font color=#333399>&gt;</font> equ <font color=#333399>&lt;</font>name2<font color=#333399>&gt;</font>
</pre></blockquote>

This command tells preprocessor to replace every following &lt;name1&gt; with
&lt;name2&gt;.
<br><br>

Example: source
<blockquote class="code"><pre>
count equ <font color=#339933>10</font>  <font color=#777777>;this is preprocessor command</font>
mov ecx<font color=#333399>,</font>count
</pre></blockquote>.

is preprocessed to
<blockquote class="code"><pre>
mov ecx<font color=#333399>,</font><font color=#339933>10</font>
</pre></blockquote>

<br>
Example:
<blockquote class="code"><pre>
mov eax<font color=#333399>,</font>count
count equ <font color=#339933>10</font>
mov ecx<font color=#333399>,</font>count
</pre></blockquote>

is preprocessed to
<blockquote class="code"><pre>
mov eax<font color=#333399>,</font>count
mov ecx<font color=#333399>,</font><font color=#339933>10</font>
</pre></blockquote>

because preprocessor only replaces <code>count</code> behind <code>equ</code> directive.
<br><br>
Even this works:
<blockquote class="code"><pre>
<font color=#339933>10</font> equ <font color=#339933>11</font>
mov ecx<font color=#333399>,</font><font color=#339933>10</font>
</pre></blockquote>

preprocessed to
<blockquote class="code"><pre>
mov ecx<font color=#333399>,</font><font color=#339933>11</font>
</pre></blockquote>

also note that <code>name1</code> can be any symbol. Symbol is just set of
chars, terminated by blank character (space, tab, end of line) or comment
(<code>;</code>) or line-break (<code>\</code>) or operator (including assembly
time operators, not only preprocessor's operators). It can't be operator or
special symbol (like <code>,</code> or <code>}</code> etc.)

<br><br>
<code>name2</code> can be anything, not only one symbol, everything up to end
of line is taken. It can be even empty, then &lt;name1&gt; is replaced by blank
space.<br><br>

Example:
<blockquote class="code"><pre>
<font color=#339933>10</font> equ <font color=#339933>11</font><font color=#333399>,</font><font color=#339933>12</font><font color=#333399>,</font><font color=#339933>13</font>
db <font color=#339933>10</font>
</pre></blockquote>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久精品国产91性色tv| 久久久精品天堂| 久久综合九色综合欧美亚洲| 国产精品久久久久久久久搜平片 | 99久久精品国产精品久久| 欧美色综合影院| 久久精品视频在线看| 天天色天天操综合| youjizz国产精品| 久久久久久综合| 视频一区视频二区中文字幕| 99在线热播精品免费| 久久蜜桃一区二区| 麻豆精品新av中文字幕| 欧美麻豆精品久久久久久| 一色屋精品亚洲香蕉网站| 国产精品系列在线观看| 日韩精品最新网址| 琪琪久久久久日韩精品| 欧美色网一区二区| 一区二区三区中文字幕在线观看| 国产精品一区2区| 欧美精品一区二区久久婷婷| 免费成人你懂的| 7777精品伊人久久久大香线蕉| 亚洲视频在线一区观看| av电影在线不卡| 成人欧美一区二区三区1314| 丰满放荡岳乱妇91ww| 国产欧美日韩在线| 成人性视频网站| 国产色爱av资源综合区| 国产成人综合亚洲91猫咪| 久久麻豆一区二区| 国产精品亚洲а∨天堂免在线| 日韩欧美一级二级三级| 久久精品国产亚洲5555| 日韩精品一区二区三区视频| 精品一区二区三区香蕉蜜桃 | 亚洲福利电影网| 在线视频你懂得一区| 亚洲一区二区三区美女| 欧美日韩一级二级| 日本伊人色综合网| 国产日产欧美一区二区视频| 国产一区二区三区黄视频| 久久久夜色精品亚洲| 国产乱国产乱300精品| 国产日韩成人精品| 91一区二区三区在线观看| 亚洲制服欧美中文字幕中文字幕| 欧美亚洲国产一卡| 日韩电影一二三区| 欧美精品一区二区三区在线播放| 国产老妇另类xxxxx| 亚洲欧美综合网| 欧美午夜片在线观看| 美女视频黄免费的久久 | 黄色日韩网站视频| 欧美激情在线观看视频免费| 91欧美激情一区二区三区成人| 一个色在线综合| 欧美一二三四区在线| 国产成人av影院| 亚洲一区二区三区在线| 精品欧美一区二区久久| 91亚洲精品一区二区乱码| 天天综合网 天天综合色| 久久久久99精品国产片| 色8久久人人97超碰香蕉987| 久久成人免费日本黄色| 亚洲欧美偷拍卡通变态| 欧美xxxxx牲另类人与| 成人app网站| 久久精品国产999大香线蕉| 亚洲国产精品成人综合| 3d动漫精品啪啪一区二区竹菊| 国产激情一区二区三区| 亚洲电影欧美电影有声小说| 日本一区免费视频| 欧美高清一级片在线| av高清不卡在线| 久久99精品国产91久久来源| 一区二区三区**美女毛片| 久久综合色一综合色88| 欧美乱熟臀69xxxxxx| 成人va在线观看| 久久99精品久久久久| 亚洲一区中文在线| 国产精品天美传媒| 日韩免费电影一区| 欧美日韩免费观看一区二区三区| 国产激情精品久久久第一区二区| 性欧美疯狂xxxxbbbb| 日韩毛片高清在线播放| 久久久久综合网| 欧美成人三级电影在线| 欧美人牲a欧美精品| 色综合久久中文字幕| 成人综合婷婷国产精品久久| 久久福利视频一区二区| 日韩在线一区二区三区| 亚洲精选在线视频| 亚洲天堂a在线| 国产精品伦一区| 国产日韩av一区二区| 久久亚洲捆绑美女| 欧美变态tickling挠脚心| 91精品在线观看入口| 欧美性色欧美a在线播放| 91免费看视频| 色先锋资源久久综合| 99久久99久久精品免费看蜜桃| 床上的激情91.| 成人免费视频网站在线观看| 国产成人免费网站| 国产成人av电影在线| 国产高清在线精品| 国产宾馆实践打屁股91| 成人国产精品免费观看视频| 99热精品国产| 色老汉一区二区三区| 在线亚洲+欧美+日本专区| 在线观看视频一区| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲午夜视频在线| 亚洲综合丝袜美腿| 香蕉成人伊视频在线观看| 日韩在线一二三区| 免费av网站大全久久| 蜜臀av一区二区在线免费观看| 青青草国产成人99久久| 激情图区综合网| av电影天堂一区二区在线观看| 成人影视亚洲图片在线| 91在线观看地址| 欧美日韩国产另类不卡| 亚洲精品在线观看视频| 国产精品久久久一区麻豆最新章节| 国产精品久久久久婷婷| 亚洲在线视频一区| 久久精工是国产品牌吗| 懂色av一区二区三区蜜臀| 日本高清不卡视频| 欧美大片一区二区三区| 国产精品进线69影院| 亚洲成人动漫在线观看| 久久av资源网| 91日韩一区二区三区| 欧美一区二区福利视频| 久久精品日韩一区二区三区| 亚洲欧美激情一区二区| 毛片一区二区三区| 97se狠狠狠综合亚洲狠狠| 91精品国产综合久久精品图片| 久久精品欧美一区二区三区不卡 | jvid福利写真一区二区三区| 欧美日韩国产三级| 中文字幕的久久| 石原莉奈在线亚洲二区| 不卡一卡二卡三乱码免费网站 | 99免费精品在线观看| 91精品一区二区三区在线观看| 国产精品久久久久久户外露出| 丝袜诱惑亚洲看片| www.日韩精品| www一区二区| 图片区日韩欧美亚洲| 成人av网站免费| 日韩精品专区在线影院观看| 一区二区三区四区在线播放 | 一区二区三区在线视频免费| 国产揄拍国内精品对白| 欧美高清dvd| 亚洲免费在线播放| 国产精一品亚洲二区在线视频| 8x福利精品第一导航| 亚洲人成伊人成综合网小说| 国产sm精品调教视频网站| 日韩一级二级三级| 亚洲成a人片在线不卡一二三区| 成人国产精品免费观看视频| 久久只精品国产| 蜜桃视频第一区免费观看| 欧美三级三级三级| 一区二区三区在线视频免费| 91麻豆国产福利在线观看| 亚洲精品一区二区在线观看| 日韩极品在线观看| 欧美日韩免费高清一区色橹橹| 亚洲女与黑人做爰| 成a人片国产精品| 久久久久久久av麻豆果冻| 久久se精品一区精品二区| 日韩一本二本av| 久久99久久精品| 久久亚洲精品小早川怜子| 极品少妇一区二区| 欧美精品一区二区三区蜜桃视频| 麻豆视频一区二区|