<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>noish&#45784;&#51032; &#45432;&#53944;</title>
    <link>http://noish.springnote.com/pages</link>
    <description>&#45432;&#51060;&#49772;*^^*&#51032; &#45432;&#53944;</description>
    <language>ko-KR</language>
    <item>
      <title>&#51096; &#51061;&#54784;&#51648;&#51648; &#50506;&#45716; &#44163; &#51221;&#47532;</title>
      <description>&lt;div id="toc" style="background-color: rgb(255, 255, 250); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(210, 180, 140); border-right-color: rgb(210, 180, 140); border-bottom-color: rgb(210, 180, 140); border-left-color: rgb(210, 180, 140); padding-top: 2px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px;"&gt;&lt;strong&gt;&#47785;&#52264;&lt;/strong&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#toc_0" title="toc_0" class="external"&gt;&#50612;&#49480;&#48660;&#47532;, &#51096; &#51061;&#54784;&#51648;&#51648; &#50506;&#45716; &#44163; &#51221;&#47532;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h1&gt;&#50612;&#49480;&#48660;&#47532;, &#51096; &#51061;&#54784;&#51648;&#51648; &#50506;&#45716; &#44163; &#51221;&#47532;&lt;sup class="tocAnchorContainer"&gt;&lt;a href="#toc_0" title="toc_0" class="anchor" id="toc_0" &gt;#&lt;/a&gt;&lt;/sup&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#47928;&#51088;&#50676; &#54532;&#47532;&#48120;&#54000;&#48652; &#47749;&#47161;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#48372;&#54840; &#47784;&#46300; &#54532;&#47196;&#44536;&#47016;&#50640;&#49436;, ESI&#45716; &#51088;&#46041;&#51201;&#51004;&#47196; DS&#44032; &#44032;&#47532;&#53412;&#45716; &#49464;&#44536;&#47676;&#53944;&#50640;&#49436;&#51032; &#50724;&#54532;&#49483;&#51060; &#46104;&#44256;, EDI&#45716; &#51088;&#46041;&#51201;&#51004;&#47196; ES&#44032; &#44032;&#47532;&#53412;&#45716; &#49464;&#44536;&#47676;&#53944; &#45236;&#51032; &#50724;&#54532;&#49483;&#51060; &#46108;&#45796;. DS&#50752; ES&#45716; &#54637;&#49345; &#44057;&#51008; &#44050;&#51004;&#47196; &#49444;&#51221;&#46104;&#44256;, &#51060;&#47484; &#48320;&#44221;&#54624; &#49688; &#50630;&#45796;(&#48152;&#47732;&#50640; &#49892;&#51228; &#51452;&#49548; &#47784;&#46300;&#50640;&#49436;&#51032; ES&#50752; DS&#45716; &#51333;&#51333; ASM &#54532;&#47196;&#44536;&#47000;&#47672;&#50640; &#51032;&#54644;&#49436; &#48320;&#44221;&#46108;&#45796;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;offset&#44284; lea &#52264;&#51060;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;offset&#51008; &#54644;&#45817; &#49464;&#44536;&#47676;&#53944; &#45236;&#50640;&#49436;&#51032; &#50724;&#54532;&#49483; &#44050;&#51012; lea&#45716; effective address(&#50976;&#54952;&#51452;&#49548;, &#49440;&#54805;&#51452;&#49548;?? &#50516;&#53948; &#44536;&#44144;-_-;;;;;)&lt;/li&gt;
&lt;li&gt;&#52280;&#44256; : &lt;a href="http://www.emu8086.com/assembly_language_tutorial_assembler_reference/asm_tutorial_03.html"&gt;http://www.emu8086.com/assembly_language_tutorial_assembler_reference/asm_tutorial_03.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#51452;&#49548;&#51648;&#51221; &#48169;&#49885;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#51593;&#49884; &#51452;&#49548; &#51648;&#51221; &#48169;&#49885;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#50724;&#54140;&#47004;&#46300; &#51088;&#47532;&#50640; &#49345;&#49688;&#47484; &#49324;&#50857;(&#47749;&#47161;&#50612;&#50640; &#47582;&#45716; &#53356;&#44592;&#51032; &#50724;&#54140;&#47004;&#46300;&#47484; &#49324;&#50857;&#54644;&#50556;&#54632;)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mov 'a, %ch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // GAS&lt;/li&gt;
&lt;li&gt;mov ch, 'a'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // MASM&lt;/li&gt;
&lt;li&gt;mov 0x1234, ax&amp;nbsp; // GAS&lt;/li&gt;
&lt;li&gt;mov ax, 1234h&amp;nbsp;&amp;nbsp;&amp;nbsp; // MASM&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#51649;&#51217; &#47700;&#47784;&#47532; &#51452;&#49548; &#51648;&#51221; &#48169;&#49885;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#49548;&#49828; &#54841;&#51008; &#47785;&#51201; &#50724;&#54140;&#47004;&#46300;&#50640; &#47700;&#47784;&#47532; &#51452;&#49548;&#47484; &#51648;&#51221;&#54616;&#45716; 32&#48708;&#53944; &#49345;&#49688;&#47484; &#51665;&#50612; &#45347;&#45716; &#44163;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#50696;&#47484; &#46308;&#47732; K&#46972;&#45716; &#48320;&#49688;&#44032; 8088&#48264;&#51648;&#47484; &#44032;&#47532;&#53412;&#44256; &#51080;&#51012; &#46412; mov al, K &#46972;&#44256; &#54616;&#47732; K(8088&#48264;&#51648;&#50640; &#51080;&#45716;)&#44032; &#44032;&#51648;&#44256; &#51080;&#45716; &#45936;&#51060;&#53552; &#44050;&#51012; al&#51004;&#47196; &#51060;&#46041; &#49884;&#53416;&#45796;.&lt;/li&gt;
&lt;li&gt;movb byteVar, %ch&amp;nbsp;&amp;nbsp;&amp;nbsp; // GAS&lt;/li&gt;
&lt;li&gt;mov ch, byteVar &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; // MASM&lt;/li&gt;
&lt;li&gt;movw wordVar, ax&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // GAS&lt;/li&gt;
&lt;li&gt;mov ax, wordVar&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // MASM&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#47112;&#51648;&#49828;&#53552; &#44036;&#51217; &#51452;&#49548; &#51648;&#51221; &#48169;&#49885;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#50724;&#54140;&#47004;&#46300;&#51032; &#44050;(&#47112;&#51648;&#49828;&#53552;&#51032; &#44050;)&#51060; &#49324;&#50857;&#54616;&#44256;&#51088; &#54616;&#45716; &#47700;&#47784;&#47532;&#51032; &#51452;&#49548;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#47112;&#51648;&#49828;&#53552;&#50640;&#45716; &#51452;&#49548;&#44032; &#46308;&#50612;&#44032; &#51080;&#44256;, &#51060; &#51452;&#49548;&#44032; &#44032;&#47532;&#53412;&#45716; &#44275;&#50640; &#51080;&#45716; &#45936;&#51060;&#53552; &#44050;&#51012; &#44032;&#51648;&#44256; &#50724;&#45912;&#51648; &#51060;&#51901;&#51004;&#47196; &#44050;&#51012; &#50416;&#45912;&#51648; &#54616;&#45716; &#48169;&#49885;&#51060;&#45796;.&lt;/li&gt;
&lt;li&gt;mov al, [eax] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // MASM&lt;/li&gt;
&lt;li&gt;movb (%eax), %al // GAS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#51064;&#45937;&#49828; &#51452;&#49548; &#51648;&#51221; &#48169;&#49885;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;32&#48708;&#53944; &#47112;&#51648;&#49828;&#53552;&#51032; &#44050;&#50640; &#48320;&#49688;&#51032; &#51452;&#49548;(&#48320;&#50948;)&#47484; &#45908;&#54616;&#50668; "&#50976;&#54952;&#51452;&#49548;"(&#52572;&#51333;&#51201;&#51004;&#47196; &#45208;&#50728; &#51452;&#49548;)&#47484; &#44228;&#49328;&#54620;&#45796;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#50696;&#47484; &#46308;&#47732; VarName&#51008; 1100&#48264;&#51648;&#50640; &#51080;&#44256; EBX&#50640;&#45716; 8&#51060; &#51080;&#51004;&#47732; mov al, varName[ebx]&#51008; 1108&#48264;&#51648;(EBX + varName)&#50640; &#51080;&#45716; &#54620; &#48148;&#51060;&#53944;&#47484; AL &#47112;&#51648;&#49828;&#53552;&#47196; &#51069;&#50612; &#46308;&#51060;&#46972;&#45716; &#47749;&#47161;&lt;/li&gt;
&lt;li&gt;mov al, VarName[eax]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // MASM&lt;/li&gt;
&lt;li&gt;movb varName(%eax), al // GAS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&#49828;&#52992;&#51068; &#51064;&#45937;&#49828; &#51452;&#49548; &#51648;&#51221; &#48169;&#49885;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&#51064;&#45937;&#49828; &#51452;&#51312; &#51648;&#51221; &#48169;&#49885;&#44284; &#44057;&#51004;&#47728; 2&#44032;&#51648; &#52264;&#51060;&#51216;&#51012; &#48372;&#51064;&#45796;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#47112;&#51648;&#49828;&#53552; 2&#44060;&#47484; &#54633;&#52432;&#49436; &#48320;&#50948;&#50640; &#45908;&#54624; &#49688; &#51080;&#45796;&lt;/li&gt;
&lt;li&gt;&#51064;&#45937;&#49828; &#47112;&#51648;&#49828;&#53552;&#50640; 1, 2, 4, 8&#51012; &#44273;&#54624; &#49688; &#51080;&#45796;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;mov eax, varName[ebx + esi * 4] // MASM&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#52264;&#51060;&#51216;&#51060; &#48156;&#49373;&#54616;&#45716; &#44275;&#51008; esi * 4&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#47749;&#47161;&#50612;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;mov dword ptr[ebp - 4], 1&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;1&#51012; ebp-4 &#50948;&#52824;&#50640; &#45347;&#51004;&#46972;&#45716; &#44163;!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ebp-4&#47564; &#54616;&#44172; &#46104;&#47732; mov&#45716; &#50734;&#44592;&#47140;&#45716; &#45936;&#51060;&#53552;&#51032; &#53356;&#44592;&#47484; &#50508; &#49688; &#50630;&#51004;&#48064;&#47196; &#50526;&#50640; &#45936;&#51060;&#53552;&#54805;&#51012; &#47749;&#49884;&#54644;&#51480;&#50556; &#54620;&#45796;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;rep stos dword ptr[edi]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ecx&#44032; 0&#51060; &#46112; &#46412;&#44620;&#51648; eax&#50640; &#51080;&#45716; &#45236;&#50857;&#51012; edi&#50640; dword &#53356;&#44592; &#47564;&#53372; &#48373;&#49324;(&#48373;&#49324;&#54624;&#46412; &#47560;&#45796; edi&#45716; &#51068;&#51221;&#54616;&#44172; &#51613;&#44032;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;shl edx, 1&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2&#51652;&#49688;&#51032; &#44273;&#54616;&#44592; 2 (&#49772;&#54532;&#53944;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&#54632;&#49688; &#54840;&#52636;&#49884; &#49828;&#53469; &#44396;&#51312;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="text-align: center;"&gt;&lt;img title="ss.JPG" class="attachment" src="/pages/994974/attachments/475790" alt="ss.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Wed, 10 Sep 2008 15:22:49 +0900</pubDate>
      <link>http://noish.springnote.com/pages/1112004</link>
      <guid>http://noish.springnote.com/pages/1112004</guid>
    </item>
    <item>
      <title>QT/KDevelop</title>
      <description>&lt;h1&gt;Hello QT!!!&lt;/h1&gt;
&lt;p&gt;&#50836;&#51608; &#51060;&#44163; &#51200;&#44163; &#47564;&#51256; &#48372;&#45716; &#51116;&#48120;&#47196; &#49332;&#44256; &#51080;&#45796; :) &#44148;&#46300;&#47140; &#48372;&#45796;... QT&#44620;&#51648; &#47564;&#51256; &#48372;&#44172; &#46104;&#50632;&#45716;&#45936;...&lt;/p&gt;
&lt;p&gt;&#53216;&#48516;&#53804; 8.04 &#50640;&#49436; QT4 &#44288;&#47144; &#54056;&#53412;&#51648;&#47484; &#47784;&#46160; &#49444;&#52824;&#54616;&#44256; &#52293;&#51012; &#46384;&#46972; &#54664;&#45716;&#45936;... &#50500;&#47924;&#47532; gcc &#46028;&#47140;&#46020; &#46104;&#51648; &#50506;&#50520;&#45796; &#12640;&#12640;&lt;/p&gt;
&lt;p&gt;&#50500;~ &#52293;&#51060; &#51096;&#47803;&#46108;&#44148;&#44032;??? &#54616;&#44256; &#44396;&#44544;&#51656;&#51012; &#54644;&#48420;&#45716;&#45936;... &lt;a href="http://pascalg.wordpress.com/2008/04/08/qt4-on-kubuntu-getting-started/" class="external" title="http://pascalg.wordpress.com/2008/04/08/qt4-on-kubuntu-getting-started/"&gt;&#51060; &#49324;&#51060;&#53944;&lt;/a&gt;&#47484; &#48156;&#44204;&#54644;&#49436; &#54644;&#44208;&#54624; &#49688; &#51080;&#50632;&#45796;. &#44144;&#44592;&#50640; &#48372;&#45768;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://doc.trolltech.com/4.3/tutorial.html" class="external" title="http://doc.trolltech.com/4.3/tutorial.html"&gt;&#44277;&#49885; &#53916;&#53664;&#47532;&#50620;&lt;/a&gt;&#46020; &#51080;&#51648; &#50506;&#51008;&#44032;... &#50516;&#53948; &#46384;&#46972;&#54644;&#49436; &#49892;&#54665;&#54664;&#45716;&#45936; &#51096;&#46104;&#45716; &#44163;&#51060; &#50500;&#45772;&#44032; &#12636;&#12636; &#55136;...&lt;/p&gt;
&lt;p&gt;&#46124;&#45716;&#45936; &#50780;-_-&#46096;&#45716;&#51648;&#45716; &#51096; &#47784;&#47476;&#44192;&#45796;. QT3&#50752; QT4&#51032; &#52264;&#51060;&#51064;&#44032;--aa&lt;/p&gt;
&lt;p&gt;&#50516;&#53948; &#51060;&#47111;&#44172; &#54644;&#49436; &#50500;&#47000; &#52376;&#47100; &#54764;&#47196;&#50864; &#53328;&#54000; &#50696;&#51228; &#54532;&#47196;&#44536;&#47016;&#51060; &#49892;&#54665;&#46104;&#50632;&#44256;&lt;/p&gt;
&lt;p&gt;Dev, Dev.pro, Makefile, hello.cpp, hello.o &#54028;&#51068;&#51060; &#49373;&#49457;&#46104;&#50632;&#45796;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;#include &amp;lt;QApplication&amp;gt;&lt;br /&gt;
#include &amp;lt;QLabel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char** argv)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; QApplication app(argc, argv);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; QLabel *hello = new QLabel("&amp;lt;font color=blue&amp;gt;Hello&amp;lt;i&amp;gt;QT!&amp;lt;/i&amp;gt;" "&amp;lt;/font&amp;gt;", 0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; hello-&amp;gt;show();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return app.exec();&lt;br /&gt;
}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img title="hello_qt.jpg" class="attachment" src="/pages/1114098/attachments/478616" alt="hello_qt.jpg" /&gt;&lt;/p&gt;
</description>
      <pubDate>Fri, 25 Apr 2008 11:19:07 +0900</pubDate>
      <link>http://noish.springnote.com/pages/1114098</link>
      <guid>http://noish.springnote.com/pages/1114098</guid>
    </item>
    <item>
      <title> &#48120;&#53804;&#45936;&#51060; &#44544; &#51089;&#49457; &#49884;&#44036;&#51012; &#48516;&#49437;&#54644;&#49436; &#47564;&#46304; &#44536;&#47000;&#54532; </title>
      <description>&lt;h1&gt;&#48120;&#53804;&#45936;&#51060; &#44544; &#51089;&#49457; &#49884;&#44036;&#51012; &#48516;&#49437;&#54644;&#49436; &#47564;&#46304; &#44536;&#47000;&#54532;&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&#48120;&#53804;&#45936;&#51060;&#50640; &#51648;&#51221;&#54620; &#54168;&#51060;&#51648;&#50640; &#51217;&#49549;&#54644;&#49436; &#44544; &#51089;&#49457;&#54620; &#49884;&#44036;&#51012; &#48977;&#50500;&#49436; &#45936;&#51060;&#53440; &#54028;&#51068;&#47196; &#47564;&#46304; &#54980;&lt;/p&gt;
&lt;p&gt;&#44536;&#47000;&#54532; &#46972;&#51060;&#48652;&#47084;&#47532;&#47484; &#51060;&#50857;&#54616;&#50668; &#44536;&#47140; &#48372;&#50520;&#45796;~&amp;nbsp; (&#49900;&#49900;&#54644;&#49436;...=&#12613;&#12636;)&lt;/p&gt;
&lt;p&gt;&#49900;&#49900;&#54644;&#49436; &#44536;&#47140; &#48372;&#44592;&#45716; &#54664;&#51648;&#47564;... &#51116;&#48120;&#51080;&#45796;~&amp;nbsp;&amp;nbsp; &#45796;&#51020;&#50640;&#45716; &#47952; &#44536;&#47140;&#48380;&#44620;? ^^;&lt;/p&gt;
&lt;p&gt;&#51089;&#49457; &#49884;&#44036;&#51012; &#48372;&#45768;... &#50724;&#51204; 8&#49884;&#50640;&#49436; &#50724;&#54980; 8&#49884;&#45824;&#50640; &#47566;&#51060; &#45440;&#50520;&#44396;&#45208;-_-;;&lt;/p&gt;
&lt;p&gt;&#51328; &#51088;&#51228;&#54616;&#44256;...&amp;nbsp; &#49373;&#49328;&#51201;&#51064; &#51068;&#51012; &#54644;&#48372;&#51088; &#12622;&#12622;&#12622; ^^;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img class="attachment" title="2381798435_857728c90b.jpg" src="/pages/1110352/attachments/475798" alt="2381798435_857728c90b.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&#50500;&#47000;&#45716; &#48120;&#53804;&#45936;&#51060;&#51032; &#44228;&#51221;&#50640; &#51217;&#49549;&#54644;&#49436; &#45216;&#51676;&#47484; &#44545;&#50612; &#50724;&#45716; &#49548;&#49828;&lt;/strong&gt;=_=&lt;br /&gt;
urllib, sys, re, BeautifulSoup &#46972;&#51060;&#48652;&#47084;&#47532;&#47484; &#51060;&#50857;~&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
import urllib&lt;br /&gt;
import sys&lt;br /&gt;
import re&lt;br /&gt;
from BeautifulSoup import BeautifulSoup&lt;br /&gt;
&lt;br /&gt;
# user's account name&lt;br /&gt;
account_name = 'lovenoish'&lt;br /&gt;
me2day_url = 'http://me2day.net/'&lt;br /&gt;
me2day_url = me2day_url + account_name&lt;br /&gt;
fetch_page = urllib.urlopen(me2day_url).read()&lt;br /&gt;
&lt;br /&gt;
while(1):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; soup = BeautifulSoup(fetch_page)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #cal_year&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_year = soup('span', {'class':'cal_year',})&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_year = re.search(r'&amp;gt;(\d*)&amp;lt;', str(cal_year)).group(1)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #cal_month&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_month = soup('span', {'class':'cal_month',})&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_month = re.search(r'&amp;gt;([a-zA-Z]*)&amp;lt;', str(cal_month)).group(1).upper()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_month_data = {'JAN':'1', 'FEB':'2', 'MAR':'3', 'APR':'4', 'MAY':'5', 'JUN':'6', 'JUL':'7', 'AUG':'8', 'SEP':'9', 'OCT':'10', 'NOV':'11', 'DEC':'12'}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_month = cal_month_data.get(cal_month)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #cal_day&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_day = soup('div', {'class':'cal_day',})&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cal_day&amp;nbsp; = re.search(r'&amp;gt;(\d*)&amp;lt;', str(cal_day)).group(1)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; # nextpage link&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; nextpage_link = soup('li', {'id':'prev_list',})&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; # In lastpage, attribute error why?&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; me2day_url = "http://me2day.net" + re.search(r'href="(.*?)"', str(nextpage_link)).group(1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; x = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # time&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_time = soup('a', {'rel':'bookmark',})[x]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except IndexError:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fetch_page = urllib.urlopen(me2day_url).read()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break # while break and go to the first While (Fetch nextpage)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except NameError: # nextpage not exist so Program exit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys.exit()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_time = str(written_time).split('#')&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_time = str(written_time[1]).split("\"")&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_time = str(written_time[0]).split(":")&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_hour = written_time[0]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_minute = written_time[1]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_second = written_time[2]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # need to modify&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if int(written_hour) &amp;lt; 12:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_ampm = 'am'&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; written_ampm ='pm'&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "data:" + written_hour + ":" + written_ampm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = x + 1&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&#50500;&#47000;&#45716; &#44545;&#50612;&#50728; &#45936;&#51060;&#53440;&#47484; &#44592;&#48152;&#51004;&#47196; &#44536;&#47000;&#54532;&#47484; &#44536;&#47140;&#51452;&#45716; &#49548;&#49828;&lt;/strong&gt; ==)/&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
import gdchart&lt;br /&gt;
&lt;br /&gt;
x = gdchart.Line()&lt;br /&gt;
x.bg_color = 0xffffff&lt;br /&gt;
x.width = 500&lt;br /&gt;
x.height = 500&lt;br /&gt;
x.xtitle = "Time"&lt;br /&gt;
x.ytitle = "Value"&lt;br /&gt;
x.title = "Me2day Graph"&lt;br /&gt;
&lt;br /&gt;
f = open("me2day_lovenoish_data.txt")&lt;br /&gt;
line = f.readline()&lt;br /&gt;
&lt;br /&gt;
dataBox = []&lt;br /&gt;
for tmpX in range(24):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dataBox.append(0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
while line:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; data_time = line.split(":")&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if data_time[0] == "data":&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int_data_time = abs(int(data_time[1]))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataBox[int_data_time-1] = dataBox[int_data_time-1] + 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; line = f.readline()&lt;br /&gt;
&lt;br /&gt;
x.setData(dataBox)&lt;br /&gt;
x.setLabels(["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23", "24"] )&lt;br /&gt;
x.draw("simple.jpg")&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&#44536;&#47111;&#44172; &#51096;&#47564;&#46304; &#53076;&#46300;&#45716; &#50500;&#45768;&#51648;&#47564;... &#45208;&#47492; &#47564;&#51313; &#12622;&#12622;&#12622; ^_^;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&#47560;&#51648;&#47561;&#51004;&#47196;... &#48376; &#49548;&#49828;&#47484; &#46028;&#47532;&#47732; &#48120;&#53804;&#45936;&#51060; &#54644;&#45817; &#44228;&#51221;&#51032; &#52852;&#50868;&#53552;&#44032; &#51221;&#49888; &#50630;&#51060; &#50732;&#46972; &#44036;&#45796;...-_-;;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Thu, 24 Apr 2008 17:55:32 +0900</pubDate>
      <link>http://noish.springnote.com/pages/1110352</link>
      <guid>http://noish.springnote.com/pages/1110352</guid>
    </item>
    <item>
      <title>PyGDChart Tutorial</title>
      <description>&lt;h1&gt;Getting Started&lt;/h1&gt;
&lt;p&gt;This section gives a quick overview of the features of the PyGDChart library by working through a simple example. We first show the example program, and the graph it produces, in full. Then we proceed with a line-by-line analysis, introducing the basic workings of PyGDChart as we go along.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51060; &#49465;&#49496;&#51008; &#44036;&#45800;&#54620; &#50696;&#51228;&#47484; &#53685;&#54644;&#49436; PyGDChart &#46972;&#51060;&#48652;&#47084;&#47532;&#50640; &#45824;&#54644;&#49436; &#48736;&#47476;&#44172; &#53945;&#51669;&#46308;&#50640; &#45824;&#54644;&#49436; &#50508;&#47140;&#51452;&#47140;&#44256; &#54633;&#45768;&#45796;. &#52395;&#48264;&#51116;&#47196; &#50864;&#47532;&#45716; &#50696;&#51228; &#54532;&#47196;&#44536;&#47016;&#51012; &#48372;&#50668;&#51469;&#45768;&#45796;. &#44536;&#47532;&#44256; &#51060; &#50696;&#51228;&#45716; &#51088;&#49464;&#55176;(?)&amp;nbsp;&#44536;&#47000;&#54532;&#47484; &#47564;&#46308;&#51648;&#50836;. &#44536;&#47532;&#44256; &#50864;&#47532;&#45716; &#51460; &#45800;&#50948;&#47196; &#48516;&#49437;&#51012; &#54616;&#44256; &#44536;&#47532;&#44256; PyGDChart&#47196; &#51089;&#46041;&#54616;&#45716; &#44592;&#48376; &#50896;&#47532;&#50640; &#45824;&#54644;&#49436; &#49548;&#44060;&#54616;&#47140;&#44256; &#54633;&#45768;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;The Code&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img title="simple.png" class="attachment" src="/pages/1001304/attachments/422058" alt="simple.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;import gdchart&lt;br /&gt;
x = gdchart.Bar3D()&lt;br /&gt;
x.width = 250&lt;br /&gt;
x.height = 250&lt;br /&gt;
x.xtitle = "Weekday"&lt;br /&gt;
x.ytitle = "Percentage"&lt;br /&gt;
x.title = "Example Graph"&lt;br /&gt;
x.ext_color = [ "white", "yellow", "red", "blue", "green"]&lt;br /&gt;
x.setData([20, 100, 80, 30, 50])&lt;br /&gt;
x.setLabels(["Mon", "Tue", "Wed", "Thu", "Fri"])&lt;br /&gt;
x.draw("simple.png")&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Explanation&lt;/h2&gt;
&lt;h3&gt;Choosing a Chart Class&lt;/h3&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x = gdchart.Bar3D()&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The PyGDChart library is based around a number of chart classes, each of which represents a different chart style. The first step in using PyGDChart is usually to instantiate one of these classes. In this case, we will be drawing a 3D bar graph.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&amp;nbsp;PyGDChart&amp;nbsp; &#46972;&#51060;&#48652;&#47084;&#47532;&#45716; &#49688;&#12616; &#47566;&#51008; &#52264;&#53944; &#53364;&#47000;&#49828;&#50640;... &#44592;&#48152;&#54616;&#44256; &#51080;&#51004;&#47728;, &#44033; &#53364;&#47000;&#49828;&#46308;&#51008; &#45796;&#47480; &#52264;&#53944; &#49828;&#53440;&#51068;&#51012; &#48372;&#50668;&#51456;&#45796;. &#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#47484; &#51060;&#50857;&#54620; &#52395; &#48264;&#51704; &#49828;&#53597;&#51008; &#51060; &#53364;&#47000;&#49828;&#46308; &#51473;&#50640;&#49436; &#54616;&#45208;&#47196; &#50696;&#49884;&#47484; &#46308;&#47140;&#44256; &#54620;&#45796;. &#51060; &#44221;&#50864;&#50640; &#50864;&#47532;&#45716; 3D&#48148; &#44536;&#47000;&#54532;&#47484; &#44536;&#47540;&#47140;&#44256; &#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Setting Options&lt;/h3&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x.width = 250&lt;br /&gt;
&lt;br /&gt;
x.height = 250&lt;br /&gt;
&lt;br /&gt;
x.xtitle = "Weekday"&lt;br /&gt;
&lt;br /&gt;
x.ytitle = "Percentage"&lt;br /&gt;
&lt;br /&gt;
x.title = "Example Graph"&lt;br /&gt;
&lt;br /&gt;
x.ext_color = [ "white", "yellow", "red", "blue", "green"]&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Although they look like simple object attributes, PyGDChart options are actually "smart" properties. Whenever you assign to, or retreive the value of, an option, a certain amount of checking and conversion code is run. This allows us to ensure that values assigned to options are appropriate - for instance, we can prevent a user from assigning a string to an option when the underlying C library expects an integer.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&amp;nbsp;&#50948; &#50640; &#51080;&#45716; &#44163;&#46308;&#51008; &#44036;&#45800; &#50724;&#48652;&#51229;&#53944; &#49549;&#49457;&#51012; &#44032;&#51648;&#44256; &#51080;&#44592;&#45716; &#54616;&#51648;&#47564;, &#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#51032; &#50741;&#49496;&#51008; &#49892;&#51228;&#47196; "&#49828;&#47560;&#53944;" &#49549;&#49457;&#51012; &#44032;&#51648;&#44256; &#51080;&#45796;. &#45817;&#49888;&#51060; &#54869;&#49892;&#54620; &#50577;&#51032; &#52404;&#53433;&#54616;&#44592; &#44050;(&#50741;&#49496;)&#51012; &#54624;&#45817;&#51012; &#46608;&#45716; &#44160;&#49353;&#51012; &#50616;&#51228;&#54616;&#46304;&#51648; &#44036;&#50640; &#44536;&#47532;&#44256; &#52968;&#48260;&#51260; &#53076;&#46300;&#45716; &#49892;&#54665;&#54620;&#45796;.(&#50669;, &#47924;&#49832; &#47568;&#51064;&#51648;) &#51060; &#44163;&#51008; &#50696;&#47484; &#46308;&#47732; &#50864;&#47532;&#50640;&#44172; &#44050;&#51060; &#51221;&#54869;&#54620; &#50741;&#49496;&#51012; &#54624;&#45817;&#54616;&#45716; &#44163;&#50640; &#45824;&#54644;&#49436; &#48372;&#51109;&#54644;&#51456;&#45796;. &#44536;&#47000;&#49436; &#44540;&#50896;&#51201;&#51064; C&#46972;&#51060;&#48652;&#47084;&#47532;&#45716; integer&#47484; &#44592;&#45824;&#54624;&#46412; &#50864;&#47532;&#45716; &#50976;&#51200;&#44032; &#47928;&#51088;&#50676;&#51012; &#50741;&#49496;&#50640; &#54624;&#45817;&#54616;&#45716; &#44163;&#51012; &#47561;&#51012; &#49688;&#44032; &#51080;&#45796;.(&#50669;, -_-a &#12640;&#12640;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;"Smart" options can also make things more convenient by performing some types of automatic data conversion. Note that the code snippet above uses descriptive names to specify colours. In the underlying library, however, colours are stored as integers - colour names are converted to the appropriate integer values on assignment. PyGDChart's colour handling capabilities are discussed in greater depth &lt;a&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;later&lt;/span&gt;&lt;/a&gt; in this manual.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;" &#49828;&#47560;&#53944;" &#50741;&#49496;&#51008; &#47932;&#47200; &#47751;&#47751; &#53440;&#51077;&#46308;&#51064; &#51088;&#46041; &#45936;&#51060;&#53440; &#52968;&#48260;&#51260;&#49828;&#47484; &#49688;&#54665;&#54632;&#51004;&#47196;&#50024; &#51060;&#47084;&#54620; &#44163;&#46308;&#51012; &#51328;&#45908; &#54200;&#47532;&#54616;&#44172; &#47564;&#46308; &#49688; &#51080;&#45796;. &#50948;&#50640; &#51080;&#45716; &#50557;&#44036;&#51032; &#53076;&#46300;&#46308;&#51008; &#52972;&#47196;&#47084; &#54364;&#49884;&#46104;&#50612;&#51652; &#49444;&#47749;&#51201;&#51064;-_- &#51060;&#47492;&#51012; &#49324;&#50857;&#54620;&#45796;. &#44536; &#44592;&#52488;&#47484; &#51060;&#47336;&#45716; &#46972;&#51060;&#48652;&#47084;&#47532;&#50640;&#49436; &#44536;&#47084;&#45208; &#49353;&#44628;&#51008; &#51221;&#49688;&#47196; &#51200;&#51109;&#46104;&#50612; &#51652;&#45796; - &#49353;&#44628;&#47196;&#46108; &#51060;&#47492;&#46308;&#51008; &#54624;&#45817;&#46104;&#50612;&#51652; &#44163;&#50640; &#45824;&#54644;&#49436; &#51221;&#54869;&#54616;&#44172; &#51221;&#49688;&#47196; &#51200;&#51109;&#46108;&#45796;. PyGDChart&#51032; &#52972;&#47084; &#54648;&#46308;&#47553; &#44032;&#45733;&#49457;&#51008; &#45208;&#51473;&#50640; &#51060; &#47700;&#45684;&#50620;&#50640;&#49436; &#44618;&#51060; &#51080;&#44172; &#51060;&#50556;&#44592;&#46104;&#50612;&#51652;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Data and Labels&lt;/h3&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x.setData([20, 100, 80, 30, 50])&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each chart type has a .setData() method, but different chart types may require different data formats. Bar graphs, like the one in the example, can be specified using one or more lists of values. If were drawing a &lt;a&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;floating bar graph&lt;/span&gt;&lt;/a&gt;, however, the data format would be more complex, since we would have to specify both the upper and lower bounds for every bar. The data requirements for the various chart types are discussed in the appropriate sections elsewhere in this manual.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51312;&#44552;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#44033; &#52264;&#53944; &#53440;&#51077;&#51008;&amp;nbsp;setData() &#47700;&#49548;&#46300;&#47484; &#44032;&#51652;&#45796; &#44536;&#47084;&#45208; &#45796;&#47480; &#52264;&#53944; &#53440;&#51077;&#46308;&#51008; &#45796;&#47480; &#45936;&#51060;&#53440; &#54252;&#47607;&#51012; &#50836;&#44396;&#54620;&#45796;. &#50696;&#51228;&#50640;&#49436; &#51080;&#45716; &#48148; &#44536;&#47000;&#54532; &#52376;&#47100;, &#51060;&lt;/span&gt; &#44163;&#51008; &#45908; &#48373;&#51105;&#54616;&#45796; &#47784;&#46304; &#48148;&#50640;&#49436; &#50948; &#50500;&#47000; &#48148;&#50868;&#46300; &#47784;&#46160;&#47484; &#44592;&#49696;&#54644;&#50556; &#54616;&#44592; &#46412;&#47928;&#51060;&#45796;. &#45796;&#50577;&#54620; &#52264;&#53944; &#53440;&#51077;&#50640; &#45824;&#54620; &#45936;&#51060;&#53440; &#50836;&#44396;&#45716; &#51060; &#47700;&#45684;&#50620;.. &#45796;&#47480; &#44275;&#51064;... &#51221;&#54869;&#54620; &#49465;&#49496;&#50640;&#49436; &#51060;&#50556;&#44592;&#44032; &#46104;&#50612;&#51656; &#44163; &#51060;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x.setLabels(["Mon", "Tue", "Wed", "Thu", "Fri"])&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The .setLabels method is used to specify the labels that appear on the X axis of a graph. In order to avoid ambiguity, PyGDChart ensures that the number of labels conforms with the number of data points along the X axis.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;setLable &#47700;&#49548;&#46300;&#45716; &#44536;&#47000;&#54532;&#51032; X &#51340;&#54364;&#50640; &#45208;&#53440;&#45208;&#45716; &#46972;&#48296;&#50640; &#44592;&#49696;&#54616;&#45716;&#45936; &#49324;&#50857;&#46104;&#50612; &#51652;&#45796;. &#47784;&#54840;&#54632;&#51012; &#50630;&#50640;&#44592; &#50948;&#54644;&#49436; &#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#45716; &#47566;&#51008; &#46972; &#48296;&#51060; X&#51340;&#54364;&#47484; &#46384;&#47480; &#47566;&#51008; &#45936;&#51060;&#53440; &#51216;&#46308;&#51012; &#46384;&#47476;&#45716; &#44163;&#51012; &#48372;&#51613;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Common Interface&lt;/h1&gt;
&lt;p&gt;All graph and pie classes share a common basic interface:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#47784;&#46304; &#44536;&#47000;&#54532;&#50752; &#54028;&#51060; &#53364;&#47000;&#49828;&#45716; &#53092;&#50728; &#48288;&#51060;&#51649; &#51064;&#53552;&#54168;&#47532;&#47484; &#44277;&#50976;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;setOption(option, value)&lt;/h3&gt;
&lt;p&gt;Set an option by option name and value. This method also does data type conversion (see the discussion of &lt;a&gt;colour handling&lt;/a&gt;), and type conformance checks.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#50741;&#49496; &#51060;&#47492; &#44536;&#47532;&#44256; &#44050;&#50640; &#51032;&#54644; &#50741;&#49496;&#51012; &#49483;&#54021;&#54620;&#45796;. &#51060; &#47700;&#49548;&#46300;&#45716; &#47932;&#47200; &#45936;&#51060;&#53440; &#53440;&#51077; &#52968;&#48264;&#51260;&#49828;&#47484; &#54620;&#45796;. (&#52972;&#47084; &#54648;&#46308;&#47553;&#46412; &#48372;&#51088;) &#44536;&#47532;&#44256; &#53440; &#51077; &#51068;&#52824;&#47484; &#52404;&#53356;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;getOption(option)&lt;/h3&gt;
&lt;p&gt;Retrieve the value of an option by name.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#50741;&#49496;&#51032; &#44050;&#51008; &#51060;&#47492;&#50640; &#51032;&#54644;&#49436; &#44160;&#49353;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;getAllOptions()&lt;/h3&gt;
&lt;p&gt;Retrieve a dictionary of all option-value pairs.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#49324;&#51204;&#54805;&#51032; &#47784;&#46304; &#50741;&#49496;&#44050;&#51008; &#51677;&#51004;&#47196; &#44160;&#49353;&#54620;&#45796;&lt;/span&gt;.&lt;/p&gt;
&lt;h3&gt;restoreDefaultOptions()&lt;/h3&gt;
&lt;p&gt;Restore the values of all options to the defaults for this graph type.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51060; &#44536;&#47000;&#54532; &#53440;&#51077;&#51012; &#50948;&#54644;&#49436; &#47784;&#46304; &#50741;&#49496; &#44050;&#51012; &#44592;&#48376;&#44050;&#51004;&#47196; &#48373;&#44396;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;setLabels([label1, label2, ...])&lt;/h3&gt;
&lt;p&gt;Set the X-axis labels for Graph types, and per-slice labels for Pie charts. The number of arguments passed to this function should correspond with the number of discrete data points to be plotted.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#44536;&#47000;&#54532; &#53440;&#51077;&#51012; &#50948;&#54620; X &#51340;&#54364; &#46972;&#48296;&#51012; &#44536;&#47532;&#44256; &#54028;&#51060; &#52264;&#53944;&#47484; &#50948;&#54620; per-slice &#46972;&#48296;&#51012; &#49483;&#54021;&#54620;&#45796;. &#51060; &#54632;&#49688;&#47484; &#53685;&#44284;&#54616;&#45716; &#47566;&#51008; &#51064;&#51088;&#46308;&#51008; &#51340;&#54364;&#50640; &#44536;&#47140;&#51652; &#47566;&#51008; &#48516;&#47532;&#46108; &#45936;&#51060;&#53440; &#51216;&#50640; &#45824;&#51025;&#46104;&#50612;&#50556; &#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;setData(data1, [data2, ...])&lt;/h3&gt;
&lt;p&gt;Set the data to be charted. The data format expected differs from chart type to chart type - please see the corresponding chart section for more information.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#45936;&#51060;&#53440;&#47484; &#52264;&#53944;&#54868;&#54620;&#45796;. &#50696;&#49345;&#46104;&#50612;&#51652; &#45936;&#51060;&#53440; &#54252;&#47607;&#51008; &#52264;&#53944; &#53440;&#51077;&#44284; &#52264;&#53944; &#53440;&#51077;&#44036;&#50640; &#45796;&#47476;&#45796;. &#51328; &#45908; &#51088;&#49464;&#54620; &#44163;&#51008; &#45824;&#51025;&#46104;&#45716; &#52264;&#53944; &#49465;&#49496;&#51012; &#48372;&#46972;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;draw(filespec)&lt;/h3&gt;
&lt;p&gt;Draw the graph to the specified file. If the filespec argument is a string, it will be treated as the path to a file. Otherwise, filespec is&lt;/p&gt;
&lt;p&gt;assumed to be a Python file object.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#54028;&#51068;&#44592;&#49696;&#46104;&#50612;&#51652; &#54028;&#51068;&#50640; &#44536;&#47000;&#54532;&#47484; &#44536;&#47536;&#45796;. &#54028;&#51068; &#49828;&#53581; &#51064;&#51088;&#44032; &#47928;&#51088;&#50676;&#51060;&#47732; &#54028;&#51068;&#50640; &#44221;&#47196;&#47196;&#49436; &#51312;&#51221;&#51060; &#46104;&#50612;&#51652;&#45796;. &#47564;&#50557; &#44536;&#47111;&#51648; &#50506;&#51004;&#47732; &#54028;&#51068; &#49828;&#54169;&#51008; &#54028;&#51060;&#50028; &#50724;&#48652;&#51229;&#53944;&#47196;&#49436; &#44032;&#51221;&#46104;&#50612; &#51652;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Options as properties&lt;/h2&gt;
&lt;p&gt;All options are also exposed as properties. Getting and setting an option as a property, is functionally identical to making the corresponding getOption and setOption calls.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#47784;&#46304; &#50741;&#49496;&#51008; &#47932;&#47200; &#49549;&#49457;&#51004;&#47196;&#49436; &#45432;&#52636;&#46104;&#50612; &#51080;&#45796;. &#49549;&#49457;&#51004;&#47196;&#49436; &#50741;&#49496;&#51012; &#50619;&#44144;&#45208; &#49483;&#54021;&#54616;&#45716; &#44163;&#51008; &#45824;&#51025;&#46104;&#45716; getOption &#51060;&#45208; setOption&#51012; &#53084;&#54616;&#45716; &#44163;&#51004; &#44592;&#45733;&#51201;&#51004; &#47196; &#46041;&#51068;&#54616;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Graphs&lt;/h1&gt;
&lt;p&gt;PyGDChart exposes a set of classes that allow the programmer to draw various graphs on classical Cartesian axes. All of these Graph types share an underlying set of &lt;a&gt;options&lt;/a&gt;, and obey the same basic interface. Please see sections discussing particular graph types for more information.&lt;/p&gt;
&lt;p&gt;&#54644;&#51456;&#45796;..&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#45716; &#53364;&#47000;&#49828;&#46308;&#51012; &#45432;&#52636; &#49884;&#53412;&#45716;&#45936;... &#51060; &#44163;&#46308;&#51008; &#54532;&#47196;&#44536;&#47000;&#47672;&#44032; &#53364;&#47000;&#49885;&#52972;&#54620; &#45936;&#52852;&#47476;&#53944;&#51032; &#51340;&#54364;?? &#50948;&#50640;&#49436; &#45796;&#50577;&#54620; &#44536;&#47000;&#54532;&#47484; &#44536;&#47540; &#49688; &#51080;&#44172; &#51060;&#47084;&#54620; &#44536;&#47000;&#54532; &#53440;&#51077;&#51032; &#47784;&#46304; &#44163;&#51008; &#44592;&#52488;&#46104;&#45716; &#50741;&#49496;&#46308;&#51012; &#44277;&#50976;&#54620;&#45796;. &#44536;&#47532;&#44256; &#44057;&#51008; &#44592;&#52488;&#46104;&#45716; &#51064;&#53552;&#54168;&#51060;&#49828;&#47484; &#51456;&#49688;&#54620;&#45796;. &#51312;&#44552; &#45908; &#51088;&#49464;&#54620; &#44163;&#51008; &#53945;&#48324;&#54620; &#44536;&#47000;&#54532; &#53440;&#51077;&#50640; &#44288;&#54644; &#53664;&#47200;&#54616;&#45716; &#49465;&#49496;&#51012; &#48400;&#46972;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Interface&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In addition to the &lt;a&gt;common interface&lt;/a&gt; Graph types expose the following methods:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#44172;&#45796;&#44032; &#44277;&#53685;&#51032; &#51064;&#53552;&#54168;&#51060;&#49828;&#45716; &#44536;&#47000;&#54532; &#53440;&#51077;&#51008; &#50500;&#47000;&#51032; &#47700;&#49548;&#46300;&#47484; &#45432;&#52636;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;setScatter(scatterpoints)&lt;/h3&gt;
&lt;p&gt;&amp;lt;&amp;gt; Here, &lt;strong&gt;scatterpoints&lt;/strong&gt; is a list of Scatter objects. See the section on &lt;a&gt;Scatter Graphs&lt;/a&gt; for an in-depth discussion of the use of this method.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#50668;&#44592;, &lt;strong&gt;scatterpoints&lt;/strong&gt;&#45716; &#49828;&#52992;&#53552; &#50724;&#48652;&#51229;&#53944;&#51032; &#47785;&#47197;&#51060;&#45796;. &#51060; &#48120;&#49464;&#46020;&#47484; &#49324;&#50857;&#50640; &#45824;&#54620; &#44618;&#51060; &#51080;&#45716; &#53664;&#47200;&#50640; &#45824;&#54620; &#44163;&#51008; Scatter &#44536;&#47000;&#54532; &#49465;&#49496;&#51012; &#48372;&#46972;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;annotate(point=0, note="", colour="white")&lt;/h3&gt;
&lt;p&gt;The GDChart library allows the user to add a single annotation to a given graph. The &lt;strong&gt;point&lt;/strong&gt; argument indicates the X-axis offset of the annotation, &lt;strong&gt;note&lt;/strong&gt; is the annotation text itself, and &lt;strong&gt;colour&lt;/strong&gt; is the annotation colour.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51060; &#46972;&#51060;&#48652;&#47084;&#45768;&#45716; &#50976;&#51200;&#44032; &#51452;&#50612;&#51652; &#44536;&#47000;&#54532;&#50640; &#49905;&#44544; &#51452;&#49437;&#51012; &#52628;&#44032;&#54624; &#49688; &#51080;&#44172; &#54644;&#51456;&#45796;.. Point &#51064;&#51088;&#45716; &#51452;&#49437;&#51032; x &#51340;&#54364; &#50724;&#54532;&#49483;&#51012; &#45208;&#53440;&#45240;&#45796;. note&#45716; &#44536;&#47000;&#54532;&#50640;&#49436;&#51032; &#51452;&#49548; &#47928;&#51088;&#50676;&#51012; &#47568;&#54616;&#44256;, colour&#51008; &#51452;&#49437;&#51032; &#49353;&#44628;&#51060;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;clearAnnotation()&lt;/h3&gt;
&lt;p&gt;Clear the annotation, if any.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#47564;&#50557; &#51452;&#49437;&#51060; &#51080;&#45796;&#47732;, &#51452;&#49437;&#51012; &#44648;&#45143;&#54616;&#44172; &#54620;&#45796;.??&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Colours&lt;/h1&gt;
&lt;p&gt;Both PyGDChart and GDChart itself store and manipulate colours as RGB integers. Users will be familiar with RGB colour definitions from other contexts - for instance, colours in HTML are often specified in the form "#RRGGBB", where each component is a hex number between 0 and 256. Since the naked RGB integer is cumbersome to work with, the PyGDChart library provides a number of simple facilities to make the programmer's life easier.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#48148; &#47196;... PyGDChart &#50752; GDChart &#47784;&#46160;... &#49353;&#46308;&#51012; RGB &#51221;&#49688;&#47196;&#49436; &#51200;&#51109;&#54616;&#44256; &#44288;&#47532;&#54620;&#45796;.&amp;nbsp;&#50976;&#51200;&#45716; &#45796;&#47480; &#47928;&#47589;(&#50669;, html &#46321;&#46321;)&#51004;&#47196; &#48512;&#53552; RGB &#52972;&#47084; &#51221;&#51032;&#50640; &#52828;&#44540;&#54616;&#45796;.(&#50669;, &#50500;-_-;;;) &#50696;&#47484; &#46308;&#47732; HTML&#50640;&#49436; &#49353;&#49345;&#51008; &#51333;&#51333; "#RRGGBB" &#54805;&#53468;&#47196;&#49436; &#44592;&#49696;&#46104;&#50612;&#51648;&#44256;, &#44033; &#44396;&#49457;&#50836;&#49548;&#45716; 0 &#50640;&#49436; 255&#51032; 16&#51652;&#49688;&#47196; &#51060;&#47336;&#50612;&#51652;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;The RGB Class&lt;/h2&gt;
&lt;p&gt;The first of the colour manipulation facilities provided by PyGDChart is the RGB class. This class is simply a way to collect and manipulate the components of a normal RGB colour definition. It is instantiated as follows:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;PyGDChart&#50640; &#51032;&#54644;&#49436; &#51228;&#44277;&#46104;&#50612;&#51648;&#45716; &#52395;&#48264;&#51704;&#47196;...&#50424;&#47564;&#54620; &#44163;&#51008; RGB &#53364;&#47000;&#49828;&#51060;&#45796;. &#51060; &#53364;&#47000;&#49828;&#45716; &#48372;&#53685;&#51032; RGB &#49353;&#49345; &#51221;&#51032; &#44396;&#49457;&#50836;&#49548;&#47484; &#45796;&#47336;&#44144;&#45208; &#49688;&#51665;&#54616;&#45716; &#44036;&#45800;&#54620; &#48169;&#48277;&#51060;&#45796;. &#50500;&#47000;&#50640; &#50696;&#49884;&#44032; &#45208;&#50772;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x = gdchart.RGB(r, g, b)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After instantiation, an RGB object exposes the attributes r, g, and b, which can be inspected and set independently. RGB objects have an __int__ method that converts the RGB colour definition to the correct numerical value. As such, an RGB object can be used wherever a colour definition is required.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;__int__ &#50696;&#50640;&#49436;... RGB &#50724;&#48652;&#51229;&#53944;&#45716; r, g, b&#51012; &#45432;&#52636;&#54616;&#44256; &#51080;&#44256;, &#51060; &#44163;&#51008; &#47732;&#48128;&#55176; &#49332;&#54196;&#51656; &#49688; &#51080;&#44256; &#44536;&#47532;&#44256; &#46021;&#47549;&#51201;&#51004;&#47196; &#49444;&#51221;&#46104;&#50612; &#51656; &#49688; &#51080;&#45796;. RGB &#50724;&#48652;&#51229;&#53944;&#45716; &#47700;&#49548;&#46300;&#47484; &#44032;&#51648;&#44256; &#51080;&#45716;&#45936; &#51060; &#44163;&#51008; RGB &#49353;&#49345; &#51221;&#51032;&#47484; &#51221;&#54869;&#54620; &#49707;&#51088;&#51032; &#44050;&#51004;&#47196; &#48148;&#44988;&#45796;. &#44536;&#47000;&#49436;... RGB &#50724;&#48652;&#51229;&#53944;&#45716; &#49353;&#49345; &#51221;&#51032;&#44032; &#50836;&#44396;&#46104;&#50612;&#51648;&#45716; &#50612;&#46356;&#50640;&#49436;&#46304;&#51648; &#49324;&#50857;&#46104;&#50612; &#51656; &#49688; &#51080;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;The rgbFactory() function&lt;/h2&gt;
&lt;p&gt;The rgbFactory() function is an easy way to manufacture RGB objects corresponding to common colours:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;rgbFactory &#54632;&#49688;&#45716; &#44277;&#53685;&#51032; &#49353;&#44628;&#50640; &#45824;&#51025;&#54616;&#45716; RGB &#50724;&#48652;&#51229;&#53944;&#47484; &#47564;&#46300;&#45716;.... &#49772;&#50868; &#48169;&#48277;&#51060;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x = gdchart.rgbFactory("blue")&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At the moment only entries for "blue", "red", "green", "orange", "white", "black" and "yellow" are provided, but this list will grow in future.&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51648;&#44552;... &#50668;&#47084;&#49353;&#50640; &#45824;&#54620; &#50644;&#53944;&#47532;&#45716; &#51228;&#44277;&#46104;&#50612; &#51652;&#45796;. &#44536;&#47084;&#45208; &#51060;&#47084;&#54620; &#47785;&#47197;&#51008; &#48120;&#47000;&#50640;.... &#48148;&#45076; &#49688;&#46020; &#51080;&#45796;???&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Colours and PyGDChart&lt;/h2&gt;
&lt;p&gt;From the preceding sections, we already know of two major ways to specify a colour to PyGDChart. Firstly, as a plain integer:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#50526; &#49465;&#49496;&#50640;&#49436;.. &#50864;&#47532;&#45716; &#51060;&#48120; &#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#50640;&#49436; &#49353;&#51012; &#44592;&#49696;&#54616;&#45716; &#51473;&#50836;&#54620;... 2&#44032;&#51648; &#48169;&#48277;&#51012; &#48176;&#50912;&#45796;. &#52395;&#48264;&#51704;&#47196; plain &#51221;&#49688;&#47196;&#49436;...&lt;/span&gt;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x.bg_color = 0x3232CC&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And secondly, as an RGB object:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#46160;&#48264;&#51704;&#47196;.. RGB &#50724;&#48652;&#51229;&#53944;&#47196;&#49436;..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x.bg_color = gdchart.rgbFactory("blue")&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From the latter example, however, an even more convenient way of specifying a colour leaps to mind. Since options in PyGDChart are "smart", we can check wether an option has been passed a string, and call rgbFactory automatically to generate an RGB object. &lt;span style="background-color: rgb(255, 255, 255);"&gt;This leads us to the third way of specifying colours in PyGDChart - simply by using a descriptive string:&lt;/span&gt;&lt;/p&gt;
&lt;p style=""&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#47560; &#51648;&#47561; &#50696;&#51228;&#50640;&#49436;... &#44536;&#47084;&#45208; &#49353;&#51012; &#44592;&#49696;&#54616;&#45716; &#51312;&#44552; &#45908; &#54200;&#47532;&#54620; &#48169;&#48277;&#51060;... &#48372;&#51064;&#45796;=_=a. &#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#50640;&#49436; &#50741;&#49496;&#51008; "&#49828;&#47560;&#53944;"&#54616;&#45796;. &#50864;&#47532;&#45716; &#50741;&#49496;&#51060; &#47928;&#51088;&#50676;&#51012; &#53685;&#44284;&#46104;&#50612;&#51648;&#46304;.. &#50506;&#54616;&#46304; &#44036;&#50640; &#52404;&#53356;&#54624; &#49688; &#51080;&#45796;-.-;;;;&amp;nbsp; &#44536;&#47532;&#44256; RGB &#50724;&#48652;&#51229;&#53944;&#47484; &#51088;&#46041;&#51201;&#51004;&#47196; &#49373;&#49457;&#54616;&#45716; rgbFacotry&#47484; &#49373;&#49457;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#51060; &#44163;&#51025; &#47336;&#47532;&#47484; &#49464;&#48264;&#51704; &#48169;&#48277;&#51012; &#51060;&#45128;&#45716;&#45936; &#51060; &#44163;&#51008; &#51060; &#46972;&#51060;&#48660;&#47084;&#51060;&#50640;&#49436; &#49353;&#51012; &#44592;&#49696;&#54616;&#45716; &#44163;&#51060;&#45796;. - &#49444;&#47749;&#51201;&#51064; &#47928;&#51088;&#50676;&#51012; &#49324;&#50857;&#54632;&#51004;&#47196; &#44036;&#45800;&#54616;&#44172;...&lt;/span&gt;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;x.bg_color = "blue"&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(174, 255, 102);"&gt;&#50948;&#50640; &#52376;&#47100;.... ^^:&lt;/span&gt;&lt;/p&gt;
</description>
      <pubDate>Thu, 24 Apr 2008 17:53:34 +0900</pubDate>
      <link>http://noish.springnote.com/pages/1111274</link>
      <guid>http://noish.springnote.com/pages/1111274</guid>
    </item>
    <item>
      <title>PyGDChart</title>
      <description>&lt;h2&gt;PyGDChart&lt;/h2&gt;
&lt;p&gt;&#47924;&#51088;&#44172; &#46160;&#44732;&#50868; &#52293;&#51012; &#50724;&#47000;&#51204;&#50640; &#49324;&#46160;&#44256;... &#50504;&#48372;&#45796;&#44032; &#50836;&#51608;&#46308;&#50612;&#49436; &#48372;&#44592; &#49884;&#51089;&#54664;&#45796;....&lt;br /&gt;
&#45796; &#48372;&#45716;&#45936;...(&#45824;&#52649; &#48420;&#45716;&#45936;&#46020;...) &#54620;&#45804; &#45336;&#44172; &#44152;&#47536; &#44163; &#44057;&#45796;. &#44536;&#47111;&#44172; &#52293;&#51012; &#48372;&#44256;...&lt;br /&gt;
&#54028;&#51060;&#50028;&#51060; &#46972;&#51060;&#48652;&#47084;&#47532;&#44032; &#51096; &#44396;&#52629;&#46104;&#50612; &#51080;&#45796;&#44256; &#54644;&#49436; &#54620;&#48264; &#51339;&#51008; &#45448;&#51012; &#44264;&#46972; &#48372;&#50500;&#49436; &#54620;&#48264; &#49324;&#50857;&#54644;&#48372;&#44172; &#46124;&#50632;&#45796;.&lt;br /&gt;
PyGDChart &#46972;&#51060;&#48652;&#47084;&#47532;&#51064;&#45936; GDChart &#46972;&#45716; &#50896;&#47000; &#46972;&#51060;&#48652;&#47084;&#47532;&#47484; &#54028;&#51060;&#50028;&#50640;&#49436;&#46020; &#49324;&#50857;&#54624; &#49688; &#51080;&#44172; &#54252;&#54021;??&lt;br /&gt;
&#50516;&#53948; &#47564;&#46308;&#50612; &#45459;&#51008; &#44163; &#44057;&#45796;.&amp;nbsp; &#50500;&#47000; &#49548;&#49828;&#45716; &#50696;&#51228;&#50640; &#51080;&#45716; &#44163;&#51060;&#47728;, Line, bg_color, title &#47700;&#49548;&#46300; &#51221;&#46020; &#48148;&#45012; &#48372;&#50520;&#45796;.&lt;br /&gt;
&#47700;&#45684;&#50620;&#50640; &#48372;&#47732; &#45796;&#50577;&#54620; &#44536;&#47000;&#54532;&#47484; &#44536;&#47540; &#49688; &#51080;&#45796;&#44256; &#44536;&#47140;&#51652; &#44536;&#47000;&#54532;&#46020; &#51080;&#45796;..... &amp;nbsp;&amp;nbsp; &#49789;&#44256; &#44036;&#45800;&#54616;&#44172; &#47564;&#46308; &#49688; &#51080;&#50612;&#49436;... &#51339;&#45796;!!! ^^&lt;br /&gt;
&#51060; &#46972;&#51060;&#48652;&#47084;&#47532; &#51061;&#54804;&#51004;&#45768;... &#51060;&#51228;&#45716; http, openid &#44288;&#47144; &#46972;&#51060;&#48652;&#47084;&#47532;&#51080;&#51004;&#47732;... &#45824;&#45824;&#51201;&#51064; &#53076;&#46377;&#51060; &#46308;&#50612; &#44036;&#45796;.-_-!&lt;br /&gt;
&#44540;&#45936; &#51060;&#44144;&#45716; &#49548;&#54413; &#44052;&#45796; &#50724;&#44256;&#49436; &#53076;&#46377;&#51060; &#46308;&#50612; &#44040; &#46319; &#49910;&#45796;!! &#50780;&#45264;&#44396;~~~ &#50689;&#54868;&#46020; &#48400;&#50556; &#54616;&#45768;&#44620; _-_)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
import gdchart&lt;br /&gt;
&lt;br /&gt;
x = gdchart.Line()&lt;br /&gt;
x.bg_color = 0xffffff&lt;br /&gt;
x.width = 250&lt;br /&gt;
x.height = 250&lt;br /&gt;
x.xtitle = "Weekday"&lt;br /&gt;
x.ytitle = "Percentage"&lt;br /&gt;
x.title = "Test Grpah"&lt;br /&gt;
x.ext_color = [ "white", "yellow", "red", "blue", "green"]&lt;br /&gt;
x.setData([20, 100, 80, 30, 50])&lt;br /&gt;
x.setLabels(["Mon", "Tue", "Wed", "Thu", "Fri"])&lt;br /&gt;
x.draw("simple.jpg")&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&#50500;&#47000;&#45716; &#44208;&#44284;&#47932;...&amp;nbsp; &#49888;&#44592; ^^;;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img title="6500156707.png" class="attachment" src="/pages/1001304/attachments/475806" alt="6500156707.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description>
      <pubDate>Thu, 24 Apr 2008 17:36:07 +0900</pubDate>
      <link>http://noish.springnote.com/pages/1001304</link>
      <guid>http://noish.springnote.com/pages/1001304</guid>
    </item>
    <item>
      <title>GAS&#50752; NASM &#48708;&#44368;</title>
      <description>&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Translation Log&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;07&#45380; 12&#50900; 29&#51068;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#45208;&#47492;&#45824;&#47196; &#48264;&#50669;&#51012; &#54616;&#45796; &#48372;&#45768;-_-a;; &#50896;&#47928;&#44284; &#45796;&#47480; &#51032;&#48120;&#47484; &#44032;&#51648;&#44256; &#51080;&#45716; &#44163;&#51060; &#47566;&#51060; &#51316;&#51116;&#54620;&#45796;. &#48264;&#50669;&#46108; &#44163;&#51012; &#48380; &#46412;&#45716; &#54596;&#55176; &#50896;&#47928;&#44284; &#54632;&#44760; &#48372;&#45716; &#44163;&#51012; &#52628;&#52380;&#54620;&#45796;. ^^b &#45796;&#51020;&#50640;&#46020; &#45796;&#47480; &#44163;&#51012; &#48264;&#50669;&#54616;&#44256; &#49910;&#51008;&#45936;.... &#51805;^^;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;08&#45380; 1&#50900; 9&#51068;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&#51068;&#45800; &#47560;&#47924;&#47532;... (&#51221;&#47532;&#54644;&#50556; &#54616;&#45716;&#45936;.. &#47784;&#47476;&#44163;&#45796; &#12622;&#12622;&#12622; )&lt;/li&gt;
&lt;li&gt;&#49892;&#54665; &#49884;&#53020; &#48372;&#51648; &#47803;&#54620; &#50696;&#51228;&#46020;.. &#51080;&#50612; &#54644;&#49437; &#51060;&#49345;&#54616;&#44172; &#46120;!!!&lt;/li&gt;
&lt;li&gt;&#44536;&#45285; &#50417;~ &#52280;&#44256;&#50857;&#51004;&#47196;&#47564; &#12622;&#12622;&#12622;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h3&gt;&#52636;&#52376; : &lt;a href="http://www.ibm.com/developerworks/linux/library/l-gas-nasm.html"&gt;http://www.ibm.com/developerworks/linux &#183;&#183;&#183; asm.html&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h1&gt;Linux assemblers: &lt;a href="/pages/search?q=A&amp;amp;parent_id=649608" title="A" class="wiki"&gt;A&lt;/a&gt; comparison of GAS and NASM&lt;/h1&gt;
&lt;p id="subtitle"&gt;A side-by-side look at GNU Assembler (GAS) and Netwide Assembler (NASM)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This article explains some of the more important syntactic and semantic differences between two of the most popular assemblers for Linux&#174;, GNU Assembler (GAS) and Netwide Assembler (NASM), including differences in basic syntax, variables and memory access, macro handling, functions and external routines, stack handling, and techniques for easily repeating blocks of code.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Unlike other languages, &lt;strong&gt;assembly programming&lt;/strong&gt; involves understanding the processor architecture of the machine that is being programmed. Assembly programs are not at all portable and are often cumbersome to maintain and understand, and can often contain a large number of lines of code. But with these limitations comes the advantage of speed and size of the runtime binary that executes on that machine.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#45796; &#47480; &#50616;&#50612;&#46308;&#44284; &#45796;&#47476;&#44172; &#50612;&#49480;&#48660;&#47532; &#54532;&#47196;&#44536;&#47000;&#48141;&#51008; &#54532;&#47196;&#44536;&#47000;&#48141;&#51060; &#46104;&#50612;&#51648;&#45716; &#47672;&#49888;&#51032; &#54532;&#47196;&#49464;&#49436; &#50500;&#53412;&#53581;&#52432;&#50640; &#45824;&#54644;&#49436; &#51060;&#54644;&#47484; &#54644;&#50556; &#54620;&#45796;. &#50612;&#49480;&#48660;&#47532; &#54532;&#47196;&#44536;&#47016;&#51008; &#44144;&#51032; &#54840;&#54872;&#49457;&#51060; &#51316;&#51116;&#54616;&#51648; &#50506;&#44256; &#44536;&#47532;&#44256; &#51060;&#47084;&#54620; &#44163;&#46308;&#51012; &#50976;&#51648;&#54616;&#44256; &#51060;&#54644;&#54616;&#45716; &#44163;&#51060; &#51333;&#51333; &#44480;&#52270;&#51012; &#44163; &#51060;&#44256; &#44536;&#47532;&#44256; &#49688;&#47566;&#51008; &#46972;&#51064;&#51032; &#53076;&#46300;&#44032; &#54252;&#54632;&#46104;&#50612; &#51080;&#45716; &#44163;&#51012; &#48380; &#49688; &#51080;&#51012; &#44163; &#51077;&#45768;&#45796;. &#44536;&#47084;&#45208; &#51060;&#47084;&#54620; &#44163; &#46412;&#47928;&#50640; &#49549;&#46020; &#44536;&#47532;&#44256; &#47672;&#49888;&#50640;&#49436; &#49892;&#54665;&#46104;&#50612;&#51648;&#45716; &#47088;&#53440;&#51076; &#48148;&#51060;&#45320;&#47532;&#51032; &#49324;&#51060;&#51592;&#50640; &#45824;&#54644;&#49436; &#51060;&#51216;&#51012; &#50619;&#44172; &#46121;&#45768;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Though much information is already available on assembly level programming on Linux, this article aims to more specifically show the differences between syntaxes in a way that will help you more easily convert from one flavor of assembly to the another. The article evolved from my own quest to improve at this conversion.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;@ &#47532;&#45573;&#49828;&#50640;&#49436;&#51032; &#50612;&#49480;&#48660;&#47532; &#47112;&#48296; &#54532;&#47196;&#44536;&#47000;&#48141;&#50640; &#45824;&#54620; &#47566;&#51008; &#51221;&#48372;&#44032; &#51060;&#50857;&#54624; &#49688; &#51080;&#51020;&#50640;&#46020; &#48520;&#44396;&#54616;&#44256;, &#51060; &#44544;&#50640;&#49436;&#45716; &#51312;&#44552; &#45908; &#47749;&#54869;&#54616;&#44172; &#54616;&#45208;&#51032; &#51339;&#50500;&#54616;&#45716; &#50612;&#49480;&#48660;&#47532;&#50640;&#49436; &#45796;&#47480; &#50612;&#49480;&#48660;&#47532;&#47196; &#51312;&#44552; &#45908; &#49789;&#44172; &#48148;&#44992; &#49688; &#51080;&#44172;&#45140; &#46020;&#50880;&#51012; &#51460; &#49688; &#51080;&#45716; &#48169;&#48277;&#50640; &#51080;&#50612;&#49436; &#47928;&#48277;&#46308;&#50640; &#45824;&#54620; &#52264;&#51060;&#51216;&#51012; &#48372;&#50668;&#51452;&#45716; &#44163;&#50640; &#47785;&#54364;&#47484; &#46160;&#44256; &#51080;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This article uses a series of program examples. Each program illustrates some feature and is followed by a discussion and comparison of the syntaxes. Although it's not possible to cover every difference that exists between NASM and GAS, I do try to cover the main points and provide a foundation for further investigation. And for those already familiar with both NASM and GAS, you might still find something useful here, such as macros.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&amp;nbsp; &#51060; &#44592;&#49324;&#50640;&#49436;&#45716; &#50696;&#51228;&#47484; &#50672;&#49549;&#51004;&#47196; &#49324;&#50857;&#54620;&#45796;. &#44033; &#54532;&#47196;&#44536;&#47016;&#51008; &#50612;&#46500; &#53945;&#51669;&#50640; &#45824;&#54644;&#49436; &#49444;&#47749;&#51012; &#54616;&#44256; &#47928;&#48277;&#46308;&#51032; &#44160;&#53664;(?)&#50752; &#48708;&#44368;&#50640; &#51032;&#54644;&#49436; &#51060;&#54644;&#44032; &#46104;&#50612;&#51652;&#45796;(? &#49444;&#47749;&#46104;&#50612;&#51652;&#45796;?) NASM&#44284; GAS &#49324;&#51060;&#51060;&#51032; &#51316;&#51116;&#54616;&#45716; &#47784;&#46304; &#52264;&#51060;&#51216;&#51012; &#45934;&#45716; &#44032;&#45733;&#49457;&#51060; &#50630;&#51012;&#51648;&#46972;&#46020;, &#51452;&#46108; &#54252;&#51064;&#53944;&#47484; &#45934;&#46020;&#47197; &#49884;&#46020;&#54624; &#44163;&#51060;&#47728; &#45908; &#45208;&#50500;&#44032;&#45716; &#51312;&#49324;&#47196;&#49436; &#53664;&#45824;(&#44592;&#52488;)&#47484; &#51228;&#44277;&#54616;&#46020;&#47197; &#45432;&#47141;&#51012; &#54624; &#44163; &#51060;&#45796;. &#44536;&#47532;&#44256; &#51060;&#47111;&#44172; &#51060;&#48120; NASM&#44284; GAS &#46168;&#45796; &#52828;&#44540;&#54616;&#44592; &#46412;&#47928;&#50640; &#50668;&#44592;&#49436; &#45817;&#49888;&#51008; &#50668;&#51204; &#55176; &#50612;&#46496;&#54620; &#44163; &#50696;&#47484; &#46308;&#47732; &#47588;&#53356;&#47196;&#47484; &#52286;&#51012; &#49688; &#46020; &#51080;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;table width="40%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="http://www.ibm.com/i/c.gif" height="1" alt="" width="10" /&gt;&lt;/td&gt;
&lt;td&gt;
&lt;table width="100%"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p style="background-color: rgb(228, 228, 228);"&gt;&lt;strong&gt;Building the examples&lt;/strong&gt;&lt;/p&gt;
&lt;p style="background-color: rgb(228, 228, 228);"&gt;&lt;br /&gt;
&lt;strong&gt;Assembling:&lt;/strong&gt;&lt;br /&gt;
GAS:&lt;br /&gt;
&lt;code&gt;as &#8211;o program.o program.s&lt;/code&gt;&lt;/p&gt;
&lt;p style="background-color: rgb(228, 228, 228);"&gt;NASM:&lt;br /&gt;
&lt;code&gt;nasm &#8211;f elf &#8211;o program.o program.asm&lt;/code&gt;&lt;/p&gt;
&lt;p style="background-color: rgb(228, 228, 228);"&gt;&lt;strong&gt;Linking (common to both kinds of assembler):&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;ld &#8211;o program program.o&lt;/code&gt;&lt;/p&gt;
&lt;p style="background-color: rgb(228, 228, 228);"&gt;&lt;strong&gt;Linking when an external C library is to be used:&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;ld &#8211;-dynamic-linker /lib/ld-linux.so.2 &#8211;lc &#8211;o program program.o&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This article assumes you have at least a basic understanding of assembly terminology and have programmed with an assembler using Intel&#174; syntax, perhaps using NASM on Linux or Windows. This article does not teach how to type code into an editor or how to assemble and link (but see the sidebar for a &lt;a href="http://www.ibm.com/developerworks/linux/library/l-gas-nasm.html#sidebar"&gt;&lt;span style="color: rgb(92, 129, 167);"&gt;quick refresher&lt;/span&gt;&lt;/a&gt;). You should be familiar with the Linux operating system (any Linux distribution will do; I used Red Hat and Slackware) and basic GNU tools such as gcc and ld, and you should be programming on an x86 machine.&lt;/p&gt;
&lt;p&gt;Now I'll describe what this article does and does not cover.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51060; &#44592;&#49324;&#50640;&#49436;&#45716; &#51201;&#50612;&#46020; &#50612;&#49480;&#48660;&#47532; &#50857;&#50612;&#50640; &#45824;&#54644;&#49436; &#44592;&#48376;&#51201;&#51004;&#47196; &#51060;&#54644;&#54616;&#44256; &#51080;&#45796;&#44256; &#48372;&#44256; &#49444;&#47749;&#54620;&#45796;. &#46608;&#54620; &#51064;&#53588; &#47928;&#48277;&#51012; &#49324;&#50857;&#54616;&#45716; &#50612;&#49480;&#48660;&#47084;&#45208; &#46608;&#45716; &#50500;&#47560;&#46020; &#50952;&#46020;&#50864; &#46608;&#45716; &#47532;&#45573;&#49828;&#50640;&#49436; NASM&#51032; &#49324;&#50857;&#54616;&#45716; &#50612;&#49480;&#48660;&#47084;&#47196; &#54532;&#47196;&#44536;&#47016;&#54624; &#51460; &#50500;&#45716; &#44163;&#51004;&#47196; &#49373;&#44033;&#54620;&#45796;. &#44536;&#47532;&#44256; &#51060; &#44544;&#50640;&#49436;&#45716; &#50612;&#46523;&#44172; &#50640;&#46356;&#53552;&#50640; &#53076;&#46300;&#47484; &#45347;&#45716; &#44163;&#51060;&#45208; &#46608;&#45716; &#50612;&#46523;&#44172; &#50612;&#49480;&#48660; &#44536;&#47532;&#44256; &#47553;&#53356;&#54616;&#45716; &#44163;&#50640; &#45824;&#54644;&#49436; &#50508;&#47140;&#51452;&#51648; &#50506;&#45716;&#45796;.&amp;nbsp; &#51088; &#44536;&#47532;&#44256; &#47532;&#45573;&#49828; OS&#50640; &#52828;&#49689;&#54644;&#50556; &#54633;&#45768;&#45796;(&#50612;&#46500; &#47532;&#45573;&#49828; &#48176;&#54252;&#54032;&#51060;&#46304; &#46104;&#45716;&#45936; &#45208;&#45716; &#47112;&#46300;&#54663;&#44284; &#49836;&#47001;&#50920;&#50612;&#47484; &#49324;&#50857;&#54620;&#45796;) &#44536;&#47532;&#44256; &#44592;&#48376;&#51201;&#51064; GNU &#53812;&#46308; &#50696;&#47484; &#46308;&#47732; gcc, ld &#50640;&#45824;&#54644;&#49436;&#46020; &#52828;&#49689;&#54644;&#50556; &#54620;&#45796;. &#44536;&#47532;&#44256; x86 &#47672;&#49888;&#50640;&#49436; &#54532;&#47196;&#44536;&#47000;&#48141;&#51012; &#54624; &#51460;&#50500;&#50556; &#54620;&#45796;.&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&#51648;&#44552;&#48512;&#53552; &#45208;&#45716; &#51060; &#44544;&#50640;&#49436; &#54624; &#44163;&#44284; &#54616;&#51648; &#50506;&#51012; &#44163;(?)&#50640; &#45824;&#54644;&#49436; &#49444;&#47749;&#54624; &#44163; &#51060;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This article covers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Basic syntactical differences between NASM and GAS&lt;/li&gt;
&lt;li&gt;Common assembly level constructs such as variables, loops, labels, and macros&lt;/li&gt;
&lt;li&gt;A bit about calling external C routines and using functions&lt;/li&gt;
&lt;li&gt;Assembly mnemonic differences and usage&lt;/li&gt;
&lt;li&gt;Memory addressing methods&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="color: rgb(0, 128, 0);"&gt;&#51060; &#44544;&#50640;&#49436; &#54624; &#44163; :&lt;/p&gt;
&lt;ul style="color: rgb(0, 128, 0);"&gt;
&lt;li&gt;NASM&#50752; GAS&#51032; &#44592;&#48376;&#51201;&#51064; &#47928;&#48277;&#51201;&#51064; &#52264;&#51060;&#51216;&#46308;&lt;/li&gt;
&lt;li&gt;&#44277;&#53685;&#51201;&#51064; &#50612;&#49480;&#48660;&#47532; &#47112;&#48296; &#44396;&#49457;&#52404;(?) : &#50696;&#47484; &#46308;&#47732; &#48320;&#49688;, &#47336;&#54532;, &#46972;&#48296; &#44536;&#47532;&#44256; &#47588;&#53356;&#47196;&lt;/li&gt;
&lt;li&gt;&#50808;&#48512; C &#47336;&#54004;&#51012; &#54840;&#52636;&#54616;&#45716; &#44163;&#44284; &#54632;&#49688;&#47484; &#49324;&#50857;&#54616;&#45716; &#44163;&#50640; &#45824;&#54644;&#49436; &#48708;&#53944;(?)&lt;/li&gt;
&lt;li&gt;&#50612;&#49480;&#48660;&#47532; &#45768;&#47784;&#45769; &#52264;&#51060;&#51216;&#44284; &#49324;&#50857; &#48169;&#48277;&lt;/li&gt;
&lt;li&gt;&#47700;&#47784;&#47532; &#50612;&#46300;&#47112;&#49905; &#48169;&#48277;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This article does not cover:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The processor instruction set&lt;/li&gt;
&lt;li&gt;Various forms of macros and other constructs particular to an assembler&lt;/li&gt;
&lt;li&gt;Assembler directives peculiar to either NASM or GAS&lt;/li&gt;
&lt;li&gt;Features that are not commonly used or are found only in one assembler but not in the other&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&#51060; &#44544;&#50640;&#49436; &#45796;&#47336;&#51648; &#50506;&#45716; &#44163; :&lt;/p&gt;
&lt;p&gt;&#54532;&#47196;&#49464;&#49436;&#51032; &#51064;&#49828;&#53944;&#47085;&#49496; &#49483;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p style="color: rgb(0, 128, 0);"&gt;&#47588;&#53356;&#47196;&#51032; &#45796;&#50577;&#54620; &#54805;&#53468;&#50752; &#44536;&#47532;&#44256; &#50612;&#49480;&#48660;&#47084;&#50640;&#44172; &#51080;&#50612; &#45796;&#47480; &#44396;&#49457;&#52404;&#50640; &#53945;&#48324;&#54616;&#44172;... -_-a&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="color: rgb(0, 128, 0);"&gt;NASM &#46608;&#45716; GAS&#44032; &#46123;&#46304; &#50612;&#45712;&#54620;&#51901;&#50640; &#44256;&#50976;&#51032; &#50612;&#49480;&#48660;&#47084; &#46356;&#47113;&#54000;&#48652;(&#51648;&#49884;&#50612;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="color: rgb(0, 128, 0);"&gt;&#44277;&#53685;&#51201;&#51004;&#47196; &#49324;&#50857;&#54616;&#51648; &#50506;&#45716; &#44536;&#47532;&#44256; &#54616;&#45208;&#51032; &#50612;&#49480;&#48660;&#47084;&#50640;&#49436;&#47564; &#52286;&#51012; &#49688; &#51080;&#44256; &#45796;&#47480; &#50612;&#49480;&#48660;&#47084;&#50640;&#49436; &#52286;&#51012; &#49688; &#50630;&#45716; &#53945;&#51669;&#46308;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;For more information, refer to the official assembler manuals (see &lt;a href="http://www.ibm.com/developerworks/linux/library/l-gas-nasm.html#resources"&gt;Resources&lt;/a&gt; for links), as those are the most complete sources of information.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#45908; &#47566;&#51008; &#51221;&#48372;&#47484; &#52286;&#44592; &#50948;&#54644;&#49436;&#45716; &#44277;&#49885;&#51201;&#51064; &#50612;&#49480;&#48660;&#47084; &#47700;&#45684;&#50620;&#51012; &#52280;&#51312;&#54616;&#46972; &#44536;&#47532;&#44256; &#51060;&#47084;&#54620; &#44163;&#46308;&#51008; &#44144;&#51032; &#50756;&#48317;&#54620; &#51221;&#48372; &#49548;&#49828;&#46308;&#51060;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Basic structure&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Listing 1 shows a very simple program that simply exits with an exit code of 2. This little program describes the basic structure of an assembly program for both GAS and NASM.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Listing1&#51008; exit code 2&#47484; &#51060;&#50857;&#54616;&#50668; &#44036;&#45800;&#54616;&#44172; exit&#54616;&#45716; &#47588;&#50864; &#44036;&#45800;&#54620; &#54532;&#47196;&#44536;&#47016;&#51012; &#48372;&#50668;&#51456;&#45796;. &#51060; &#47588;&#50864; &#51089;&#51008; &#54532;&#47196;&#44536;&#47016;&#51008; GAS&#50752; NASM &#46168;&#45796;&#51032; &#50612;&#49480;&#48660;&#47532; &#54532;&#47196;&#44536;&#47016;&#51032; &#44592;&#48376;&#51201;&#51064; &#44396;&#51312;&#47484; &#49444;&#47749;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Listing 1. A program that exits with an exit code of 2&lt;/em&gt;&lt;/p&gt;
&lt;table class="datatable" width="842"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="color: rgb(193, 193, 193); background-color: rgb(228, 228, 228);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Line&lt;/span&gt;&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;NASM&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;GAS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;001&lt;br /&gt;
002&lt;br /&gt;
003&lt;br /&gt;
004&lt;br /&gt;
005&lt;br /&gt;
006&lt;br /&gt;
007&lt;br /&gt;
008&lt;br /&gt;
009&lt;br /&gt;
010&lt;br /&gt;
011&lt;br /&gt;
012&lt;br /&gt;
013&lt;br /&gt;
014&lt;br /&gt;
015&lt;br /&gt;
016&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;; Text segment begins&lt;br /&gt;
section .text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; global _start&lt;br /&gt;
&lt;br /&gt;
; Program entry point&lt;br /&gt;
&amp;nbsp; _start:&lt;br /&gt;
&lt;br /&gt;
; Put the code number for system call&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; eax, 1&lt;br /&gt;
&lt;br /&gt;
; Return value&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ebx, 2&lt;br /&gt;
&lt;br /&gt;
; Call the OS&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; 80h&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;# Text segment begins&lt;br /&gt;
.section .text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; .globl _start&lt;br /&gt;
&lt;br /&gt;
# Program entry point&lt;br /&gt;
&amp;nbsp; _start:&lt;br /&gt;
&lt;br /&gt;
# Put the code number for system call&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $1, %eax&lt;br /&gt;
&lt;br /&gt;
/* Return value */&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $2, %ebx&lt;br /&gt;
&lt;br /&gt;
# Call the OS&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; $0x80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Now for a bit of explanation.&lt;/p&gt;
&lt;p&gt;One of the biggest differences between NASM and GAS is the syntax. GAS uses the AT&amp;amp;T syntax, a relatively archaic syntax that is specific to GAS and some older assemblers, whereas NASM uses the Intel syntax, supported by a majority of assemblers such as TASM and MASM. (Modern versions of GAS do support a directive called &lt;code&gt;.intel_syntax&lt;/code&gt;, which allows the use of Intel syntax with GAS.)&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51648;&#44552;&#48512;&#53552; &#44036;&#45800;&#54616;&#44172; &#49444;&#47749;&#54620;&#45796;(-_-a;;;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;NASM&#44284; GAS &#49324;&#51060;&#51032; &#47924;&#51088;&#44172; &#53360; &#52264;&#51060;&#51216; &#51473; &#54616;&#45208;&#45716; &#47928;&#48277;&#51201;&#51064; &#44163;&#51060;&#45796;. GAS&#45716;&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&#51060; &#44163;&#44284; &#47751;&#47751;&#51032; &#50724;&#47000;&#46108; &#50612;&#49480;&#48660;&#47084;&#50640; &#53945;&#50976;&#54620;(&#46021;&#53945;&#54620;) &#49345;&#45824;&#51201;&#51004;&#47196; &#50896;&#49884;&#51201;&#51064; &#47928;&#48277;&#51064;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp; T&#47928;&#48277;&#51012; &#49324;&#50857;&#54620;&#45796; &#44536;&#50640; &#48152;&#54616;&#50668; NASM&#51008; &#45824;&#48512;&#48516;&#51032; &#50612;&#49480;&#48660;&#47084; &#50696;&#47484; &#46308;&#47732; TASM&#44284; MASM&#51032; &#51648;&#51648;&#47484; &#48155;&#45716; &#51064;&#53588; &#47928;&#48277;&#51012; &#49324;&#50857;&#54620;&#45796; .(&#54788;&#45824;&#54032; GAS&#45716; .intel_syntax&#46972; &#48520;&#47532;&#45716; &#46356;&#47113;&#53664;&#47532;&#47476; &#51648;&#50896;&#54616;&#45796; &#51060; &#44163;&#51008; GAS&#47196; &#51064;&#53588; &#47928;&#48277;&#51012; &#49324;&#50857;&#51012; &#54728;&#46973;&#54620;&#45796;.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The following are some of the major differences summarized from the GAS manual:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AT&amp;amp;T and Intel syntax use the opposite order for source and destination operands. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intel: &lt;code&gt;mov eax, 4&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;AT&amp;amp;T: &lt;code&gt;movl $4, %eax&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In AT&amp;amp;T syntax, immediate operands are preceded by &lt;code&gt;$&lt;/code&gt;; in Intel syntax, immediate operands are not. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intel: &lt;code&gt;push 4&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;AT&amp;amp;T: &lt;code&gt;pushl $4&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In AT&amp;amp;T syntax, register operands are preceded by &lt;code&gt;%&lt;/code&gt;; in Intel syntax, they are not.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In AT&amp;amp;T syntax, the size of memory operands is determined from the last character of the opcode name. Opcode suffixes of &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;w&lt;/code&gt;, and &lt;code&gt;l&lt;/code&gt; specify byte (8-bit), word (16-bit), and long (32-bit) memory references. Intel syntax accomplishes this by prefixing memory operands (not the opcodes themselves) with &lt;code&gt;byte ptr&lt;/code&gt;, &lt;code&gt;word ptr&lt;/code&gt;, and &lt;code&gt;dword ptr&lt;/code&gt;. Thus:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intel: &lt;code&gt;mov al, byte ptr foo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;AT&amp;amp;T: &lt;code&gt;movb foo, %al&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Immediate form long jumps and calls are &lt;code&gt;lcall/ljmp $section, $offset&lt;/code&gt; in AT&amp;amp;T syntax; the Intel syntax is &lt;code&gt;call/jmp far section:offset&lt;/code&gt;. The far return instruction is &lt;code&gt;lret $stack-adjust&lt;/code&gt; in AT&amp;amp;T syntax, whereas Intel uses &lt;code&gt;ret far stack-adjust&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;GAS &#47700;&#45684;&#50620;&#50640;&#49436; &#51221;&#47532;&#46108; &#47751;&#47751;&#51032; &#51452;&#46108; &#52264;&#51060;&#51216;&#51060; &#50500;&#47000;&#50640; &#45208;&#50728;&#45796;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T&#50752; &#51064;&#53588; &#47928;&#48277;&#51008; &#49548;&#49828;&#50752; &#45936;&#49828;&#53944;&#45348;&#51060;&#49496; &#50724;&#54140;&#47088;&#46300;&#50640; &#45824;&#54644;&#49436; &#48152;&#45824;&#51032; &#49692;&#49436;&#47484; &#49324;&#50857;&#54620;&#45796;. &#50696;&#47484; &#46308;&#47732;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51064;&#53588; : mov eax, 4&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T : movl $4, %eax&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T &#47928;&#48277;&#50640;&#49436;, &lt;span style="color: rgb(23, 127, 205); background-color: rgb(255, 204, 102);"&gt;&#51593;&#52824;(immediate) &#50724;&#54140;&#47088;&#46300;&lt;/span&gt;&#45716; $&#44032; &#50526;&#50640; &#50724;&#44256;; &#51064;&#53588; &#47928;&#48277;&#50640;&#49436;&#45716; &lt;span style="background-color: rgb(255, 204, 102);"&gt;&#51593;&#52824;(immediate) &#50724;&#54140;&#47088;&#46300;&lt;/span&gt;&#45716; &#50724;&#51648; &#50500;&#47924; &#44163;&#46020; &#50724;&#51648; &#50506;&#45716;&#45796;. &#50696;&#47484; &#46308;&#47732;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51064;&#53588; : push 4&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T : pushl $4&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T &#47928;&#48277;&#50640;&#49436; &lt;span style="background-color: rgb(255, 204, 102);"&gt;&#47112;&#51648;&#49828;&#53552; &#50724;&#54140;&#47088;&#46300;&lt;/span&gt;&#45716; %&#44032; &#50526;&#50640; &#50724;&#44256;; &#51064;&#53588; &#47928;&#48277;&#50640;&#49436;&#45716; &#50500;&#47924; &#44163;&#46020; &#50724;&#51648; &#50506;&#45716;&#45796;&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T &#47928;&#48277;&#50640;&#49436; &#47700;&#47784;&#47532; &#50724;&#54140;&#47088;&#46300;&#51032; &#49324;&#51060;&#51592;&#45716; &#50724;&#54588;&#53076;&#46300;(opcode) &#51060;&#47492;&#51032; &#47560;&#51648;&#47561; &#44544;&#51088;&#50640; &#51032;&#54644; &#51221;&#54644;&#51652;&#45796;. &#50724;&#54588;&#53076;&#46300;&#45716; b, w&#47484; &#51217;&#48120;&#49324;&#47196; &#48537;&#51064;&#45796; &#44536;&#47532;&#44256; &#45208;&#45716; byte, word, long &#47700;&#47784;&#47532; &#47112;&#54140;&#47088;&#49828;&#47484; &#51068;&#51068;&#51060; &#50676;&#44144;&#54620;&#45796;.(&#48264;&#50669;&#51088;, &#50724;&#54588;&#53076;&#46300; mov&#50640;&#49436; movb&#47484; &#48537;&#51060;&#47732; byte &#49324;&#51060;&#51592;&#47196; &#44208;&#51221;&#51060; &#46104;&#50612;&#51652;&#45796;.) &#51064;&#53588; &#47928;&#48277;&#51008; byte ptr, word ptr, dword, ptr&#51012; &#47700;&#47784;&#47532; &#50612;&#54140;&#47088;&#46300;(ex, foo(?))&#50640; &#51217;&#48120;&#49324;&#47484; &#48537;&#51060;&#45716; &#44163;&#51004;&#47196; &#51060; &#44163;&#51012; &#51060;&#47340;&#45796;. (&#50724;&#54588;&#53076;&#46300;&#45716; &#44536;&#44163;&#46308; &#51088;&#52404;&#44032; &#50500;&#45772;&#45796; &#12641;&#12641;a)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;AT&amp;amp;T &#47928;&#48277;&#50640;&#49436; &#47217; &#51216;&#54532;(jump)&#50752; &#54840;&#52636;(call)&#47196; &#48512;&#53552;&#51032; &#51593;&#52824;&#45716; lcall/ljump $section, $offset &#51060;&#45796;. &#51064;&#53588; &#47928;&#48277;&#50640;&#49436;&#45716; call/jmp far section:offset &#51060;&#45796;(?). AT&amp;amp;T&#47928;&#48277;&#50640;&#49436; far &#47532;&#53556; &#51064;&#49828;&#53944;&#47084;&#47085;&#49496;&#51008; lret $stack-adjst&#51060;&#44256; &#48152;&#47732;&#50640; &#51064;&#53588;&#51008; far stack-adjst&#51060;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;&#51096; &#47784;&#47476;&#44192;&#45796; &#12641;&#12641;;;;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;In both the assemblers, the names of registers remain the same, but the syntax for using them is different as is the syntax for addressing modes. In addition, assembler directives in GAS begin with a ".", but not in NASM.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#50612;&#49480;&#48660;&#47084; &#47784;&#46160;&#50640;&#49436; &#47112;&#51648;&#49828;&#53552;&#51032; &#51060;&#47492;&#51008; &#44057;&#44172; &#45224;&#45716;&#45796;(?) &#44536;&#47084;&#45208; &#51060; &#44163;&#46308;&#51012; &#49324;&#50857;&#54616;&#45716; &#47928;&#48277;&#50640;&#49436; &#52264;&#51060;&#51216;&#51060; &#51080;&#44256; &#46608;&#54620; &#50612;&#46300;&#47112;&#49905; &#49324;&#50857;&#54616;&#45716; &#47928;&#48277;&#50640;&#49436;&#46020; &#52264;&#51060;&#47484; &#48372;&#51064;&#45796;.&#44172;&#45796;&#44032; &lt;em class="underline"&gt;GAS&#50640;&#49436; &#50612;&#49480;&#48660;&#47084; &#46356;&#47113;&#54000;&#48652;&#45716; ".'&#47196; &#49884;&#51089;&lt;/em&gt;&#54620;&#45796;. &#54616;&#51648;&#47564; NASM&#51008; &#44536;&#47111;&#51648; &#50506;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;.text&lt;/code&gt; section is where the processor begins code execution. The &lt;code&gt;global&lt;/code&gt; (also &lt;code&gt;.globl&lt;/code&gt; or &lt;code&gt;.global&lt;/code&gt; in GAS) keyword is used to make a symbol visible to the linker and available to other linking object modules. On the NASM side of Listing 1, &lt;code&gt;global _start&lt;/code&gt; marks the symbol &lt;code&gt;_start&lt;/code&gt; as a visible identifier so the linker knows where to jump into the program and begin execution. As with NASM, GAS looks for this &lt;code&gt;_start&lt;/code&gt; label as the default entry point of a program. A label always ends with a colon in both GAS and NASM.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;.text &#49465;&#49496;&#51008; &#54532;&#47196;&#49464;&#49828;&#44032; &#53076;&#46300;(code)&#51032; &#49892;&#54665;&#51060; &#49884;&#51089;&#46104;&#45716; &#44275;&#51060;&#45796;. &#44544;&#47196;&#48268;(global, &#47932;&#47200; GAS&#50640;&#49436;&#45716; .globl &#46608;&#45716; .global) &#53412;&#50892;&#46300;&#45716; &#49900;&#48380;(symbol)&#51060; &lt;span style="background-color: rgb(255, 247, 0);"&gt;&lt;span style="background-color: rgb(255, 204, 102);"&gt;&#47553;&lt;/span&gt;&#52964;&lt;/span&gt;&#50640;&#44172; &#48372;&#51060;&#44172; &#54644;&#51452;&#45716;&#45936; &#49324;&#50857;&#51060; &#46104;&#50612;&#51648;&#44256; &#46608;&#45716; &#45796;&#47480; &#47553;&#53433; &#50724;&#48652;&#51229;&#53944; &#47784;&#46280;&#50640;&#44172;(&#50640;&#49436;..?) &#51060;&#50857;&#46104;&#50612;&#51648;&#44172; &#54620;&#45796;. Listing 1&#50640;&#49436; NASM&#51012; &#48372;&#47732; global _start&#45716; &#49900;&#48380; _start&#44032; &#45576;&#50640;&amp;nbsp; &#48372;&#51060;&#45716; &lt;span style="color: rgb(0, 128, 0);"&gt;&#49885;&#48324;&#51088;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;visible identifier-_-;;) &#54364;&#49884;&#54644;&#51452;&#44256; &#44536;&#47000;&#49436; &#47553;&#52964;&#45716; &#54532;&#47196;&#44536;&#47016; &#45236;&#48512;&#47196; &#51216;&#54532;&#54644;&#49436; &#50612;&#46356;&#47196; &#44032;&#50556; &#54616;&#45716;&#51648; &#44536;&#47532;&#44256; &#49892;&#54665;&#51060; &#49884;&#51089;&#46104;&#50612;&#50556; &#54616;&#45716;&#51648; &#50508;&#44172; &#46108;&#45796;. NASM&#44284; GAS&#45716; &#54532;&#47196;&#44536;&#47016;&#51032; &#44592;&#48376; &#50644;&#53944;&#47532; &#54252;&#51064;&#53944;&#47196;&#49436; &#51060; _start &#46972;&#48296;&#51012; &#52286;&#45716;&#45796;. &#46972;&#48296;(&#51452;&#49437;??)&#51008; GAS&#50752; NASM &#47784;&#46160;&#50640;&#49436; &#54637;&#49345; &#53084;&#47200;&#51004;&#47196; &#45149;&#45212;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Interrupts are a way to inform the OS that its services are required. The &lt;code&gt;int&lt;/code&gt; instruction in line 16 does this job in our program. Both GAS and NASM use the same mnemonic for interrupts. GAS uses the &lt;code&gt;0x&lt;/code&gt; prefix to specify a hex number, whereas NASM uses the &lt;code&gt;h&lt;/code&gt; suffix. Because immediate operands are prefixed with &lt;code&gt;$&lt;/code&gt; in GAS, 80 hex is &lt;code&gt;$0x80&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51064; &#53552;&#47101;&#53944;&#45716; OS&#50640;&#44172; &#49436;&#48708;&#49828;&#44032; &#54840;&#52636;&#51060; &#46104;&#50612;&#51648;&#45716; &#44163;&#51012; &#50508;&#47140;&#51452;&#45716; &#48169;&#48277;&#51060;&#45796;. 16&#48264;&#51704; &#51460;&#50640; &#51080;&#45716; int &#51064;&#49828;&#53944;&#47085;&#49496;&#51008; &#51060; &#54532;&#47196;&#44536;&#47016;&#50640;&#49436; &#51060; &#51089;&#50629;(&#51064;&#53552;&#47101;&#53944;&#47484; &#51060;&#50556;&#44592; &#54616;&#45716; &#46319;...;;)&#51012; &#49688;&#54665;&#51012; &#54620;&#45796;. GAS&#50752; NASM &#47784;&#46160; &#51064;&#53552;&#47101;&#53944; &#49324;&#50857;&#51012; &#50948;&#54644; &#44057;&#51008; &#45768;&#47784;&#45769;(mnemonic&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;)&#51012; &#49324;&#50857;&#54620;&#45796;. GAS&#45716; 16&#51652;&#49688;&#47484; &#54364;&#49884;&#54616;&#44592; &#50948;&#54644;&amp;nbsp; 0x&#47484; &#51217;&#46160;&#49324;(prefix. &#54532;&#47532;&#54589;&#49828;)&#47196; &#49324;&#50857;&#54620;&#45796;. &#48152;&#47732;&#50640; NASM&#51008; h&#47484; &#51217;&#48120;&#49324;(suffix)&#47196; &#49324;&#50857;&#54620;&#45796;. &#50780;&#45264;&#54616;&#47732; &#51593;&#52824;(immediate&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;) &#50724;&#54140;&#47088;&#46300;&#45716; GAS&#50640;&#49436; $ &#46244;&#50640; &#45459;&#50668;&#51648;&#44592; &#46412;&#47928;&#51060;&#45796;. 16&#51652;&#49688; 80&#51008; $0x80&#51004;&#47196; &#54364;&#49884;&#46108;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;int $0x80&lt;/code&gt; (or &lt;code&gt;80h&lt;/code&gt; in NASM) is used to invoke Linux and request a service. The service code is present in the EAX register. A value of 1 (for the Linux exit system call) is stored in EAX to request that the program exit. Register EBX contains the exit code (2, in our case), a number that is returned to the OS. (You can track this number by typing &lt;code&gt;echo $?&lt;/code&gt; at the command prompt.)&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;int $0x80(&#46608;&#45716; NASM&#50640;&#49436; 80h)&#45716; &#47532;&#45573;&#49828;&#51032; &#44592;&#45733;(&#54645;&#49900;?)&#51012; &#49324;&#50857;&#54616;&#45716;&#45936; &#46104;&#50612;&#51648;&#44256; &#46608;&#45716; &#49436;&#48708;&#49828;&#47484; &#54840;&#52636;&#54616;&#45716;&#45936; &#49324;&#50857;&#46104;&#50612; &#51652;&#45796;. &#49436;&#48708;&#49828; &#53076;&#46300;(service code)&#45716; EAX &#47112;&#51648;&#49828;&#53552;&#50640; &#54364;&#49884;&#54620;&#45796;. &#44050; 1 (&#51060; &#44050;&#51008; &#47532;&#45573;&#49828;&#50640;&#49436; exit &#49884;&#49828;&#53596; &#53084;&#51060;&#45796;)&#51008; EAX &#47112;&#51648;&#49828;&#53552;&#50640; &#54532;&#47196;&#44536;&#47016;&#51032; &#51333;&#47308;&#47484; &#50836;&#52397;&#54616;&#44592; &#50948;&#54644;&#49436; &#51200;&#51109;&#54620;&#45796;. &#47112;&#51648;&#49828;&#53552; EBX&#50640;&#45716; exit code&#47484; &#54252;&#54632;&#54620;&#45796;(&#50864;&#47532;&#51032; &#44221;&#50864; 2, &#44417;&#44552;? &#51060; &#44163;&#51060; &#47532;&#53556;&#44050;-.-a) &#51060; &#49707;&#51088;&#45716; OS&#50640; &#47532;&#53556;&#46104;&#50612; &#51652;&#45796;.(&#51060; &#49707;&#51088;&#47484; &#52964;&#47592;&#46300; &#54532;&#47212;&#54252;&#53944;&#50640;&#49436; echo $?&#47196; &#52628;&#51201;&#51012; &#54624; &#49688; &#51080;&#45796;.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Finally, a word about comments. GAS supports both C style (&lt;code&gt;/* */&lt;/code&gt;), C++ style (&lt;code&gt;//&lt;/code&gt;), and shell style (&lt;code&gt;#&lt;/code&gt;) comments. NASM supports single-line comments that begin with the ";" character.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#47560;&#52840;&#45236;, &#53076;&#47592;&#53944;&#50640; &#45824;&#54620; &#47568;&#51012; &#54616;&#44172; &#46104;&#45716; &#44396;&#45208;~ GAS&#50640;&#49436;&#45716; C &#49828;&#53440;&#51068;(/* *), C++ &#49828;&#53440;&#51068;(//), &#44536;&#47532;&#44256; &#49752; &#49828;&#53440;&#51068;(#) &#52964;&#47592;&#53944; &#47784;&#46160;&#47484; &#51648;&#50896;&#54620;&#45796;. NASM&#51008; ";' &#47928;&#51088;&#47196; &#49884;&#51089;&#54616;&#45716; &#49905;&#44544; &#46972;&#51064; &#53076;&#47592;&#53944;&#47484; &#51648;&#50896;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;
&lt;h3&gt;Variables and accessing memory&lt;/h3&gt;
&lt;p&gt;This section begins with an example program that finds the largest of three numbers.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51060; &#49465;&#49496;&#51008; 3&#44060;&#51032; &#49707;&#51088; &#51473;&#50640;&#49436; &#47924;&#51088;&#44172; &#53360; &#49707;&#51088;&#47484; &#52286;&#45716; &#50696;&#51228; &#54532;&#47196;&#44536;&#47016;&#51004;&#47196; &#49884;&#51089;&#54620;&#45796;. (&#51060;&#47088;&#44144; &#54644;&#49437;&#54616;&#44592; &#55192;&#46308;&#45796;-_-;; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Listing 2. A program that finds the maximum of three numbers&lt;/em&gt;&lt;/p&gt;
&lt;table class="datatable"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;Line&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;NASM&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;GAS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;001&lt;br /&gt;
002&lt;br /&gt;
003&lt;br /&gt;
004&lt;br /&gt;
005&lt;br /&gt;
006&lt;br /&gt;
007&lt;br /&gt;
008&lt;br /&gt;
009&lt;br /&gt;
010&lt;br /&gt;
011&lt;br /&gt;
012&lt;br /&gt;
013&lt;br /&gt;
014&lt;br /&gt;
015&lt;br /&gt;
016&lt;br /&gt;
017&lt;br /&gt;
018&lt;br /&gt;
019&lt;br /&gt;
020&lt;br /&gt;
021&lt;br /&gt;
022&lt;br /&gt;
023&lt;br /&gt;
024&lt;br /&gt;
025&lt;br /&gt;
026&lt;br /&gt;
027&lt;br /&gt;
028&lt;br /&gt;
029&lt;br /&gt;
030&lt;br /&gt;
031&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;; Data section begins&lt;br /&gt;
section .data&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; var1 dd 40&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; var2 dd 20&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; var3 dd 30&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
section .text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; global _start&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _start:&lt;br /&gt;
&lt;br /&gt;
; Move the contents of variables&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ecx, [var1]&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; cmp &amp;nbsp; ecx, [var2]&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; jg &amp;nbsp;&amp;nbsp; check_third_var&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ecx, [var2]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; check_third_var:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; cmp &amp;nbsp; ecx, [var3]&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; jg &amp;nbsp;&amp;nbsp; _exit&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ecx, [var3]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _exit:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; eax, 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ebx, ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; 80h&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;// Data section begins&lt;br /&gt;
.section .data&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; var1:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .int 40&lt;br /&gt;
&amp;nbsp; var2:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .int 20&lt;br /&gt;
&amp;nbsp; var3:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .int 30&lt;br /&gt;
&lt;br /&gt;
.section .text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; .globl _start&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _start:&lt;br /&gt;
&lt;br /&gt;
# move the contents of variables&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; (var1), %ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; cmpl&amp;nbsp; (var2), %ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; jg &amp;nbsp;&amp;nbsp; check_third_var&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; (var2), %ecx&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; check_third_var:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; cmpl&amp;nbsp; (var3), %ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; jg &amp;nbsp;&amp;nbsp; _exit&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; (var3), %ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; _exit:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $1, %eax&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; %ecx, %ebx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; $0x80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You can see several differences above in the declaration of memory variables. NASM uses the &lt;code&gt;dd&lt;/code&gt;, &lt;code&gt;dw&lt;/code&gt;, and &lt;code&gt;db&lt;/code&gt; directives to declare 32-, 16-, and 8-bit numbers, respectively, whereas GAS uses the &lt;code&gt;.long&lt;/code&gt;, &lt;code&gt;.int&lt;/code&gt;, and &lt;code&gt;.byte&lt;/code&gt; for the same purpose. GAS has other directives too, such as &lt;code&gt;.ascii&lt;/code&gt;, &lt;code&gt;.asciz&lt;/code&gt;, and &lt;code&gt;.string&lt;/code&gt;. In GAS, you declare variables just like other labels (using a colon), but in NASM you simply type a variable name (without the colon) before the memory allocation directive (&lt;code&gt;dd&lt;/code&gt;, &lt;code&gt;dw&lt;/code&gt;, etc.), followed by the value of the variable.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#50948;&#51032; &#47700;&#47784;&#47532; &#48320;&#49688; &#49440;&#50616;&#50640;&#49436; &#47751;&#47751;&#51032; &#52264;&#51060;&#51216;&#51012; &#48380; &#49688; &#51080;&#51012; &#44163; &#51060;&#45796;. NASM&#51008; &#44033;&#44033; 32&#48708;&#53944;, 16&#48708;&#53944;, &#44536;&#47532;&#44256; 8&#48708;&#53944;&#47484; &#49440;&#50616;&#54616;&#44592; &#50948;&#54644;&#49436; dd, dw &#44536;&#47532;&#44256; db &#46356;&#47113;&#54000;&#48652; &#49324;&#50857;&#54620;&#45796;. &#48152;&#47732;&#50640; GAS&#45716; &#44033; &#47785;&#51201;&#51012; &#45804;&#49457;&#54616;&#44592; &#50948;&#54644;&#49436; .long, .int &#44536;&#47532;&#44256; .byte&#47484; &#49324;&#50857;&#54620;&#45796;&lt;/span&gt;. &lt;span style="color: rgb(0, 128, 0);"&gt;GAS &#45716; &#50669;&#49884; .ascii, .asciz, &#44536;&#47532;&#44256; .string&#50752; &#44057;&#51008; &#45796;&#47480; &#46356;&#47113;&#54000;&#48652;(directives)&#47484; &#44032;&#51648;&#44256; &#51080;&#45796;. GAS&#50640;&#49436; &#45796;&#47480; &#46972;&#48296;(lable, &#53084;&#47200;&#51012; &#49324;&#50857;&#54644;&#49436;)&#51012; &#49324;&#50857;&#54616;&#45716; &#44163; &#52376;&#47100; &#48320;&#49688;&#47484; &#49440;&#50616;&#54620;&#45796;. &#44536;&#47084;&#45208; NASM&#50640;&#49436;&#45716; &#48320;&#49688;&#51032; &#44050;&#51060; &#46244;&#50640; &#46384;&#46972;&#45716; &#47700;&#47784;&#47532; &#54624;&#45817; &#46356;&#47113;&#54000;&#48652;(dd, dw, &#44592;&#53440; &#46321;&#46321;) &#50526;&#50640; &#48320;&#49688;&#51060;&#47492;&#51012; &#49324;&#50857;&#54632;&#51004;&#47196;&#50024; &#44036;&#45800;&#54616;&#44172; &#49440;&#50616;&#54624; &#49688; &#51080;&#45796;.(&#47568;&#51060; &#48373;&#51105;&#54644;&#49436; &#44536;&#47111;&#51648; "&#48320;&#49688;&#51060;&#47492;" "&#45936;&#51060;&#53552; &#53440;&#51077;" "&#44050;" &#51060;&#47111;&#44172; &#50728;&#45796;&#45716; &#51060;&#50556;&#44592; &#12641;.&#12641;;;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Line 18 in Listing 2 illustrates the memory indirect addressing mode. NASM uses square brackets to dereference the value at the address pointed to by a memory location: &lt;code&gt;[var1]&lt;/code&gt;. GAS uses a circular brace to dereference the same value: &lt;code&gt;(var1)&lt;/code&gt;. The use of other addressing modes is covered later in this article.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#50728;Listing 2&#50640;&#49436; 18&#48264;&#51704; &#51460;&#51008; &#47700;&#47784;&#47532; &#44036;&#51217; &#50612;&#46300;&#47112;&#49905; &#47784;&#46300;(indirect addressing mode)&#47484; &#49444;&#47749;&#54620;&#45796;. NASM&#51008; &#47700;&#47784;&#47532; &#47196;&#52992;&#51060;&#49496; [var1]&#50640; &#51032;&#54644; &#54252;&#51064;&#53944;&#46104;&#50612;&#51652; &#51452;&#49548;&#50640; &#51080;&#45716; &#44050;&#51012; &#46356;&#47112;&#54140;&#47088;&#49828;(&#48264;&#51648;&#50640; &#51080;&#45716; &#49892;&#51228; &#44050;&#50640; &#51217;&#44540;)&#54616;&#44592; &#50948;&#54644;&#49436; square brackets( []&#47484; &#47568;&#54616;&#45716; &#46319;;;)&#47484; &#49324;&#50857;&#54620;&#45796;. GAS&#45716; circular brace( ()&#47484; &#47568;&#54616;&#45716; &#46319;...)&#47484; &#51060;&#50857;&#54616;&#50668;&amp;nbsp; &#44057;&#51008; &#44050; (var1)&#51032; &#44050;&#51012; &#50619;&#45716;&#45796;. &#45796;&#47480; &#50612;&#46300;&#47112;&#49905; &#47784;&#46300;&#46308;&#50640; &#45824;&#54620; &#49324;&#50857;&#51008; &#51060; &#44544;&#50640;&#49436; &#45208;&#51473;&#50640; &#51060;&#50556;&#44592;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h3&gt;Using macros&lt;sup class="tocAnchorContainer"&gt;&lt;a href="/pages/649608#toc_5" title="toc_5" class="anchor" id="toc_5" &gt;#&lt;/a&gt;&lt;/sup&gt;&lt;sup class="tocAnchorContainer"&gt;&lt;a href="/pages/649608#toc_5" title="toc_5" class="anchor" id="toc_5" &gt;#&lt;/a&gt;&lt;/sup&gt;&lt;/h3&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Listing 3 illustrates the concepts of this section; it accepts the user's name as input and returns a greeting.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Listing3&#51008; &#51060; &#49464;&#49496;&#51032; &#52968;&#49481; - &#50976;&#51200;&#51032; &#51060;&#47492;&#51012; &#51077;&#47141; &#48155;&#44256; &#51064;&#49324;(?)&#47484; &#47532;&#53556;&#54616;&#45716; - &#51012; &#49444;&#47749;&#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Listing 3. A program to read a string and display a greeting to the user&lt;/em&gt;&lt;/p&gt;
&lt;table class="datatable"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;Line&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;NASM&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;GAS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;001&lt;br /&gt;
002&lt;br /&gt;
003&lt;br /&gt;
004&lt;br /&gt;
005&lt;br /&gt;
006&lt;br /&gt;
007&lt;br /&gt;
008&lt;br /&gt;
009&lt;br /&gt;
010&lt;br /&gt;
011&lt;br /&gt;
012&lt;br /&gt;
013&lt;br /&gt;
014&lt;br /&gt;
015&lt;br /&gt;
016&lt;br /&gt;
017&lt;br /&gt;
018&lt;br /&gt;
019&lt;br /&gt;
020&lt;br /&gt;
021&lt;br /&gt;
022&lt;br /&gt;
023&lt;br /&gt;
024&lt;br /&gt;
025&lt;br /&gt;
026&lt;br /&gt;
027&lt;br /&gt;
028&lt;br /&gt;
029&lt;br /&gt;
030&lt;br /&gt;
031&lt;br /&gt;
032&lt;br /&gt;
033&lt;br /&gt;
034&lt;br /&gt;
035&lt;br /&gt;
036&lt;br /&gt;
037&lt;br /&gt;
038&lt;br /&gt;
039&lt;br /&gt;
040&lt;br /&gt;
041&lt;br /&gt;
042&lt;br /&gt;
043&lt;br /&gt;
044&lt;br /&gt;
045&lt;br /&gt;
046&lt;br /&gt;
047&lt;br /&gt;
048&lt;br /&gt;
049&lt;br /&gt;
050&lt;br /&gt;
051&lt;br /&gt;
052&lt;br /&gt;
053&lt;br /&gt;
054&lt;br /&gt;
055&lt;br /&gt;
056&lt;br /&gt;
057&lt;br /&gt;
058&lt;br /&gt;
059&lt;br /&gt;
060&lt;br /&gt;
061&lt;br /&gt;
062&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;section .data&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; prompt_str&amp;nbsp; db &amp;nbsp; 'Enter your name: '&lt;br /&gt;
&lt;br /&gt;
; $ is the location counter&lt;br /&gt;
&amp;nbsp; STR_SIZE&amp;nbsp; equ&amp;nbsp; $ - prompt_str&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; greet_str&amp;nbsp; db&amp;nbsp; 'Hello '&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; GSTR_SIZE&amp;nbsp; equ&amp;nbsp; $ - greet_str&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
section .bss&lt;br /&gt;
&lt;br /&gt;
; Reserve 32 bytes of memory&lt;br /&gt;
&amp;nbsp; buff&amp;nbsp; resb&amp;nbsp; 32&lt;br /&gt;
&lt;br /&gt;
; A macro with two parameters&lt;br /&gt;
; Implements the write system call&lt;br /&gt;
&amp;nbsp; %macro write 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; eax, 4&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ebx, 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ecx, %1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; edx, %2&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; 80h&lt;br /&gt;
&amp;nbsp; %endmacro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Implements the read system call&lt;br /&gt;
&amp;nbsp; %macro read 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; eax, 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ebx, 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ecx, %1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; edx, %2&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; 80h&lt;br /&gt;
&amp;nbsp; %endmacro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
section .text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; global _start&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _start:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; write prompt_str, STR_SIZE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; read&amp;nbsp; buff, 32&lt;br /&gt;
&lt;br /&gt;
; Read returns the length in eax&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; push&amp;nbsp; eax&lt;br /&gt;
&lt;br /&gt;
; Print the hello text&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; write greet_str, GSTR_SIZE&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; pop &amp;nbsp; edx&lt;br /&gt;
&lt;br /&gt;
; edx&amp;nbsp; = length returned by read&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; write buff, edx&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _exit:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; eax, 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; mov &amp;nbsp; ebx, 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; 80h&lt;/td&gt;
&lt;td style="background-color: rgb(228, 228, 228);"&gt;.section .data&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; prompt_str:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .ascii "Enter Your Name: "&lt;br /&gt;
&amp;nbsp; pstr_end:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .set STR_SIZE, pstr_end - prompt_str&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; greet_str:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .ascii "Hello "&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; gstr_end:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; .set GSTR_SIZE, gstr_end - greet_str&lt;br /&gt;
&lt;br /&gt;
.section .bss&lt;br /&gt;
&lt;br /&gt;
// Reserve 32 bytes of memory&lt;br /&gt;
&amp;nbsp; .lcomm&amp;nbsp; buff, 32&lt;br /&gt;
&lt;br /&gt;
// A macro with two parameters&lt;br /&gt;
//&amp;nbsp; implements the write system call&lt;br /&gt;
&amp;nbsp; .macro write str, str_size&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $4, %eax&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $1, %ebx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; \str, %ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; \str_size, %edx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; $0x80&lt;br /&gt;
&amp;nbsp; .endm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Implements the read system call&lt;br /&gt;
&amp;nbsp; .macro read buff, buff_size&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $3, %eax&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $0, %ebx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; \buff, %ecx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; \buff_size, %edx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; $0x80&lt;br /&gt;
&amp;nbsp; .endm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.section .text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; .globl _start&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _start:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; write $prompt_str, $STR_SIZE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; read&amp;nbsp; $buff, $32&lt;br /&gt;
&lt;br /&gt;
// Read returns the length in eax&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; pushl %eax&lt;br /&gt;
&lt;br /&gt;
// Print the hello text&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; write $greet_str, $GSTR_SIZE&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; popl&amp;nbsp; %edx&lt;br /&gt;
&lt;br /&gt;
// edx = length returned by read&lt;br /&gt;
&amp;nbsp; write $buff, %edx&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; _exit:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $1, %eax&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; movl&amp;nbsp; $0, %ebx&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; int &amp;nbsp; $0x80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The heading for this section promises a discussion of macros, and both NASM and GAS certainly support them. But before we get into macros, a few other features are worth comparing.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51060; &#49465;&#49496;&#51032; &#51228;&#47785;&#51008; &#47588;&#53356;&#47196;&#50640; &#45824;&#54644;&#49436; &#51060;&#50556;&#44592;&#54624; &#44163;&#51060;&#46972; &#50557;&#49549;&#51012; &#54620;&#45796;. &#44536;&#47532;&#44256; NASM&#44284; GAS &#47784;&#46160; &#54869;&#49892;&#55176; &#47588;&#53356;&#47196;&#47484; &#51648;&#50896;&#54620;&#45796;.&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&#44536;&#47084;&#45208; &#47588;&#53356;&#47196;&#47484; &#49884;&#51089;&#54616;&#44592; &#51204;&#50640; &#47751;&#47751;&#51032; &#45796;&#47480; &#53945;&#51669;&#46308;&#51008; &#44032;&#52824;&#51080;&#45716; &#48708;&#44368;&#44032; &#46108;&#45796;.(&#50612;&#49353;;;;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Listing 3 illustrates the concept of uninitialized memory, defined using the &lt;code&gt;.bss&lt;/code&gt; section directive (line 14). BSS stands for "block storage segment" (originally, "block started by symbol"), and the memory reserved in the BSS section is initialized to zero during the start of the program. Objects in the BSS section have only a name and a size, and no value. Variables declared in the BSS section don't actually take space, unlike in the data segment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Listing 3&#51008; 14&#48264;&#51704; &#51460;&#50640; .bss &#49465;&#49496; &#46356;&#47113;&#54000;&#48652;&#51032; &#49324;&#50857;&#51004;&#47196; &#51221;&#51032;&#46108; &#52488;&#44592;&#54868;&#46104;&#51648; &#50506;&#51008; &#47700;&#47784;&#47532; &#52968;&#49481;&#50640; &#45824;&#54644;&#49436; &#49444;&#47749;&#54620;&#45796;. BSS&#45716; "block storage segment"(&#50896;&#47000;&#45716; "block started by symbol")&#47484; &#51032;&#48120;&#54620;&#45796;. &#44536;&#47532;&#44256; BSS &#49465;&#49496;&#50640; &#50696;&#50557;&#46108; &#47700;&#47784;&#47532;&#45716; &#54532;&#47196;&#44536;&#47016;&#51060; &#49884;&#51089;&#54616;&#45716; &#46041;&#50504; 0&#51004;&#47196; &#52488;&#44592;&#54868;&#46108;&#45796;. BSS &#49465;&#49496;&#50640;&#49436; &#50724;&#48652;&#51229;&#53944;&#46308;&#51008; &#45800;&#51648; &#51060;&#47492;&#44284; &#53356;&#44592; &#44536;&#47532;&#44256; &#44050;&#51060; &#50630;&#45716; &#49345;&#53468;&#47484; &#44032;&#51652;&#45796;. BSS &#49465;&#49496;&#50640; &#49440;&#50616;&#46108; &#48320;&#49688;&#45716; &#45936;&#51060;&#53440; &#49464;&#44536;&#47676;&#53944;&#50752; &#45796;&#47476;&#44172; &#49892;&#51228;&#47196; &#44277;&#44036;&#51012; &#52264;&#51648;&#54616;&#51648; &#50506;&#45716;&#45796;.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;NASM uses the &lt;code&gt;resb&lt;/code&gt;, &lt;code&gt;resw&lt;/code&gt;, and &lt;code&gt;resd&lt;/code&gt; keywords to allocated byte, word, and dword space in the BSS section. GAS, on the other hand, uses the &lt;code&gt;.lcomm&lt;/code&gt; keyword to allocate byte-level space. Notice the way the variable name is declared in both versions of the program. In NASM the variable name precedes the &lt;code&gt;resb&lt;/code&gt; (or &lt;code&gt;resw&lt;/code&gt; or &lt;code&gt;resd&lt;/code&gt;) keyword, followed by the amount of space to be reserved, whereas in GAS the variable name follows the &lt;code&gt;.lcomm&lt;/code&gt; keyword, which is then followed by a comma and then the amount of space to be reserved. This shows the difference:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;NASM&#45716; BSS&#49465;&#49496;&#50640;&#49436; byte, word, &#44536;&#47532;&#44256; dword &#53356;&#44592;&#51032; &#44277;&#44036;&#51012; &#54624;&#45817;&#54616;&#44592; &#50948;&#54644;&#49436; resb, resw &#44536;&#47532;&#44256; resd &#53412;&#50892;&#46300;&#47484; &#49324;&#50857;&#54620;&#45796;.&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&#48152; &#47732;&#50640; GAS&#45716; .lcomm &#53412;&#50892;&#46300;&#47476;&#47484; &#51060;&#50857;&#54616;&#50668; &#48148;&#51060;&#53944;-&#47112;&#48296; &#44277;&#44036;&#51012; &#54624;&#45817;&#54620;&#45796;.(GAS&#45716; &#47924;&#51312;&#44148; byte &#45800;&#50948; &#54624;&#45817;&#51064;&#44032;?;;;) Notice(&#50612;&#46523;&#44172; &#54644;&#50556; &#54616;&#45208;;;;) &#48320;&#49688;&#51032; &#51060;&#47492;&#51008; &#46160; &#54532;&#47196;&#44536;&#47016; &#48260;&#51260;&#50640;&#49436; &#49440;&#50616;&#46104;&#50612; &#51652;&#45796;. NASM&#50640;&#49436; &#48320;&#49688; &#51060;&#47492;&#51008; &#47566;&#51008; &#50696;&#50557;&#46108; &#44277;&#44036;&#51012; &#44032;&#51648;&#45716; resb(&#46608;&#45716; resw &#46608;&#45716; resd) &#53412;&#50892;&#46300; &#50526;&#50640; &#50724;&#44172;&#46104;&#44256;, &#48152;&#47732;&#50640; GAS&#50640;&#49436; &#48320;&#49688; &#51060;&#47492;&#51008; .lcomm &#53412;&#50892;&#46300;&#46244;&#50640; &#50724;&#44172;&#46104;&#44256; &#51060; &#44163;&#51008; &#51060; &#46412; &#53092;&#47560;(,)&#50640; &#51032;&#54644;&#49436; &#44396;&#48516;&#51060; &#46104;&#44256; &#44536;&#47532;&#44256; &#46608; &#47566;&#51008; &#50577;&#51032; &#50696;&#50557;&#46108; &#44277;&#44036;&#51060; &#50724;&#44172; &#46108;&#45796;. &#50500;&#47000;&#45716; &#52264;&#51060;&#51216;&#51012; &#48372;&#50668;&#51452;&#44256; &#51080;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(255, 255, 255);"&gt;NASM: &lt;code&gt;varname resb size&amp;nbsp; &lt;span style="color: rgb(0, 128, 0);"&gt;(&#48320;&#49688;&#51060;&#47492; &#53412;&#50892;&#46300; &#49324;&#51060;&#51592;)&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color: rgb(255, 255, 255);"&gt;GAS: &lt;code&gt;.lcomm varname, size&lt;/code&gt;&amp;nbsp; &lt;span style="color: rgb(0, 128, 0);"&gt;(&#53412;&#50892;&#46300; &#48320;&#49688;&#51060;&#47492;, &#49324;&#51060;&#51592;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Listing 2 also introduces the concept of a location counter (line 6). NASM provides a special variable (the &lt;code&gt;$&lt;/code&gt; and &lt;code&gt;$$&lt;/code&gt; variables) to manipulate the location counter. In GAS, there is no method to manipulate the location counter and you have to use labels to calculate the next storage location (data, instruction, etc.).&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Listing3(&#50896;&#47928; &#50724;&#53440;&#51064;&#46319; &#49910;&#51020;...;;;)&#45716; 6&#48264;&#51704; &#51460;&#50640;&#49436; &#47196;&#52992;&#51060;&#49496; &#52852;&#50868;&#53552;(&lt;span style="color: rgb(0, 0, 255);"&gt;&#54788;&#51116;&#51032; &#50948;&#52824;&#47484; &#50508;&#47140;&#51452;&#45716; &#53412;&#50892;&#46300;???&lt;/span&gt;) &#51032; &#52968;&#49481;&#51012; &#49548;&#44060;&#54616;&#44256; &#51080;&#45796;. NASM&#51008; &#47196;&#52992;&#51060;&#49496; &#52852;&#50868;&#53552;&#47484; &#45796;&#47336;&#44592; &#50948;&#54644;&#49436; &#53945;&#48324;&#54620; &#48320;&#49688;($ &#50752; $$ &#48320;&#49688;)&#47484; &#51228;&#44277;&#54620;&#45796;. GAS&#50640;&#49436;&#45716; &#47196;&#52992;&#51060;&#49496; &#52852;&#50868;&#53552;&#47484; &#51312;&#51089;&#54616;&#44592; &#50948;&#54620; &#48169;&#48277;&#51060; &#50630;&#44256; &#45796;&#51020; &#51200;&#51109; &#50948;&#52824;(data,&amp;nbsp; instruction, &#44592;&#53440;)&#47484; &#44228;&#49328;&#54616;&#44592; &#50948;&#54644;&#49436;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#47112;&#51060;&#48660;(lable)&#51012; &#49324;&#50857;&#54644;&#50556; &#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;For example, to calculate the length of a string, you would use the following idiom in NASM:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#50696;&#47484; &#46308;&#47732;, &lt;em class="underline"&gt;&lt;strong&gt;&#49828;&#53944;&#47553;&#51032; &#44600;&#51060;&lt;/strong&gt;&lt;/em&gt;&#47484; &#44228;&#49328;&#54616;&#44592; &#50948;&#54644;&#49436;, NASM&#50640;&#49436;&#45716; &#50500;&#47000;&#50640; &#45208;&#50724;&#45716; &#54364;&#54788;&#54805;&#49885;&#51012; &#49324;&#50857;&#54644;&#50556; &#54620;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;prompt_str db 'Enter your name: '&lt;br /&gt;
STR_SIZE equ $ - prompt_str&amp;nbsp; &amp;nbsp; &amp;nbsp;; $ is the location counter&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;$&lt;/code&gt; gives the current value of the location counter, and subtracting the value of the label (all variable names are labels) from this location counter gives the number of bytes present between the declaration of the label and the current location. The &lt;code&gt;equ&lt;/code&gt; directive is used to set the value of the variable STR_SIZE to the expression following it. A similar idiom in GAS looks like this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;$&#45716; &#54788;&#51116;&#51032; &#47196;&#52992;&#51060;&#49496; &#52852;&#50868;&#53552; &#44050;&#51012; &#51456;&#45796;(&lt;span style="color: rgb(0, 0, 255);"&gt;i think, &#54788;&#51116; &#50948;&#52824;&#51032; &#50724;&#54532;&#49483; &#51221;&#46020;&#47484; &#47532;&#53556;&#54620;&#45796;???&lt;/span&gt;)&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&#47196;&#52992;&#51060;&#49496; &#52852;&#50868;&#53552;&#50640;&#49436; &#46972;&#48296;(&#47784;&#46304; &#48320;&#49688;&#51032; &#51060;&#47492;&#51008; &#46972;&#48296;&#51060;&#45796;) &#44050;&#51012; &#48764;&#45716; &#44163;&#51008; &lt;em class="underline"&gt;&#46972;&#48296;&#51032; &#49440;&#50616;&lt;/em&gt;&#44284; &lt;em class="underline"&gt;&#54788;&#51116; &#50948;&#52824;(&lt;/em&gt;&#45824; &#47029; &#50612;&#46356;&#52196;?? $ &#44032; &#51080;&#45716; &#44275;&#51012; &#47568;&#54616;&#45716; &#44148;&#44032;?) &#49324;&#51060;&#50640; &#51316;&#51116;&#54616;&#45716; &#48148;&#51060;&#53944; &#49688;&#47484; &#45336;&#44200;&#51452;&#44172; &#46108;&#45796;. equ &#46356;&#47113;&#54000;&#48652;&#45716; &#48320;&#49688; STR_SIZE&#51032; &#44050;&#51012; &#44536;&#50640; &#46244; &#46384;&#47336;&#45716; &#49688;&#49885;&#51012; &#49483;&#54021;&#54616;&#45716;&#45936; &#49324;&#50857;&#51060; &#46104;&#50612;&#51652;&#45796;. GAS&#50640;&#49436; &#50976;&#49324;&#54620; &#54364;&#54788;&#54805;&#49885;&#51008; &#50500;&#47000;&#47484; &#48372;&#49884;&#46972;^^;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;prompt_str:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;.ascii "Enter Your Name: "&lt;br /&gt;
&lt;br /&gt;
pstr_end:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;.set STR_SIZE, pstr_end - prompt_str&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;The end label (&lt;code&gt;pstr_end&lt;/code&gt;) gives the next location address, and subtracting the starting label address gives the size. Also note the use of &lt;code&gt;.set&lt;/code&gt; to initialize the value of the variable STR_SIZE to the expression following the comma. A corresponding &lt;code&gt;.equ&lt;/code&gt; can also be used. There is no alternative to GAS's &lt;code&gt;set&lt;/code&gt; directive in NASM.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#45149;&#50640; &#51080;&#45716; &#46972;&#48296; pstr_end &#45796;&#51020; &#47196;&#52992;&#51060;&#49496; &#51452;&#49548;(?)&#47484; &#51228;&#44277;&#54620;&#45796;. &#49884;&#51089;&#54616;&#45716; &#46972;&#48296; &#51452;&#49548;&#47484; &#48764;&#45716; &#44163;&#51008; &#49324;&#51060;&#51592;&#47484; &#51456;&#45796;.(?) &#47932;&#47200; &#48320;&#49688; STR_SIZE&#51032; &#44050;&#51012; &#53092;&#47560;&#50640; &#46244; &#46384;&#47336;&#45716; &#49688;&#49885;&#51012; &#52488;&#44592;&#54868;&#54616;&#44592; &#50948;&#54644;&#49436; .set&#47484; &#49324;&#50857;&#54620;&#45796;&#45716; &#44163;&#46020; &#49373;&#44033;&#54644;&#48372;&#51088;.&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&#50976;&#49324;&#54620; .equ&#45716; &#47932;&#47200; &#49324;&#50857;&#51060; &#46104;&#50612;&#51656; &#49688; &#51080;&#45796;(.set &#50752; &#48708;&#49847;&#54616;&#45796;&#45716; &#51060;&#50556;&#44592;???). NASM&#50640;&#49436; GAS &#49483; &#46356;&#47113;&#54000;&#48652;&#47484; &#45824;&#52404;&#54624; &#44163;&#51060; &#50630;&#45796;.&lt;/span&gt; (-_-&#50500; &#55192;&#46308;&#45796;... &#12641;&#12636;)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;As I mentioned, Listing 3 uses macros (line 21). Different macro techniques exist in NASM and GAS, including single-line macros and macro overloading, but I only deal with the basic type here. common use of macros in assembly is clarity. Instead of typing the same piece of code again and again, you can create reusable macros that both avoid this repetition and enhance the look and readability of the code by reducing clutter.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#45236;&#44032; &#47568;&#54620; &#44163; &#52376;&#47100;;; Listing 3&#51032; 21&#48264;&#51704; &#51460;&#50640;&#49436; &#47588;&#53356;&#47196;&#47484; &#49324;&#50857;&#54620;&#45796;. NASM&#44284; GAS&#50640;&#49436; &#45796;&#47480; &#47588;&#53356;&#47196; &#44592;&#48277;&#51060; &#51316;&#51116;&#54616;&#44256; &#49905;&#44544;&#46972;&#51064; &#47588;&#53356;&#47196;&#50752; &#47588;&#53356;&#47196; &#50724;&#48260;&#47196;&#46377;&#51012; &#54252;&#54632;&#54620;&#45796;. &#44536;&#47084;&#45208; &#45208;&#45716; &#50668;&#44592;&#50640;&#49436; &#45800;&#51648; &#44592;&#48376;&#51201;&#51064; &#53440;&#51077;&#47564; &#45796;&#47340;&#45796;. &#50612;&#49480;&#48660;&#47532;&#50640;&#49436; &#44277;&#53685;&#46108; &#47588;&#53356;&#47196;&#51032; &#49324;&#50857;&#51008; &#47749;&#53132;&#54616;&#45796;. &#44057;&#51008; &#53076;&#46300;&#51032; &#51312;&#44033;&#51012; &#51116;&#49324;&#50857;&#54616;&#45716; &#45824;&#49888;&#50640; &#51060;&#47084;&#54620; &#48152;&#48373;&#51012; &#54924;&#54588;&#54616;&#44256; &#44536;&#47532;&#44256; &#50612;&#51648;&#47101;&#44172; &#55145;&#50612;&#51256; &#51080;&#45716; &#44163;&#51012; &#51460;&#51076;&#51004;&#47196;&#49436; &#53076;&#46300;&#47484; &#48372;&#44592; &#51339;&#44172; &#44536;&#47532;&#44256; &#44032;&#46021;&#49457;&#51012; &#50732;&#47532;&#45716; &#51116;&#49324;&#50857; &#54624; &#49688; &#51080;&#45716; &#47588;&#53356;&#47196;&#47484; &#47564;&#46308;&#50612;&#49436; &#49324;&#50857;&#54624; &#49688; &#51080;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;NASM users might be familiar with declaring macros using the &lt;code&gt;%beginmacro&lt;/code&gt; directive and ending them with an &lt;code&gt;%endmacro&lt;/code&gt; directive. A &lt;code&gt;%beginmacro&lt;/code&gt; directive is followed by the macro name. After the macro name comes a count, the number of macro arguments the macro is supposed to have. In NASM, macro arguments are numbered sequentially starting with 1. That is, the first argument to a macro is %1, the second is %2, the third is %3, and so on. For example:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;NASM &#49324;&#50857;&#51088;&#45716; %beginmacro &#46356;&#47113;&#54000;&#48652; &#49324;&#50857;&#44284; %endmacro &#46356;&#47113;&#54000;&#48652;&#47196; &#45149;&#45208;&#45716; &#47588;&#53356;&#47196;&#47484; &#49444;&#47749;&#54616;&#45716;&#45936; &#52828;&#49689;&#54624;&#51648;&#46020; &#47784;&#47480;&#45796;. %beginmarco &#46356;&#47113;&#54000;&#48652; &#46244;&#50640;&#45716; &#47588;&#53356;&#47196; &#51060;&#47492;&#51060; &#51088;&#47532;&#47484; &#51105;&#45716;&#45796;. &#47588;&#53356;&#47196; &#51060;&#47492; &#45796;&#51020;&#50640; &#52509;&#49688;&#44032; &#50728; &#54980;&#50640; &#47588;&#53356;&#47196; &#50500;&#44508;&#47676;&#53944;&#51032; &#49688;&#45716; &#44032;&#51648;&#44172;&#46112; &#44163;&#51004;&#47196; &#46104;&#50612; &#51080;&#45796;-_-;;; NASM&#50640;&#49436; &#47588;&#53356;&#47196; &#50612;&#44508;&#47676;&#53944;&#45716; 1&#48512;&#53552; &#49692;&#52264;&#51201;&#51004;&#47196; &#48264;&#54840;&#44032; &#47588;&#44200;&#51652;&#45796;. &#51593; &#47588;&#53356;&#47196;&#51032; &#52395;&#48264;&#51704; &#50612;&#44508;&#47676;&#53944;&#45716; %1, &#46160;&#48264;&#51704;&#45716; %2, &#49464;&#48264;&#51704;&#45716; %3, &#44592;&#53440; &#46321;&#46321; &#50696;&#47484; &#46308;&#47732; &#50500;&#47000;&#50752; &#44057;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;%beginmacro macroname 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;mov eax, %1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;mov ebx, %2&lt;br /&gt;
%endmacro&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This creates a macro with two arguments, the first being &lt;code&gt;%1&lt;/code&gt; and the second being &lt;code&gt;%2&lt;/code&gt;. Thus, a call to the above macro would look something like this:&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#51060; &#44163;&#51008; 2&#44060;&#51032; &#50500;&#44508;&#47676;&#53944;&#47484; &#44032;&#51648;&#45716; &#47588;&#53356;&#47196;&#47484; &#47564;&#46304;&#45796;. &#52395;&#48264;&#51704;&#45716; %1, &#46160;&#48264;&#51704;&#45716; %2. &#51060;&#50752; &#44057;&#51060; &#50948;&#51032; &#47588;&#53356;&#47196; &#53084;&#51008; &#50500;&#47000;&#50752; &#44057;&#51060; &#50612;&#46500;&#54620; &#44163; &#52376;&#47100; &#48372;&#51068; &#49688; &#51080;&#45796;.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;macroname 5, 6&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Macros can also be created without arguments, in which case they don't specify any number.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&#47588;&#53356;&#47196;&#45716; &#47932;&#47200; &#50500;&#44508;&#47676;&#53944; &#50630;&#51060; &#47564;&#46308;&#50612; &#51656; &#49688; &#51080;&#45796;. &#51060;&#47084;&#54620; &#44221;&#50864; &#44536;&#44163;&#