<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [

<!ENTITY s-intro "<link linkend=s-intro>Introduction</link>">
<!ENTITY s-doyou "<link linkend=s-doyou>Do you need assembly?</link>">
<!ENTITY s-assem "<link linkend=s-assem>Assemblers</link>">
<!ENTITY s-meta "<link linkend=s-meta>Metaprogramming</link>">
<!ENTITY s-call "<link linkend=s-call>Calling conventions</link>">
<!ENTITY s-quick "<link linkend=s-quick>Quick Start</link>">
<!ENTITY s-res "<link linkend=s-res>Resources</link>">
<!ENTITY s-faq "<link linkend=s-faq>FAQ</link>">
<!ENTITY s-list "<link linkend=s-res-list>linux-assembly mailing list</link>">

]>

<!-- $Id: Assembly-HOWTO.sgml,v 1.3 2001/10/27 02:18:17 kss Exp $ -->

<book lang="ko">
<title>Linux Assembly HOWTO : ¸®´ª½º ¾î¼Àºí¸® ÇÏ¿ìÅõ</title>

<bookinfo>

<authorgroup>
<author>
    <firstname>Konstantin</firstname>
    <surname>Boldyshev</surname>
    <affiliation>
	<orgname>
	    <ulink url="http://linuxassembly.org/">
	    Linux Assembly<anchor id="konst"></ulink>
	</orgname>
	<address>
	    <email>konst (at) linuxassembly.org</email>
	</address>
    </affiliation>
</author>
<author>
    <firstname>Francois-Rene</firstname>
    <surname>Rideau</surname>
    <affiliation>
	<orgname>
	    <ulink url="http://tunes.org">
	    Tunes project<anchor id="fare"></ulink>
	</orgname>
	<address>
	    <email>fare (at) tunes.org</email>
	</address>
    </affiliation>
</author>

<othercredit role="translator">
    <firstname>¿µÈÖ</firstname>
    <surname>±è</surname>
    <affiliation>
    <orgname>
        <ulink url="http://lachesis.pe.kr">
        http://lachesis.pe.kr<anchor id="lachesis"></ulink>
    </orgname>
    <address><email>lachesis (at) kldp.org</email></address>
    </affiliation>
</othercredit>

</authorgroup>

<copyright>
<year>1999-2000</year><holder>Konstantin Boldyshev</holder>
</copyright>
<copyright>
<year>1996-1999</year><holder>Francois-Rene Rideau</holder>
</copyright>

<legalnotice><para>
ÀÌ ¹®¼­ÀÇ º¹»ç, ¹èÆ÷ È¤Àº ¼öÁ¤Àº GNU Free Documentation License Version 1.1 ¿¡ µû¸¥´Ù. 
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1;
with no Invariant Sections, with no Front-Cover Texts, and no Back-Cover texts.
</para></legalnotice>

<releaseinfo>Version 0.6</releaseinfo>
<pubdate role="cvs">$Date: 2001/10/27 02:18:17 $</pubdate>

<abstract>
<para>
	ÀÌ ¹®¼­´Â ¸®´ª½º ¾î¼Àºí¸® ÇÏ¿ìÅõÀÌ´Ù. ÀÌ ¹®¼­´Â GNU ÀÇ ÀÚÀ¯ ÇÁ·Î±×·¡¹Ö µµ±¸µéÀ» 
	»ç¿ëÇÏ¿© (ÁÖ·Î) ÀÎÅÚÀÇ 32 ºñÆ® ÇÃ·§Æû(IA32 ; i386)ÀÇ ¸®´ª½º¿¡¼­ ¾î¼Àºí¸® 
	¾ð¾î·Î ÇÁ·Î±×·¡¹Ö ÇÏ´Â ¹ýÀ» ¼³¸íÇÑ´Ù.

	ÀÌ ±Û¿¡¼­ ¼³¸íÇÏ´Â ³»¿ëµéÀº ´Ù¸¥ ÇÏµå¿þ¾î³ª ¼ÒÇÁÆ®¿þ¾î ÇÃ·§Æû¿¡ Àû¿ëµÉ ¼öµµ ÀÖ°í,
	±×·¸Áö ¾ÊÀ» ¼öµµ ÀÖ´Ù.

	(¿ªÁÖ: ÀÌ ¹ø¿ª¹®¼­´Â ºÎÁ·ÇÑ ÀúÀÇ ¹®Àå½Ç·ÂÀ¸·Î ÇÊ¿ä¼º¿¡ ÀÇÇÏ¿© ¹ø¿ªÇÑ °á°ú·Î 
	Àß¸øµÈ ¿À¿ª°ú ÀÇ¹Ì¿¡ ÀÌ»ó¾ø´Â ºÎºÐÀÌ ºüÁú ¼öµµ ÀÖÀ½À» ¹Ì¸® ¾Ë¸³´Ï´Ù. 
	µû¶ó¼­ Àß¸øµÈ ¹ø¿ªÀ¸·Î ¿À´Â Ã¥ÀÓÀº Àú¿¡°Ô ¾øÀ¸¸ç, ¸¸ÀÏ ¼öÁ¤ÇØ¾ß ÇÒ °÷ÀÌ ÀÖ´Ù¸é 
	Àú¿¡°Ô ¿¬¶ôÀ» ÇØÁÖ½Ã±â ¹Ù¶ó¸ç, ¿øÀúÀÇ ¿À·ù¶ó¸é ¿øÀúÀÚ¿¡°Ô ¿¬¶ôÇØÁÖ½Ã±â 
	¹Ù¶ø´Ï´Ù. 
	ºÎÁ·ÇÑ Á¦ ¿µ¾î½Ç·ÂÀ¸·Î ÀÎÇØ ¹ø¿ªÀÌ ¾Ö¸ÅÇÑ ºÎºÐÀº ¿ø¹®À» °°ÀÌ Ç¥±âÇØ µÎ¾ú½À´Ï´Ù.) 
</para>
</abstract>

<keywordset>
<keyword>assembly</keyword>
<keyword>assembler</keyword>
<keyword>asm</keyword>
<keyword>inline</keyword>
<keyword>32-bit</keyword>
<keyword>IA-32</keyword>
<keyword>i386</keyword>
<keyword>x86</keyword>
<keyword>nasm</keyword>
<keyword>gas</keyword>
<keyword>as</keyword>
<keyword>as86</keyword>
<keyword>OS</keyword>
<keyword>Linux</keyword>
<keyword>Unix</keyword>
<keyword>kernel</keyword>
<keyword>system</keyword>
<keyword>libc</keyword>
<keyword>glibc</keyword>
<keyword>system call</keyword>
<keyword>interrupt</keyword>
<keyword>small</keyword>
<keyword>fast</keyword>
<keyword>embedded</keyword>
<keyword>hardware</keyword>
<keyword>port</keyword>
<keyword>macroprocessor</keyword>
<keyword>metaprogramming</keyword>
<keyword>preprocessor</keyword>
</keywordset>

<revhistory>
	<revision>
		<revnumber>¹ø¿ª ¹öÁ¯ 0.6-trans-0.1</revnumber>
		<date>2000. 11. 21 - 2001. 10. 20</date>
		<authorinitials>¶óÅ°½Ã½º</authorinitials>
		<revremark>¹®¼­ ÃÊ¹ú ¹ø¿ª ¿Ï·á : Resource ÀÌÈÄÀÇ °ÍÀº ¹Ì¹ø¿ª</revremark>
	</revision>
</revhistory>

</bookinfo>

<chapter id="s-intro" xreflabel="Introduction">
<?html-filename introduction.html>
<title>¼Ò°³</title>

<note><para>
    ÇÏ¿ìÅõ ¹®¼­¿¡ Ä£¼÷ÇÏ´Ù°Å³ª ¾î¼Àºí¸®¿Í ¹«°üÇÑ ÀÜ¼Ò¸® :-) 
    µéÀ» º¸±â ½ÈÀ¸½Ã¸é ÀÌ ÀåÀ» °Ç³Ê¶Ù¾îµµ ÁÁ´Ù.
</para></note>

<simplesect>
<title>Legal Blurb (¹ýÀû¹®Á¦¿¡ °üÇÑ ÀÜ¼Ò¸®)</title>
<para>
	ÀÌ ¹®¼­ÀÇ º¹»ç, ¹èÆ÷ È¤Àº ¼öÁ¤Àº GNU
	<ulink url="http://www.gnu.org/copyleft/fdl.html">Free Documentation License</ulink> 
	Version 1.1 ¿¡ µû¸¥´Ù. 
	with no Invariant Sections, with no Front-Cover Texts, and no Back-Cover texts.
	A copy of the license is included in the <xref linkend="a-gfdl"> appendix.
</para>
<para>
	ÀÌ ¹®¼­ÀÇ °¡Àå ÃÖ±ÙÀÇ °ø½ÄÆÇÀº 
	<ulink url="http://linuxassembly.org/howto.html">Linux Assembly</ulink> ³ª
	<ulink url="http://linuxdoc.org/docs.html">LDP</ulink> ¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù. 
	¹®¼­ÀÇ »õ·Î¿î ¹öÁ¯À» È®ÀÎÇÏ´Â °ÍÀ» ÀØÁö ¹Ð¶ó.
	<note><para>
		¿ªÀÚ ÁÖ : ÇöÀç ÃÖ½Å ¹öÁ¯Àº 0.6d ÀÌ´Ù. ¹ø¿ª¹®Àº 0.6 À» 
		¹ø¿ªÇÑ °ÍÀÌ´Ù.
	</para></note>
</para>
</simplesect>

<simplesect>
<title>¼­¹®</title>
<para>
	ÀÌ ¹®¼­´Â free ¼ÒÇÁÆ®¿þ¾î¸¦ »ç¿ëÇÑ 32ºñÆ® x86 ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÌ³ª 
	ÇÁ·Î±×·¥µé¿¡ ´ëÇØ Áú¹®ÇÏ´Â »ç¶÷µé¿¡°Ô ´äº¯ÇÏ±â À§ÇØ Á¦ÀÛµÇ¾úÀ¸¸ç, 
	Æ¯È÷ ¸®´ª½º ¿î¿µÃ¼Á¦¸¦ Å¸°ÙÀ¸·Î »ï°í ¼³¸íÀ» ÁøÇàÇÏ°í ÀÖ´Ù.
	¹®¼­ÀÇ ¿©·¯ ºÎºÐ¿¡¼­ Æ¯Á¤ ¼ÒÇÁÆ®¿þ¾î³ª ¹®¼­¸¦ ±¸ÇÏ±â À§ÇÑ url µéÀ» ÀáÁ¶ÇÏ°í, 
	¾ð±ÞÇÏ°í ÀÖ´Ù.
	ÀÌ ¹®¼­´Â ¶ÇÇÑ ÁÖµÈ ¸ñÀûÀÌ ¾Æ´Ñ ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾î°¡ ¾Æ´Ï°Å³ª, x86 ±â¹ÝÀÌ ¾Æ´Ï°Å³ª, 
	32ºñÆ® ¾î¼Àºí·¯°¡ ¾Æ´Ï±âµµ ÇÑ °Íµé¿¡ ´ëÇÑ ¾ð±ÞÀ» ÇÏ±âµµ ÇÑ´Ù.
	¿©·¯ºÐÀÌ ÁÁ¾ÆÇÏ´Â ÇÃ·§Æû¿¡¼­ÀÇ ÇÁ·Î±×·¡¹Ö¿¡ ´ëÇÑ FAQ ¿Í ¹®¼­µéÀÌ ÀÖÀ½À» Ç×»ó
	±â¾ïÇÏ¶ó. ¿©·¯ºÐÀÌ ±×¿¡ ´ëÇÑ ³»¿ëÀ» ¹ß°ßÇÏ·Á¸é ±×(Æ¯Á¤ ÇÃ·§Æû¿¡¼­ÀÇ)¿¡ °üÇÑ ¹®¼­
	µéÀ» ÂüÁ¶ÇÏµµ·Ï ÇÏ¶ó. (¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀ» ¹Ù·Î Ã£Áö ¸»°í, Æ¯Á¤ ÇÃ·§Æû¿¡
	°üÇÑ ¹®¼­¸¦ Ã£À¸¸é µÈ´Ù.)
</para>
<para>
	¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÇ ÁÖµÈ ¸ñÀûÀº ¿î¿µÃ¼Á¦, ÀÎÅÍÇÁ¸®ÅÍ, ÄÄÆÄÀÏ·¯, °ÔÀÓ µî°ú °°Àº 
	ºÐ¾ß¿¡¼­ C ·Î ±¸ÇöÇÏ±â Èûµç ºÎºÐÀ» (ÆÛÆ÷¸Õ½º°¡ ÁÖµÈ issue °¡ µÇ´Â ºÎºÐ) °Çµå¸®±â
	À§ÇÑ °ÍÀÌ±â ¶§¹®¿¡ ÀÌ ¹®¼­¿¡¼­´Â ±×·¯ÇÑ Á¾·ùÀÇ ¼ÒÇÁÆ®¿þ¾î °³¹ß°ú °ü·ÃµÈ ºÎºÐ¿¡
	ÃÐÁ¡À» ¸ÂÃâ °èÈ¹ÀÌ´Ù.
</para>
<para>
    ¸¸¾à ¿©·¯ºÐÀÌ <ulink url="http://www.gnu.org/philosophy/">
    <emphasis>free ¼ÒÇÁÆ®¿þ¾î</emphasis></ulink>°¡ 
    ¹«¾ùÀÎÁö ¸ð¸¥´Ù¸é, GNU 
    <ulink url="http://www.gnu.org/copyleft/gpl.html">General Public License 
    (<acronym>GPL</acronym> È¤Àº <acronym>copyleft</acronym>)</ulink>
    À» <emphasis>ÁÖÀÇ±íÀÌ</emphasis> ÀÐ¾îº¸±â ¹Ù¶õ´Ù. 
    ¾ÆÁÖ ¸¹Àº free ¼ÒÇÁÆ®¿þ¾î(¿ªÀÚ ÁÖ : ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾î
    ¶ó°í ¹ø¿ªÇÏ°Ú´Ù.)µéÀÌ GNU GPL À» µû¸¥´Ù. ¹èÆ÷µÇ´Â 
    ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾îÀÇ ¼Ò½º Áß¿¡
    <filename>COPYING</filename>(È¤Àº <filename>COPYING.LIB</filename>) 
    ÀÌ¶ó´Â ÀÌ¸§ÀÇ ÆÄÀÏ¿¡¼­ ÀÐ¾îº¼ ¼ö ÀÖ´Ù.
    ¶ÇÇÑ, <ulink url="http://www.fsf.org">ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾î Àç´Ü</ulink>
    (Free software foundation : <acronym>FSF</acronym>) ¿¡¼­ Á¦°øÇÏ´Â ¹®¼­µéµµ µµ¿òÀÌ µÉ °ÍÀÌ´Ù.
    ÀÌ·¯ÇÑ ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾î°¡ ¾ÆÁÖ Èï¹ÌÀÖ´Â(!) ÀÌÀ¯´Â ±× ¼ÒÇÁÆ®¿þ¾îµéÀÌ ¼Ò½ºÄÚµå¿Í 
    ÇÔ²² Á¦°øµÇ±â ´ë¹®ÀÌ´Ù. °Ô´Ù°¡ ¿©·¯ºÐÀº ¼Ò½ºÄÚµå¸¦ ¼öÁ¤ÇÏ°Å³ª, ¹ö±×¸¦ Àâ¾Æ¼­
    ´Ù½Ã ¹èÆ÷ÇÒ ¼öµµ ÀÖÀ¸¸ç, ½ÉÁö¾î ±× ÄÚµå¿¡¼­ Â÷¿ëÇÑ ÄÚµå¸¦ °¡Áø ÇÁ·Î±×·¥À» ¸¸µé 
    ¼öµµ ÀÖ´Ù. (ÃâÃ³¸¦ ¹àÈ÷°í, ÀÚ½ÅÀÇ ÄÚµå¸¦ GNU GPL ÇÏ¿¡ °ø°³ÇÑ´Ù¸é)
</para>
</simplesect>

<simplesect>
<title>ÀÌ ¹®¼­¿¡ ±â¿©ÇÏ´Â ¹ý</title>
    <para>
        ÀÌ ¹®¼­´Â ÁøÈ­(!)ÇØ °¡´Â ¹®¼­ÀÌ´Ù. ¿©·¯ºÐÀº ÀÚÀ¯·Ó°Ô ÀÌ ¹®¼­¿¡¼­ ´Ù·ç´Â ÁÖÁ¦¿¡
        ´ëÇØ Áú¹®ÇÒ ¼ö ÀÖÀ¸¸ç, ¶ÇÇÑ, ´äµµ ÇØ ÁÙ¼ö ÀÖ´Ù. ¶ÇÇÑ ÁÖ¾îÁø ´äÀÇ ¿À·ù¸¦ Á¤Á¤ÇØ¼­
        ´Ù½Ã ´äÇØÁÙ ¼öµµ ÀÖ´Ù. »õ·Î¿î ¼ÒÇÁÆ®¿þ¾î¸¦ ¾Ë·ÁÁÙ ¼öµµ ÀÖÀ¸¸ç, ÀÌ ¹®¼­ÀÇ ¹ö±×³ª
        ºñÈ¿À²ÀûÀÎ Á¡À» ÀúÀÚ¿¡°Ô ¾Ë·ÁÁÙ ¼öµµ ÀÖ´Ù.
    </para>
    <para>
        Á¦¹ß!! ±â¿©ÇØ ´Þ¶ó!!
        ¹®¼­ÀÇ ÀúÀÚ¿¡°Ô ¸ÞÀÏÀ» : <link linkend="konst">maintainer</link>.
    </para>

    <note><para>
        ÀÌ ±ÛÀ» ¾²´Â ½ÃÁ¡¿¡, ÀÌ ¹®¼­ÀÇ °ü¸®ÀÚ´Â 
	<link linkend="fare">Francois-Rene Rideau</link> °¡ ¾Æ´Ï¶ó
        <link linkend="konst">Konstantin Boldyshev</link> ÀÌ´Ù.(¹öÁ¯ 0.5ºÎÅÍ ±×·¯Çß´Ù.) 
        ³ª(ÀúÀÚ)´Â ÀÌ ¹®¼­¸¦ ³ª¸¦ ´ë½ÅÇØ¼­ À¯Áö/º¸¼öÇÒ ÁøÁöÇÑ ÇØÄ¿¸¦ ÇÑµ¿¾È Ã£¾Æ ¿ÔÀ¸¸ç, 
	KonstantinÀÌ ³ªÀÇ ÈÄÀÓÀÌ µÇ¾úÀ½À» ±â»Ú°Ô ¹ßÇ¥ÇÏ´Â ¹ÙÀÌ´Ù.
    </para></note>
</simplesect>
</chapter>


<chapter id="s-doyou" xreflabel="Do you need assembly?">
<?html-filename doyouneed.html>
<title>¾î¼Àºí¸®°¡ Á¤¸»·Î(!) ÇÊ¿äÇÑ°¡?</title>

<para>
    À½... ¿©·¯ºÐÀÌ ¹«½¼ÀÏÀ» ÇÏ´ÂÁö ³»°¡ ¾Ë ¼ö ÀÖ´Â ¹æ¹ýÀÌ ¾ø±â ¶§¹®¿¡, ¿©·¯ºÐÀÇ 
    ÀÏ¿¡ ¾î¼Àºí¸®°¡ Á¤¸» ÇÊ¿äÇÑÁö ³»°¡ ÆÇ´ÜÇÒ ¼ö´Â ¾ø´Ù. ´ë½Å, °ÅµìµÈ »ðÁú(-_-)ÀÇ 
    °á°ú·Î ¾òÀº ±ÍÁßÇÑ °æÇèÀÇ Á¶¾ðÀ» ¾Æ·¡¿¡ Àû¾î º¸°Ú´Ù.
</para>

<section>
<title>Pros and Cons - µæ½Ç(¾î¼Àºí¸®¸¦ »ç¿ëÇÔÀ¸·Î½á »ý±â´Â ÀåÁ¡, ´ÜÁ¡)</title>

    <section>
    <title>¾î¼Àºí¸®ÀÇ ÀåÁ¡</title>
    <para>
    ¾î¼Àºí¸®´Â ¸Å¿ì Àú±ÞÀÇ(? - very low things, ÇÏµå¿þ¾î ·¹º§ÀÇ) ÀÏµéÀ» Ã³¸®ÇÒ ¼ö ÀÖ´Ù. :
    <itemizedlist>
        <listitem><para>
            ¿©·¯ºÐÀÌ ¾î¼Àºí¸®¸¦ »ç¿ëÇÏ¸é, Æ¯Á¤ ÇÁ·Î¼¼¼­¿¡¸¸ ÀÖ´Â ·¹Áö½ºÅÍ³ª I/O ¸¦ ¹Ù·Î 
            Á¢±ÙÇÒ ¼ö ÀÖ´Ù.(you can access machine-dependent registers and I/O)
        </para></listitem>
        <listitem><para>
            Å©¸®Æ¼ÄÃ ¼½¼Ç µî¿¡¼­ µ¥µå¶ô°ú °°Àº ÀÏÀ» ¾ß±âÇÒ ¼ö ÀÖ´Â
            ¿©·¯°³ÀÇ ÇÁ·Î¼¼½º ¾²·¹µåµéÀÇ ÄÚµå µ¿ÀÛÀ» ¸Å¿ì Á¤È®ÇÏ°Ô(!) ÄÁÆ®·Ñ ÇÒ ¼ö ÀÖ´Ù.
            Áï, ÄÚµå ÇÏ³ªÇÏ³ªÀÇ µ¿ÀÛÀ» ¸ðµÎ Á¦¾îÇÏ°í, ¿©·¯ºÐÀÌ »ý°¢ÇÑ ´ë·Î ¿òÁ÷ÀÌ°Ô
            ÇÒ ¼ö ÀÖ´Ù.(¿ªÀÚ ÁÖ: ¹°·Ð, ¿©±â¿¡´Â ±×¸¸Å­ÀÇ ³ë·Â°ú ´ñ°¡°¡ µû¸¥´Ù.)
	</para></listitem>
        <listitem><para>
            ÀÏ¹ÝÀûÀÎ ÄÄÆÄÀÏ·¯°¡ Á¦°øÇÏ´Â È¯°æ°ú, »ý¼ºÇÏ´Â ÄÚµåÀÇ ±ÔÄ¢µéÀ» 
	    ¹«½ÃÇÑ Ã¤ ÀÛ¾÷ÇÒ ¼ö ÀÖ´Ù.  ´Ù½Ã ¸»ÇØ¼­, ¼ÓµµÀÇ ÃÖÀûÈ­ µîÀ» À§ÇØ 
	    ¸Þ¸ð¸® ÇÒ´ç¿¡ °üÇÑ ±ÔÄ¢ÀÌ³ª, ¾²·¹µù, ÇÔ¼ö È£Ãâ ±ÔÄ¢°ú 
            °°Àº °ÍµéÀ» ÀÏ½ÃÀûÀ¸·Î ¹«½ÃÇÏ°í ÇÁ·Î±×·¡¹Ö ÇÒ ¼ö ÀÖ´Ù.
	</para></listitem>
        <listitem><para>
            ¼­·Î ´Ù¸¥ ±Ô¾àÀ» »ç¿ëÇÏ´Â ¿©·¯°³ÀÇ ÄÚµåµé °£ÀÇ ÀÎÅÍÆäÀÌ½º¸¦ ±¸ÃàÇÒ ¼ö ÀÖ´Ù. 
            (¿¹¸¦ µé¸é, ´Ù¸¥ ÄÄÆÄÀÏ·¯µé·Î »ý¼ºµÈ ÄÚµåµéÀÌ »óÈ£ ÀÛ¿ëÇÒ ¼ö ÀÖµµ·Ï ¸¸µç´ÙµçÁö,
            low-·¹º§ ÀÎÅÍÆäÀÌ½º°¡ »óÀÌÇÑ ÄÚµåµéÀÇ ÀÎÅÍÆäÀÌ½º¸¦ ÅëÀÏÇÑ´ÙµçÁö ÇÏ´Â ÀÏ ¸»ÀÌ´Ù.)
        </para></listitem>
        <listitem><para>
            ÀÏ¹ÝÀûÀÎ °í¼öÁØ ¾ð¾î(c ³ª pascal °°Àº)¿ë ÄÄÆÄÀÏ·¯·Î´Â »ý¼ºÇÏ±â Èûµç 
	    Æ¯Á¤ ÇÁ·Î¼¼¼­ÀÇ Æ¯¼öÇÑ(!) ÇÁ·Î±×·¡¹Ö ¸ðµå¿¡ Á¢±ÙÇÒ ¼ö ÀÖ´Ù. 
	    ÀÌ¸¦Å×¸é, ÀÎÅÍÆäÀÌ½º ½ºÅ¸Æ®¾÷À» À§ÇØ ÇÁ·Î¼¼¼­ÀÇ 16ºñÆ® ¸ðµå¸¦
            »ç¿ëÇÑ´ÙµçÁö, Æß¿þ¾î¿ë ÇÁ·Î±×·¥À» ¸¸µç´ÙµçÁö, ÀÎÅÚ ÄÄÇ»ÅÍ¿¡¼­ 
	    ·¹°Å½Ã ÄÚµå(legacy code)¸¦ ¸¸µç´ÙµçÁö ÇÏ´Â ÀÏÀ»
            ¾î¼Àºí¸®¸¦ »ç¿ëÇØ¼­ ÇÒ ¼ö ÀÖ´Ù.
        </para></listitem>
        <listitem><para>
            ¶ÇÇÑ, ÄÚµå ÃÖÀûÈ­¸¦ Á¦´ë·Î ½ÃÅ°Áö ¸øÇÏ´Â ³ª»Û(!) ÄÄÆÄÀÏ·¯ÀÇ 
	    ÄÚµå¸¦ Á÷Á¢(!) ÃÖÀûÈ­ ½ÃÄÑ¼­ ±×·± ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ´À·ÁÅÍÁö°í 
	    ºÒÇÊ¿äÇÑ ·çÇÁ³ª ·çÆ¾µéÀ» ¸Å¿ì ºü¸£°í, È¿À²ÀûÀÎ ·çÇÁ·Î
            ¹Ù²Ù¾î ÁÙ ¼ö ÀÖ´Ù. (±×·¯³ª, ¸Å¿ì ÁÁÀº free ÄÄÆÄÀÏ·¯µéÀÌ ÀÖ´Ù. gcc Ã³·³)
        </para></listitem>
        <listitem><para>
            ¿©·¯ºÐÀÇ ÇÏµå¿þ¾î ¼³Á¤¿¡¸¸ ¿Ïº®ÇÏ°Ô ÃÖÀûÈ­µÈ ÄÚµå¸¦ Á÷Á¢ Á¦ÀÛÇÒ ¼ö ÀÖ´Ù.
            ±×·³À¸·Î½á, ¹ü¿ëÀûÀÎ (ÀÏ¹ÝÀûÀÎ) È£È¯(?)À» À§ÇÑ ºÒÇÊ¿äÇÑ ±º»ìÀ» 
	    ¿©·¯ºÐÀÇ ÄÚµå¿¡¼­ »¬ ¼ö ÀÖ´Ù.
        </para></listitem>
        <listitem><para>
            ¸¸¾à ¿©·¯ºÐÀÌ »õ·Î¿î ¾ð¾î¸¦ ¸¸µé°í, ±× ¾ð¾î¸¦ À§ÇØ ÄÄÆÄÀÏ·¯¸¦ ¸¸µç´Ù¸é, 
            (±×·± ÀÏÀ» ÇÏ´Â »ç¶÷Àº ¸î¸í ¾ÈµÇ°í, ¶Ç, ÀÚÁÖ ±×·¯Áöµµ ¾ÊÁö¸¸) 
	    ¿©·¯ºÐÀÇ ÄÄÆÄÀÏ·¯°¡ ÃÖÀûÀÇ ÄÚµå¸¦ »ý»êÇÒ ¼ö ÀÖµµ·Ï Á¶Á¤ÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù.
        </para></listitem>
    </itemizedlist>
    </para>
</section>

<section><title>¾î¼Àºí¸®ÀÇ ´ÜÁ¡</title>
    <para>
    ¾î¼Àºí¸®´Â ¸Å¿ì Àú¼öÁØÀÇ ¾ð¾îÀÌ´Ù. 
    (ÀÌÁø ±â°è¾î ÀÎ½ºÆ®·°¼ÇÀ» ±×´ë·Î ½Éº¼È­ ÇÑ°Í¿¡ Áö³ªÁö ¾Ê´Â´Ù.)
    ÀÌ°ÍÀº ´ÙÀ½°ú °°Àº ÀÇ¹Ì¸¦ °¡Áø´Ù :

    <itemizedlist>
    <listitem><para>
        ¾î¶² ÇÁ·Î±×·¥À» Ã³À½ºÎÅÍ ¾î¼Àºí¸® ÄÚµå¸¦ ÀÌ¿ëÇÏ¿© ÀÛ¼ºÇÏ´Â ÀÏÀº 
	¸Å¿ì ¿À·¡ °É¸®°íµµ Â¥Áõ³ª´Â ÀÛ¾÷ÀÌ´Ù.
    </para></listitem>
    <listitem><para>
        ¹ö±×°¡ ¹ß»ýÇÒ È®·üÀÌ ¸Å¿ì(!) ¸Å¿ì ³ô´Ù.
    </para></listitem>
    <listitem><para>
        °Ô´Ù°¡ ¹ö±×¸¦ ÃßÀûÇØ¼­ Àâ¾Æ³»±â¶õ ²ûÂïÇÒ Á¤µµ·Î ¾î·Æ´Ù.
    </para></listitem>
    <listitem><para>
        ¿©·¯ºÐÀÌ ÀÛ¼ºÇÑ ÄÚµå¸¦ ÀÌÇØÇÏ±âµµ ¾î·Á¿ï »Ó¸¸ ¾Æ´Ï¶ó ¼öÁ¤ÇÏ±âµµ ¾î·Æ±â ±×Áö¾ø´Ù.
        Áï, À¯Áö º¸¼ö°¡ ¾î·Æ´Ù.
    </para></listitem>
    <listitem><para>
        ¾î¼Àºí¸®·Î ÄÚµùÀ» ÇÑ °á°ú¹°Àº ÇöÁ¸ÇÏ°Å³ª ¾ÕÀ¸·Î °³¹ßµÉÁöµµ ¸ð¸£´Â 
	´Ù¸¥ ¾ÆÅ°ÅØÃÄÀÇ ¸Ó½ÅÀ¸·Î ÀÌ½ÄÇÒ ¼ö ¾ø´Ù.
    </para></listitem>
    <listitem><para>
        ¿©·¯ºÐÀÌ ¾î¼Àºí¸®·Î ÃÖÀûÈ­½ÃÄÑ ÀÛ¼ºÇÑ ÄÚµå´Â ¿©·¯ºÐÀÌ °³¹ßÇÑ 
        Å¸°ÙÀÌ µÇ´Â ¾ÆÅ°ÅØÃÄ¿Í µ¿ÀÏÇÑ ¾ÆÅ°ÅØÃÄ¸¦ °¡Áö°í, ¶Ç, µ¿ÀÏÇÑ ¼³Á¤À» ÇÏ°í, µ¿ÀÏÇÑ È¯°æÀ»
        °¡Áø ±â°è¿¡¼­¸¸ ¼öÇàµÉ °ÍÀÌ´Ù.
        ¿¹±Û µé¸é, ÀÎÅÚ °è¿­ÀÇ ÇÁ·Î¼¼¼­µé(Intel 386, 486, Pentium, PPro, PII, PIII, PIV;
        Cyrix 5x86, 6x86, M2; AMD K5, K6 (K6-2, K6-III), K7 (Athlon, Duron).µî) ¸¸ º¸´õ¶óµµ
        ´Ùµé ÇÁ·Î¼¼¼­ÀÇ µðÀÚÀÎÀÌ³ª ±× ¿Ü ¿©·¯ ¿ä¼Òµé(»ó´ëÀû Å¬·° Áö¿¬½Ã°£(?), ¼öÇà¼Óµµ, 
        ¿ë·®, Ä³½¬, ·¥, ¹ö½º, µð½ºÅ©, FPU ÀÇ Á¸Àç¿©ºÎ, MMX, 3DNOW, 
	SIMDÈ®Àå µîµî... ³ª¿­ÇÏ±âµµ Èûµé´Ù)ÀÇ 
        Â÷ÀÌ·Î ÀÎÇØ¼­ ÇÁ·Î¼¼¼­¸¶´Ù ¶Ç, ±× ÁÖº¯ È¯°æ¿¡ µû¶ó¼­
        ¿Ïº®ÇÏ°Ô ´Ù¸¥ ÃÖÀûÈ­ Å×Å©´ÐÀÌ ÇÊ¿äÇÏ´Ù.
        °Ô´Ù°¡ ÇÁ·Î¼¼¼­ÀÇ ¼³°è/µðÀÚÀÎÀº °è¼ÓÀûÀ¸·Î º¯ÇÏ°í, ¹Ù²î°í, ¹ßÀüÇÏ°í ÀÖ±â 
	¶§¹®¿¡, ¹æ±Ý ³ª¿­ÇÑ ¸ñ·Ï°ú ¶ÇÇÑ, ¿©·¯ºÐÀÌ ÃÖÀûÈ­½ÃÅ² ÄÚµå°¡ 
	ÃÖ½ÅÀÇ(!) ÄÚµå°¡ µÇ±â¸¦ ¹Ù¶ó´Â°ÍÀº ¸»µµ ¾ÈµÈ´Ù.
    </para></listitem>
    <listitem><para>
        °Ô´Ù°¡, ÀÚÀßÇÑ ¼¼¹ÐÇÑ ºÎºÐ¿¡ ½Å°æÀ» ¾²´À¶ó ÇÁ·Î±×·¥ ÀüÃ¼ÀÇ ¾Ë°í¸®ÁòÀÌ³ª ¼³°è¿¡ 
        ½Å°æÀ» ¾²Áö ¸øÇÒ °¡´É¼ºÀÌ ´ÙºÐÈ÷ Á¸ÀçÇÑ´Ù.
        </para><para>
        you spend more time on a few details
        and can't focus on small and large algorithmic design,
        that are known to bring the largest part of the speed up
        (e.g. you might spend some time building very fast
        list/array manipulation primitives in assembly;
        only a hash table would have sped up your program much more;
        or, in another context, a binary tree;
        or some high-level structure distributed over a cluster of CPUs)
    </para></listitem>
    <listitem><para>
        ¾Ë°í¸®Áò ¼³°è¸¦ Á¶±Ý¸¸ ¹Ù²Ù¾îµµ ÀÌ¹Ì ¸¸µé¾îµÐ ¾î¼Àºí¸® ÄÚµåÀÇ ÀüÃ¼¸¦ 
        ´Ù½Ã ¸¸µé¾î¾ß ÇÒÁöµµ ¸ð¸¥´Ù.
    </para></listitem>
    <listitem><para>
        ¹¹, Ç¥ÁØ º¥Ä¡¸¶Å© µî, ¾öÃ»³­ ¼öÇà¼Óµµ°¡ ÇÊ¿äÇÏÁö ¾ÊÀº ÇÁ·Î±×·¥ÀÌ¶ó¸é,
        »ó¿ë ÄÄÆÄÀÏ·¯µéÀÌ ¸¸µé¾î³»´Â ¾î¼Àºí¸® ÄÚµåµµ ¼ÕÀ¸·Î 
	¸¸µç°Í Ã³·³ ÁÁÀº ÄÚµå¸¦ »ý»êÇÑ´Ù.
        gcc µµ »ó´çÈ÷ ÁÁÀº ÄÄÆÄÀÏ·¯ÀÌ´Ù.
    </para></listitem>
    <listitem><para>
        ±×¸®°í, ÄÄÆÄÀÏ·¯ ´º½º±×·ì
	(<ulink url="news:comp.compilers">comp.compilers</ulink>)
	ÀÇ moderator ÀÎ John Levine ÀÌ ¸»ÇÑ ³»¿ëÀ» ÀÎ¿ëÇÏ°Ú´Ù.
        </para>

        <literallayout>
        "ÄÄÆÄÀÏ·¯´Â º¹ÀâÇÑ ÀÚ·á±¸Á¶¸¦ ´Ù·ç±â ½±°Ô µµ¿ÍµÐ´Ù. ±×¸®°í, ÄÄÆÄÀÏ·¯¸¦ 
        »ç¿ëÇÑ ÇÁ·Î±×·¥Àº ±×¸® Áö·çÇÏÁöµµ ¾ÊÀ¸¸ç, °Ô´Ù°¡ ¸Å¿ì ÁÁÀº Ç°ÁúÀÇ ÄÚµå¸¦ »ý»êÇØÁØ´Ù."
        </literallayout>
        <literallayout>
        "compilers make it a lot easier to use complex	data structures,
        and compilers don't get bored halfway through
        and generate reliably pretty good code."
        </literallayout>

        <para>
        ÄÄÆÄÀÏ·¯µéÀº °Å´ëÇÑ ÇÁ·Î±×·¥ ÀüÃ¼¿¡ °ÉÃÄ ÇÔ¼öµé°ú, ¸ðµâµé °£ÀÇ ÀÎÅÍÆäÀÌ½º
        ÄÚµå ÃÖÀûÈ­¿Í °°Àº °ÍµéÀ» <emphasis>Á¤È®ÇÏ°Ô</emphasis> ¼öÇàÇØ ÁØ´Ù.
    </para></listitem>
    </itemizedlist>

    </para>
</section>

<section>
<title>°á·Ð</title>
    <para>
        ¿ä¾àÇÏÀÚ¸é, ¿©·¯ºÐÀº ¾î¼Àºí¸®°¡ ÇÊ¿äÇÑ °æ¿ì¸¦ °¡²û ¹ß°ßÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
        ±×¸®°í, ¾î¶² °æ¿ì¿¡´Â ²À ÇÊ¿äÇÏÁö´Â ¾Ê¾Æµµ 
	¾î¼Àºí¸®·Î ÄÚµùÇÏ´Â °ÍÀÌ À¯¿ëÇÑ °æ¿ì¸¦
        ¹ß°ßÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ¸ç, ¿©·¯ºÐÀÌ ±×·¸°Ô ´À³¤´Ù¸é, ±×·¸°Ô ÇÏ¶ó.
        ´ÜÁö, ´ÙÀ½ »çÇ×µéÀ» ¸í½ÉÇÏ°í, ±×·¸°Ô ÇÑ´Ù¸é ÁÁÀ» °ÍÀÌ´Ù. :

        <itemizedlist>
        <listitem><para>
            ¾î¼Àºí¸® ÄÚµåÀÇ »ç¿ëÀ» ÃÖ¼ÒÈ­ÇÏ¶ó
        </para></listitem>

        <listitem><para>
            ¸Å¿ì Àß Á¤ÀÇµÈ ÀÎÅÍÆäÀÌ½º ³»ºÎ·Î ¾î¼Àºí¸® ÄÚµå¸¦ Ä¸½¶È­(!)ÇÏ¶ó.
        </para></listitem>

        <listitem><para>
            ¿©·¯ºÐÀÇ ¾î¼Àºí¸® ÄÚµå°¡ º¸´Ù °í¼öÁØÀÇ ¾ð¾îÆÐÅÏÀ¸·ÎºÎÅÍ 
            ÀÚµ¿ÀûÀ¸·Î »ý¼ºµÈ ÄÚµåÀÎ°¡? (¿¹¸¦ µé¸é gcc ÀÇ ÀÎ¶óÀÎ ¾î¼Àºí¸® ¸ÅÅ©·Î µî°ú °°Àº)
        </para></listitem>

        <listitem><para>
            ±× ÇÁ·Î±×·¥µéÀ» ¾î¼Àºí¸® ÄÚµå·Î ¹ø¿ªÇÑ ÈÄ ºñ±³ÇØ º¸¶ó
            </para><para>
            have automatic tools translate these programs
            into assembly code
        </para></listitem>
        <listitem><para>
            °¡´ÉÇÑ ¸¸Å­ ÄÚµåµéÀÌ ÃÖÀûÈ­ µÇ¾ú´Â°¡(have this code be optimized if possible)
        </para></listitem>
        <listitem><para>
            À§ÀÇ »çÇ×µéÀ» Àß Ã¼Å©ÇØ º¸°í, ÃÖÀûÈ­µÈ ÁÁÀº ÄÚµå¸¦ »ý»êÇÏ´Â 
            ÄÄÆÄÀÏ·¯ÀÇ back-end ¸¦ Àß ÀÌ¿ëÇÏ¶ó.
            </para><para>
            All of the above,
            i.e. write (an extension to) an optimizing compiler back-end.
        </para></listitem>
        </itemizedlist>
    </para>

    <para>
        ºñ·Ï ¿î¿µÃ¼Á¦ °³¹ß°ú °°ÀÌ ¾î¼Àºí¸®°¡ ²À ÇÊ¿äÇÑ °ÍÃ³·³ º¸ÀÌ´Â °æ¿ì¶ó ÇÒÁö¶óµµ À§¿¡¼­
        ¾ð±ÞÇÑ ³»¿ëµéÀ» ÁÖÀÇ±í°Ô »ý°¢ÇØ º» ÈÄ¿¡ ¾î¼Àºí¸®ÀÇ »ç¿ë ¿©ºÎ¸¦ °áÁ¤ÇÏ¶ó
    </para>

    <para>
        ¸®´ª½ºÀÇ Ä¿³Î ¼Ò½º¸¦ ÇÑ¹ø º¸µµ·Ï ÇÏ¶ó :
        ¸®´ª½ºÀÇ Ä¿³ÎÀº ÇÊ¿äÇÑ Á¤¸» ÃÖ¼Ò(!)ÀÇ ¾î¼Àºí¸® ÄÚµå¸¸ »ç¿ëµÇ¾ú´Ù.
        ±× °á°ú·Î ºü¸£°í, ½Å·Ú¼ºÀÖ°í, Æ÷ÅÍºíÇÏ¸ç, À¯Áöº¸¼öÇÏ±â ¿ëÀÌÇÑ ¿î¿µÃ¼Á¦ÀÇ ÄÚµå°¡
        »ý¼ºµÇ°Ô µÇ¾ú´Ù. °Ô´Ù°¡ µÒ°ú °°Àº °ÔÀÓÁ¶Â÷µµ ¼Óµµ Çâ»óÀ» À§ÇÑ ÀÏºÎ ¸Å¿ì
        ÀÛÀº ·çÆ¾À» Á¦¿ÜÇÏ°í´Â ´ëºÎºÐ c ¸¦ ÀÌ¿ëÇØ¼­ ¸¸µé¾îÁ³´Ù´Â »ç½ÇÀ» Ç×»ó »ó±âÇÏ¶ó.
    </para>
</section>
</section>

<section>
<?html-filename howtonot.html>
<title>¾î¼Àºí¸®¸¦ »ç¿ëÇÏÁö ¾Ê´Â ¹æ¹ý</title>

    <section><title>È¿À²ÀÌ ³ôÀº ÄÚµå¸¦ »ý¼ºÇÏ±â À§ÇÑ ÀÏ¹ÝÀûÀÎ ÀýÂ÷</title>
        <para>
            ´º½º±×·ì <ulink url="news:comp.compilers">comp.compilers</ulink> 
	    ÀÇ Charles Fiterman ÀÌ »ç¶÷ÀÌ ¼öÀÛ¾÷ÇÑ ¾î¼Àºí¸® ÄÚµå¿Í ÄÄÆÄÀÏ·¯°¡ 
	    »ý¼ºÇÑ ¾î¼Àºí¸® ÄÚµå¸¦ ºñ±³ÇØ¼­ ÇÑ ¸»À» 
            ÀÎ¿ëÇÏ°Ú´Ù.
        </para>
        <blockquote>
            <literallayout>
            »ç¶÷ÀÌ ¼öÀÛ¾÷ÇÑ ÄÚµå°¡ ¾ðÁ¦³ª ´õ ¿ì¼öÇÑ ¼º´ÉÀ» º¸ÀÎ´Ù. ÀÌÀ¯´Â
            »ç¶÷Àº ¸ÕÀú, °í¼öÁØÀÇ ¾ð¾î·Î ÀüÃ¼ ÇÁ·Î±×·¥À» ¸¸µç´Ù.
            ±×¸®°í, ±×·¸°Ô ÇØ¼­ »ý¼ºÇÑ ÄÚµåÀÇ ½Ã°£À» Àâ¾Æ¸Ô´Â µî ºñÈ¿À²ÀûÀÎ ºÎºÐÀ» Ã£¾Æ³½´Ù.
            ±×¸®°í³ª¼­, ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ¾î¼Àºí¸® ÄÚµå¸¦ ÀÚ½ÅÀÌ ¼öÁ¤ÇÑ È¿À²ÀûÀÌ°í ÀûÀº ÄÚµå·Î ´ëÃ¼ÇÑ´Ù.
            ¸¶Áö¸·À¸·Î, ±â°è°¡ »ý¼ºÇÑ ÄÚµå¿¡ ºñ±³ÇØ Á¶±Ý ´õ ³ªÀº ¼º´ÉÀÇ ÄÚµå¸¦ ¼öÀÛ¾÷ÇØ¼­
            ¸¸µé¾î³½´Ù.
            ÀÎ°£ÀÌ ¸¸µç ÄÚµå°¡ ¾ðÁ¦³ª ´õ ¶Ù¾î³ª´Ù. ÀÎ°£Àº ±â°è¸¦ »ç¿ëÇÒ ¼ö ÀÖ±â ¶§¹®ÀÌ´Ù.
        </literallayout></blockquote>
    </section>

    <section><title>ÃÖÀûÈ­µÈ ÁÁÀº ÄÚµå¸¦ »ý¼ºÇÏ´Â ÄÄÆÄÀÏ·¯¸¦ °¡Áø ¾ð¾îµé</title>
        <para>
            ObjectiveCAML, SML, CommonLISP, Scheme, ADA, Pascal, C, C++, µî°ú °°Àº ¾ð¾îµéÀº
            ¸ðµÎ ÁÁÀº free ÄÄÆÄÀÏ·¯¸¦ °¡Áö°í ÀÖÀ¸¸ç, ±×·¯ÇÑ ÄÄÆÄÀÏ·¯¸¦ »ç¿ëÇØ¼­ »ý¼ºÇÑ
            ÄÚµåµéÀº ¸Å¿ì ÃÖÀûÈ­µÈ ÄÚµå¸¦ ¸¸µé¾îÁØ´Ù.
            °Ô´Ù°¡ Á¾Á¾, ¼öÀÛ¾÷À¸·Î ¸¸µç ¾î¼Àºí¸® ÄÚµåº¸´Ù ´õ ³ªÀº ÃÖÀûÈ­¸¦ º¸¿©ÁÖ±âµµ ÇÑ´Ù.
            ±×¿¡ ´õÇÏ¿©, ¿©·¯ºÐÀÌ º¸´Ù ³ôÀº ¼öÁØÀÇ ¼¼ºÎÀûÀÎ °Í¿¡, Áï, ¾Ë°í¸®ÁòÀÌ³ª,
            ÇÁ·Î±×·¥ÀÇ ÀüÃ¼ ¼³°è¿Í °°Àº ºÎºÐ¿¡ º¸´Ù ½Å°æÀ» ¾²µµ·Ï µµ¿ÍÁØ´Ù.
            ±×¸®°í, ±×Ã³·³ ¼³°è¿Í °°Àº ºÎºÐ¿¡ º¸´Ù ½Å°æÀ» ¾¸À¸·Î½á, 
            ÀÚÀßÇÑ, ¸î¸î ºÎºÐ¿¡¼­ÀÇ ¾à°£ÀÇ ¼öÇà¼ÓµµÀÇ ¼Õ½ÇÀº º¸´Ù ³ªÀº µðÀÚÀÎ¿¡ ÀÇÇÑ
            È¿°ú°¡ ÃæºÐÈ÷ »ó¼â½ÃÄÑ ÁÖ°íµµ ³²´Â´Ù.
            ¹°·Ð, »ó¿ëÀÇ ¾Õ¼­ ¾ð±ÞÇÑ ¾ð¾î¸¦ Áö¿øÇÏ´Â ÈÇ¸¢ÇÑ ÄÄÆÄÀÏ·¯µéµµ ÀÖ´Ù.
        </para>
        <para>
            LISP, Scheme, Perl µîÀÇ ¾ð¾îÀÇ ÄÄÆÄÀÏ·¯´Â c ÄÚµå¸¦ »ý¼ºÇÏ±âµµ ÇÑ´Ù.
            ±×·¸°Ô ÇØ¼­ »ý¼ºµÈ c ÄÚµå´Â c ÄÄÆÄÀÏ·¯¿¡ ÀÇÇØ¼­ ÃÖÀûÈ­µÇ¸ç,
            ¼Óµµµµ ²Ï ºü¸¥ ÆíÀÌ´Ù.
        </para>
    </section>

    <section><title>¿©·¯ºÐÀÇ ÄÚµåÀÇ ¼öÇà¼Óµµ¸¦ ³ôÀÌ´Â ÀÏ¹ÝÀûÀÎ ÀýÂ÷</title>
        <para>
        ÄÚµåÀÇ ¼öÇà¼Óµµ¸¦ ³ôÀÌ±â À§ÇØ ¿©·¯ºÐÀº ÇÁ·ÎÆÄÀÏ ÅøÀÌ °è¼ÓÀûÀ¸·Î
        ¼öÇà¼º´ÉÀÇ º´¸ñ Çö»óÀÌ ÀÏ¾î³­´Ù°í ÁöÀûÇÏ´Â ºÎºÐÀÇ ÄÚµå¿¡ ´ëÇØ¼­¸¸
        ÃÖÀûÈ­ÀÇ ÀÛ¾÷À» ÇØ ÁÖ¸é µÈ´Ù.
        </para>
        
        <para>
        ¿©·¯ºÐÀÌ ÄÚµåÀÇ ÀÏºÎºÐÀÌ ³Ê¹« ´À¸®´Ù´Â °ÍÀ» ¾Ë¾ÆÃ¤¸é, ´ÙÀ½°ú °°Àº Á¶Ä¡¸¦ ÃëÇØ º¸¶ó
            <itemizedlist>
            <listitem><para>
                ¸ÕÀú, ´õ ³ªÀº ¾Ë°í¸®ÁòÀ» »ç¿ëÇÏµµ·Ï ÇÏ¶ó.
            </para></listitem>
            <listitem><para>
                ±×¸®°í ³ª¼­, ±× ÄÚµå¸¦ ÀÎÅÍÇÁ¸®Æ® ÇÏÁö ¸»°í, ÄÄÆÄÀÏ(!) ÇÏµµ·Ï ÇÏ¶ó.
            </para></listitem>
            <listitem><para>
                ¿©·¯ºÐÀÇ ÄÄÆÄÀÏ·¯ÀÇ tweak optimization À» È°¼ºÈ­½ÃÄÑ¼­ ÄÄÆÄÀÏÇÏ¶ó.
            </para></listitem>
            <listitem><para>
		±×¸®°í ³ª¼­, ÄÄÆÄÀÏ·¯¿¡°Ô ÃÖÀûÈ­ ½ÃÅ°´Â ¹ý¿¡ °üÇÑ ÈùÆ®¸¦ ÁÖ¾î¶ó
		(ÃÖÀûÈ­ Á¤º¸¸¦ ¸®½ºÇÁ·Î ¸¸µé°í, gcc µîÀ¸·Î µî·Ï½ÃÄÑ¶ó. 
		´ëºÎºÐÀÇ ÄÄÆÄÀÏ·¯¿¡´Â ¸¹Àº ¿É¼ÇÀÌ ÀÖ´Ù.)
		(¿ªÀÚ ÁÖ:¹ø¿ªÀÌ ³Ê¹« ¸Å²ô·´Áö ¸øÇÏ±º¿ä -_-;)
		</para><para>
		then give the compiler hints about how to optimize
		(typing information in LISP; register usage with GCC;
		lots of options in most compilers, etc).
            </para></listitem>
            <listitem><para>
		±×¿Í°°ÀÌ ÇÑ´Ù¸é, ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀ» ÃæºÐÈ÷ ´ë½ÅÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
            </para></listitem>
            </itemizedlist>
        </para>

        <para>
		¸¶Áö¸·À¸·Î, ¿©·¯ºÐÀÌ ¾î¼Àºí¸® ÄÚµåÀÇ ÀÛ¼ºÀ» ¸¶¹«¸®ÇÏ±â Àü¿¡ 
		»ý¼ºµÈ ÄÚµåµéÀ» °Ë»çÇØ¼­ ÃÖÀûÈ­µÇÁö ¾ÊÀº »óÅÂ·Î ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ
		ÄÚµå°¡ Á¤¸» ¹®Á¦°¡ µÇ´ÂÁö¸¦ È®ÀÎÇØ º¸¶ó.
		´ëºÎºÐ, ±×·¸Áö ¾ÊÀ» °ÍÀÌ´Ù. ¿ÀÈ÷·Á ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇØ ÁØ ÄÚµå°¡
		¿©·¯ºÐÀÌ Á÷Á¢ ÀÛ¼ºÇÑ ÄÚµåº¸´Ù ´õ ³ªÀ» ¼öµµ ÀÖ´Ù.
		Æ¯È÷, ¿À´Ã³¯ÀÇ º¹ÀâÇÑ, multi-pipelined ¾ÆÅ°ÅØÃÄ ±â¹ÝÀÇ ÇÏµå¿þ¾î¸¦
		»ç¿ëÇÏ´Â È¯°æ¿¡¼­ÀÇ ÇÁ·Î±×·¥ÀÏ °æ¿ì¿¡´Â ´õ¿í ±×·¯ÇÏ´Ù.
		</para>
	<para>
		ÇÁ·Î±×·¥¿¡¼­ ½Ã°£À» ¸¹ÀÌ Àâ¾Æ¸Ô´Â ºÎºÐÀº Á¤¸» ±×·¯ÇÑµ¥(?-¹ø¿ªÀÌ ÀÌ»óÇÕ´Ï´Ù...-_-;)
		¿Ö³ÄÇÏ¸é, ¿À´Ã³¯ÀÇ ÃÊ°í¼Ó :-)ÀÇ ÇÁ·Î¼¼¼­µé¿¡¼­´Â ½ÇÇà ½Ã°£À» ´ÊÃß´Â
		ÁÖ ¿øÀÎÀ¸·Î, ¸Þ¸ð¸® Á¢±Ù(¸Þ¸ð¸®¿¡ Á¢±ÙÇÏ´Âµ¥ °É¸®´Â ½Ã°£Àº ·¹Áö½ºÅÍ¿¡
		Á¢±ÙÇÏ´Â µ¥ °É¸®´Â ½Ã°£ÀÇ ¸î¹è¿¡¼­ ¸î½Ê¹è´Â ´õ ±æ´Ù), Ä³½¬ÀÇ 
		ºÎÀç, TLB (¿ªÀÚÁÖ : Transtate lookaside buffer:ÀÎÅÚ °è¿­ÀÇ ÇÁ·Î¼¼¼­¿¡¼­ 
		¸Þ¸ð¸® ÁÖ¼ÒÀÇ »óÈ£º¯È¯À» º¸´Ù »¡¸® ÇÏ±â À§ÇØ descriptor ¸¦ ÀúÀåÇÏ´Â 
		Ä³½¬¿Í ºñ½ÁÇÑ °Í)
		ÀÇ ºÎÀç, ÆäÀÌÁö ÆúÆ® µîÀÇ ¿øÀÎÀÌ ÀÖ´Ù.
		µû¶ó¼­, ·¹Áö½ºÅÍ¸¦ ÃÖÀûÈ­ ÇÏ´Â°ÍÀº Á¡Â÷ º° ¾µ¸ð°¡ ¾ø¾îÁö°Ô µÇ¾ú´Ù.
		´ë½Å, ÀÚ·á ±¸Á¶¿Í ¾²·¹µùÀÇ Á¶ÀýÀ» ÅëÇØ¼­ ¸Þ¸ð¸®¿¡ Á¢±ÙÇÏ´Â È½¼ö¸¦
		ÁÙÀÌ´Â °ÍÀÌ º¸´Ù ³ªÀº ¼Óµµ¸¦ ¾ò´Âµ¥ ´õ È¿°úÀûÀÌ µÇ¾ú´Ù.
		¾Æ¸¶µµ, ¿ÏÀüÈ÷ ´Ù¸¥ ¹æÇâ¿¡¼­ÀÇ Á¢±ÙÀÌ µµ¿òÀÌ µÉÁöµµ ¸ð¸¥´Ù.
	</para>
    </section>

    <section><title>ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ÄÚµå¿¡ ´ëÇÑ °íÂû</title>
        <para>
	ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇØ ³½ ¾î¼Àºí¸® ÄÚµå¸¦ °íÂûÇØ º¸¾Æ¾ß ÇÒ ¸¹Àº ÀÌÀ¯°¡ ÀÖ´Ù.
	¿©·¯ºÐÀÌ ÇØ¾ß ÇÒ ÀÏÀº 

        <itemizedlist>
        <listitem><para>
	ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ÄÚµå°¡ ¼öÀÛ¾÷À¸·Î ¸¸µç ¾î¼Àºí¸® ÄÚµåº¸´Ù ´õ ³ªÀºÁö
	Á¤¸» °Ë»çÇØ º¼ °Í (¶Ç´Â, ÄÄÆÄÀÏ·¯ÀÇ ¿É¼ÇÀ» ¸Å¿ì ¼¼¹ÐÇÏ°Ô Á¶Á¤ÇØ º¼ °Í)
        </para></listitem>
        <listitem><para>
        ±×·² °æ¿ì (¿ªÀÚ ÁÖ:ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ÄÚµå°¡ ¸¶À½¿¡ µéÁö ¾Ê´Â´Ù´Â »ý°¢ÀÌ µé¶§)
        Ã³À½ºÎÅÍ ¿ÏÀüÈ÷ ¼ÕÀ¸·Î ¸¸µå´Â °Í º¸´Ù
        ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ¹Ù·Î ±× ÄÚµå¸¦ ¼öÁ¤ÇÏ´Â °ÍÀ¸·Î ÃÖÀûÈ­ÇÏ¶ó
        </para></listitem>
        <listitem><para>
        º¸´Ù ÀÏ¹ÝÀûÀ¸·Î ÀÌ¾ß±âÇØ¼­, ÄÄÆÄÀÏ·¯°¡ ¸¸µé¾î³½ ÄÚµå¸¦ 
        ´ÜÁö, ¿©·¯ºÐÀÇ ¾î¼Àºí¸® ·çÆ¾°ú ¿ÜºÎ ·çÆ¾ÀÇ ÀÎÅÍÆäÀÌ½º¸¸ Á¦°øÇÏ´Â 
        »À´ë¸¸ »ý¼ºµÈ ½ºÅÓ(stub) ÄÚµå·Î °£ÁÖÇÏ°í ÀÛ¾÷ÇÏ¶ó.
        </para></listitem>
        <listitem><para>
        (±×·² ÀÏÀº º°·Î ¾ø°ÚÁö¸¸)¿©·¯ºÐÀÇ ÄÄÆÄÀÏ·¯°¡ »ý¼ºÇÑ ÄÚµå¸¦ µû¶ó ÀÐ¾î ³»·Á°¡¸é¼­
        ¹ö±×¸¦ Ã£µµ·Ï ÇÏ¶ó.(track down bugs in your compiler (hopefully the rarer))
        </para></listitem>
        </itemizedlist>

        </para>

        <para>
            °á·ÐÀûÀ¸·Î, ¾î¼Àºí¸®·Î ÄÚµùÇÏ´Â Ç¥ÁØ(?)ÀûÀÎ ¹æ¹ýÀº
            ¿©·¯ºÐÀÇ ÄÄÆÄÀÏ·¯¿¡(gcc ÀÏ °ÍÀÌ¶ó°í °¡Á¤ÇÏ°í..) <option>-S</option> ¿É¼ÇÀ» 
            ÁÖ°í c µîÀ¸·Î ÀÛ¼ºµÈ ÇÁ·Î±×·¥À» ÄÄÆÄÀÏÇØ¼­ »ý¼ºµÈ ¾î¼Àºí¸® ÄÚµå¸¦ »ç¿ëÇØ¼­ 
            ÇÁ·Î±×·¥À» ¸¸µå´Â °ÍÀÌ´Ù.
            ´ëºÎºÐÀÇ À¯´Ð½º °è¿­¿¡¼­ »ç¿ëµÇ´Â ÄÄÆÄÀÏ·¯·Î °¡´ÉÇÏ´Ù.
            gcc ¸¦ »ç¿ëÇÒ °æ¿ì, <option>-fverbose-asm</option> ¿É¼Çµµ ÁØ »óÅÂ¿¡¼­
            ÄÄÆÄÀÏÇÑ´Ù¸é, º¸´Ù ¾Ë±â½¬¿î ¾î¼Àºí¸® ÄÚµå¸¦ »ý»êÇÒ °ÍÀÌ´Ù.
            ¹°·Ð, ÈÇ¸¢ÇÑ(!) ¾î¼Àºí¸® ÄÚµå¸¦ ¾ò±â¸¦ ¿øÇÑ´Ù¸é, 
            ¿©·¯ºÐÀÌ Æò¼Ò¿¡ »ç¿ëÇÏ´ø ÃÖÀûÈ­ ¿É¼Ç°ú ÈùÆ®¸¦ ÄÄÆÄÀÏ·¯¿¡ ÁÖ´Â °ÍÀ» ÀØÁö ¸»¶ó.
        </para>
    </section>
</section>

<section>
<?html-filename landa.html>
<title>¸®´ª½º¿Í ¾î¼Àºí¸®</title>

    <para>
        ¿©·¯ºÐµµ ´«Ä¡ÃªÀ» Å×Áö¸¸, ÀÏ¹ÝÀûÀ¸·Î, ¸®´ª½º¿¡¼­ ÇÁ·Î±×·¡¹ÖÀ» ÇÏ¸é¼­
        ¾î¼Àºí¸®¸¦ »ç¿ëÇÒ ÇÊ¿ä´Â ¾ø´Ù.
        ¸®´ª½º´Â µµ½º¿Í´Â ´Þ¶ó¼­, µå¶óÀÌ¹ö¿Í °°Àº °ÍµéÀ» ¾î¼Àºí¸®·Î 
        ÀÛ¼ºÇÒ ÇÊ¿ä´Â ¾ø´Ù (À½.. ¸¸¾à ¿©·¯ºÐÀÌ ¾î¼Àºí¸®·Î ¸¸µé°Ú´Ù¸é ÇÒ ¼ö ¾øÁö¸¸ ¸»ÀÌ´Ù)
        ±×¸®°í, ¿À´Ã³¯ÀÇ ÁÁÀº ÄÄÆÄÀÏ·¯µéÀ» ÀÌ¿ëÇÑ´Ù¸é, ¼­·Î ´Ù¸¥ ÇÁ·Î¼¼¼­µéÀ» 
        Å¸°ÙÀ¸·Î °¢°¢ ¼öÇà¼ÓµµÀÇ ÃÖÀûÈ­¸¦ ÇÏ±â¸¦ ¿øÇÏ´õ¶óµµ, c ¾ð¾î¸¦ »ç¿ëÇØ¼­
        ÇÁ·Î±×·¡¹ÖÇÏ´Â °ÍÀÌ ¾î¼Àºí¸®·Î ÇÏ´Â °Íº¸´Ù ´õ ½±´Ù.
        ±×·¯³ª... ±×·³¿¡µµ ºÒ±¸ÇÏ°í, c ³ª c++ º¸´Ù ¾î¼Àºí¸®°¡ ´õ ÀûÀýÇÑ °æ¿ì°¡ ÀÖÀ» °ÍÀÌ´Ù.
    </para>
    <para>
        ¿©·¯ºÐÀÌ ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀ» <emphasis>ÇÊ¿ä·Î</emphasis> ÇÏ°Å³ª,
        È¤Àº ¾î¼Àºí¸® ¾ð¾î¸¦ »ç¿ëÇÏ±â¸¦ <emphasis>¿øÇÒÁöµµ</emphasis> ¸ð¸¥´Ù.
        °£´ÜÈ÷ ¾ê±âÇØ¼­, ¾î¼Àºí¸®ÀÇ ¹Ì±ÃÀ¸·Î ¶Ù¾îµé¾î¾ß ÇÏ´Â °æ¿ì´Â
        <emphasis>¸Å¿ì ÀÛÀº ÄÚµå</emphasis>°¡ ÇÊ¿äÇÏ°Å³ª 
	<application>libc</application> ¿¡ µ¶¸³ÀûÀÎ, Áï,
        ¶óÀÌºê·¯¸®¸¦ ÇÊ¿ä·Î ÇÏÁö ¾Ê´Â ÇÁ·Î±×·¥À» ¸¸µé¾î¾ß ÇÏ´Â Á».. ºñÁ¤»óÀûÀÎ(?)
        °æ¿ì ¹Û¿¡´Â ¾ø´Ù. ±×¸®°í, °¡Àå ÀÚÁÖ º¸°Ô µÇ´Â ±×·¯ÇÑ °æ¿ì´Â,
        ½ÅÈ­½Ã´ëÀÇ(!) Àü¼³ÀûÀÎ ±¤±âÀÇ ÇØÄ¿Ã³·³ µÇ°í ½Í¾îÇÏ´Â »ç¶÷ÀÇ °æ¿ìÀÌ´Ù.
        ±×·± »ç¶÷Àº ÁÖ·Î ½º¹«»ì °¡·®ÀÇ, ¸ðµç°ÍÀ» ÀÚ½ÅÀÌ ´Ù ¾Ë¾Æ¾ß ÇÏ°í, ¸ðµç°ÍÀ»
        ½º½º·Î ÇÏ°í ½Í¾îÇÏ°í, ¸ðµç°ÍÀ» ¾î¼Àºí¸®·Î ÇÏ°í ½Í¾îÇÏ´Â »ç¶÷ÀÌ ¸¹´Ù. :-) 
        (¿ªÀÚ ÁÖ:¿ªÀÚÀÇ ÀÇ¿ªÀÌ ³Ê¹«(!) ¸¹¾Ò½À´Ï´Ù. ¾Æ·¡¿¡ - ±×·¡¿ÔµíÀÌ - ¿ø¹®À» º¸ÀÔ´Ï´Ù.
    </para>
    <para>
        You may <emphasis>need</emphasis> to use assembly, 
	or you may <emphasis>want</emphasis> to use assembly.
        In short, main practical (<emphasis>need</emphasis>) reasons
        of diving into the assembly realm are <emphasis>small code</emphasis>
        and <emphasis><application>libc</application> independence</emphasis>.
        Impractical (<emphasis>want</emphasis>), and the most often reason is
        being just an old crazy hacker,
        who has twenty years old habit of doing everything in assembly language.
    </para>

    <para>
        ±×·¯³ª, ¿©·¯ºÐÀÌ ¸®´ª½º¸¦ ÀÓº£µðµå ½Ã½ºÅÛ¿¡ Æ÷ÆÃÇÏ·Á´Â °æ¿ì,
        ÀüÃ¼ ÇÁ·Î±×·¥ÀÇ Å©±â¿¡ »ó´çÈ÷ ¿¹¹ÎÇØ ÁúÅÙµ¥, 
        Áï, Ä¿³Î, libc, À¯Æ¿¸®Æ¼µé<application>(file|find|text|sh|etc.)</application>
        ÀüºÎ¸¦ ´ÜÁö ¸î¹é kb ÀÇ ÀÛÀº Å©±â¿¡ ¸ÂÃß¾î ³ÖÀ»·Á°í ÇÏ°í, 1Å³·Î¹ÙÀÌÆ®°¡ ´Ã¾î³¯ 
        ¶§¸¶´Ù ½Ã½ºÅÛ »ý»ê ºñ¿ëÀÌ ³Ê¹« ¸¹ÀÌ µé ¶§°¡ ÀÖÀ» °ÍÀÌ´Ù.
        ±×·² °æ¿ì¿¡´Â ½Ã½ºÅÛÀÇ ÀÏºÎ È¤Àº ÀüºÎ¸¦ ¾î¼Àºí¸®·Î ÀçÀÛ¼ºÇÏ´Â °Íµµ ÇÑ ¹æ¹ýÀÌ µÉ ¼ö ÀÖ´Ù.
        ±×¸®°í, ±×·¸°Ô ÇÑ´Ù¸é, »çÀÌÁî´Â °¨µ¿ÀûÀ¸·Î(! Á¤¸»·Î) ÀÛ¾ÆÁú °ÍÀÌ´Ù.
        ¿¹¸¦ ÇÏ³ª µé¾îº¸ÀÚ. ¾î¼Àºí¸®·Î °£´ÜÇÑ <command>httpd</command> µ¥¸óÀ» ¸¸µé¸é
        600¹ÙÀÌÆ® ÀÌÇÏ·Î ¸¸µé¾îÁú ¼ö ÀÖ´Ù. ±×·¯¸é, ¿©·¯ºÐÀº Ä¿³Î°ú, httpd ¸¦ Å¾ÀçÇÑ
        À¥¼­¹ö¸¦ 400 kb È¤Àº º¸´Ù ´õ ÀÛÀº »çÀÌÁî·Î ¸¸µé ¼ö ÀÖ°Ô µÈ´Ù.
     </para>
</section>
</chapter>


<chapter id="s-assem" xreflabel="Assemblers">
<?html-filename assemblers.html>
<title>°¡¿ëÇÑ ¾î¼Àºí·¯µé</title>

<section id="p-gcc">
<?html-filename gcc.html>
<title>GCC ÀÎ¶óÀÎ ¾î¼Àºí·¯</title>

<para>
    ¾ÆÁÖ À¯¸íÇÑ GNU C/C++ ÄÄÆÄÀÏ·¯ÀÎ GCC ÀÌ´Ù.
    ÀÌ ÄÄÆÄÀÏ·¯´Â GNU ÇÁ·ÎÁ§Æ®ÀÇ ÇÙ½ÉÀÌ µÇ´Â 32ºñÆ® ÄÄÆÄÀÏ·¯ÀÌ´Ù. 
    ¸Å¿ì, ¸Å¿ì(!) ÁÁÀº ÄÚµå¸¦ »ý»êÇÏ¸ç,
    x86 ¾ÆÅ°ÅØÃÄÀÇ ÇÁ·Î¼¼¼­ ¶ÇÇÑ ¸Å¿ì Àß Áö¿øÇÑ´Ù.
    ÀÌ ÄÄÆÄÀÏ·¯¿¡´Â C ÇÁ·Î±×·¥ ÄÚµå Áß°£¿¡ ÀÎ¶óÀÎ ¾î¼Àºí¸®¸¦ »ðÀÔÇÒ ¼ö ÀÖ´Â
    ±â´ÉÀ» °¡Áö°í ÀÖ´Âµ¥, ÀÌ¸¦Å×¸é, ·¹Áö½ºÅÍ ÇÒ´ç°ú °°Àº °ÍÀ» gcc °¡
    ½º½º·Î ÇÏ°Ô ÇÏ°Å³ª,
    ¶Ç´Â ÇÁ·Î±×·¡¸Ó°¡ ¿øÇÏ´Â ´ë·Î Á¶Á¤ÇØ¼­, ¿øÇÏ´Â ·¹Áö½ºÅÍ¸¦ ÇÒ´çÇÏ°Ô ÇÒ 
    ¼öµµ ÀÖ´Ù. °Ô´Ù°¡, gcc ´Â °ÅÀÇ ´ëºÎºÐÀÇ ÇÃ·§Æû¿¡¼­ »ç¿ë°¡´ÉÇÏ´Ù. 
    ¸®´ª½º, *BSD, VSTa, OS/2, *DOS, Win* µî°ú °°ÀÌ ±¤¹üÀ§ÇÑ ¿î¿µÃ¼Á¦¿¡¼­ 
    »ç¿ë °¡´ÉÇÏ´Ù.
</para>

<section><title>GCC ¸¦ ¾îµð¼­ ±¸ÇÒ °ÍÀÎ°¡?</title>
    <para>
        °¡Àå ÁÖµÈ »çÀÌÆ®´Â GNU ÀÇ FTP »çÀÌÆ® 
        (<ulink url="ftp://prep.ai.mit.edu/pub/gnu/gcc/">
        ftp://prep.ai.mit.edu/pub/gnu/gcc/</ulink>) 
        ÀÌ´Ù. ÀÌ »çÀÌÆ®´Â GNU ÇÁ·ÎÁ§Æ®ÀÇ »ê¹°ÀÎ ¸¹Àº ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾îµéÀÌ
        ÄÄÆÄÀÏµÈ ÇüÅÂ È¤Àº ¼Ò½ºÀÇ ÇüÅÂ·Î ¹ßÇ¥µÇ´Â °÷ÀÌ´Ù.
        ¸®´ª½º¿¡ ¸ÂÃç¼­ ¼³Á¤ ¹× ÄÄÆÄÀÏµÈ ¹öÁ¯µéÀº 
        <ulink url="ftp://metalab.unc.edu/pub/Linux/GCC/">
        ftp://metalab.unc.edu/pub/Linux/GCC/</ulink>
        ¿¡¼­ Ã£À» ¼ö ÀÖ´Ù.
        ¶ÇÇÑ, ¼¼°è °¢Ã³¿¡ FTP ¹Ì·¯ »çÀÌÆ®µéÀÌ ÀÖ´Ù.
        ¿øÇÑ´Ù¸é, CD-ROM À¸·Îµµ ±¸ÇÒ ¼ö ÀÖ´Ù.
    </para>
    <para>
        GCC ÀÇ °³¹ßÀº ÀÏÀü¿¡ GCC2.8 °ú EGCS ÆÐÅ°ÁöÀÇ µÎ°³ÀÇ °¡Áö·Î ³ª´©¾îÁ³¾ú´Ù.
        ±×·¯³ª ÃÖ±Ù¿¡ ¿Í¼­ ÀÌ µÎ ÆÐÅ°Áö´Â ÅëÇÕµÇ¾î¼­ °³¹ß ¹× ¹èÆ÷µÇ°í ÀÖ´Ù.
        ÇöÀç GCC ÀÇ À¥ÆäÀÌÁö´Â <ulink url="http://gcc.gnu.org">
        http://gcc.gnu.org</ulink> ÀÌ´Ù.
    </para>
    <para>
        ¿©·¯ºÐÀÌ Áñ°Ü »ç¿ëÇÏ´Â ¿î¿µÃ¼Á¦¸¦ Å¸°ÙÀ¸·Î ¸¸µé¾îÁø ¼Ò½º³ª ¹ÙÀÌ³Ê¸® 
        ¶ÇÇÑ ¿©·¯ºÐÀÌ ÀÚÁÖ °¡´Â ¿©·¯ºÐ ¿î¿µÃ¼Á¦ÀÇ FTP »çÀÌÆ®µé¿¡¼­ Ã£À» 
        ¼ö ÀÖÀ» °ÍÀÌ´Ù.
    </para>
    <para>
    <anchor id="p-djgpp">
        GCC ÀÇ DOS ¹öÁ¯Àº DJGPP ¶ó°í ºÒ¸®¿ì´Âµ¥, 
        <ulink url="http://www.delorie.com/djgpp/">
        http://www.delorie.com/djgpp/</ulink> ¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.
    </para>
    <para>
        ¶ÇÇÑ Win32 ¿ëÀÇ GCC Æ÷Æ®µµ ÀÖ´Ù :
        cygwin 
        (<ulink url="http://sourceware.cygnus.com/cygwin/">
        http://sourceware.cygnus.com/cygwin/</ulink>) °ú
        mingw (<ulink url="http://www.mingw.org">http://www.mingw.org</ulink>)
        °¡ ±×°ÍÀÌ´Ù.
    </para>
    <para>
        ½ÉÁö¾î OS/2 ¿ëÀÇ GCC Æ÷Æ®µµ ÀÖ´Ù. ÀÌ°ÍÀº EMX ¶ó°í ºÒ¸®¿î´Ù. 
        ±¸ÇÒ ¼ö ÀÖ´Â URL Àº ´ÙÀ½°ú °°´Ù.
        <ulink url="ftp://ftp-os2.cdrom.com/pub/os2/emx09c/">
        ftp://ftp-os2.cdrom.com/pub/os2/emx09c/</ulink>.
        ¿©±â¼­ ±¸ÇÒ ¼ö ÀÖ´Â EMX ´Â µµ½º¿¡¼­µµ ÀÛµ¿ÇÏ¸ç, 
        ÆÐÅ°Áö¿¡´Â À¯´Ð½º ¿¡¹Ä·¹ÀÌ¼ÇÀ» À§ÇÑ ¸ñÀûÀº ¶óÀÌºê·¯¸® ·çÆ¾µµ 
        Æ÷ÇÔµÇ¾î ÀÖ´Ù. ¾ÕÀÇ »çÀÌÆ®¿¡¼­ ¿©±âÀú±â¸¦ µÑ·¯º¸°í Ã£¾Æ º¸¶ó.
        </para><para>
        There is also an OS/2 port of GCC called EMX; 
        it works under DOS too, and includes lots of unix-emulation 
        library routines. 
    </para>
</section>

<section><title>GCC ÀÎ¶óÀÎ ¾î¼Àºí·¯¿¡ °üÇÑ ¹®¼­¸¦ ¾îµð¼­ Ã£À» ¼ö ÀÖ´Â°¡</title>
    <para>
        GCC ¹®¼­´Â TeXinfo Æ÷¸äÀ¸·Î ¹®¼­ÆÄÀÏµéÀ» Æ÷ÇÔÇÑ´Ù. 
        ¿©·¯ºÐÀº ±× ¹®¼­µéÀº TeX À» ÀÌ¿ëÇÏ¿© ÄÄÆÄÀÏÇØ Ãâ·ÂÇØ º¼ ¼öµµ ÀÖ°í,
        <filename>.info</filename> ÆÄÀÏ·Î º¯È¯ÇØ¼­ emacs ¿¡¼­ ºê¶ó¿ìÂ¡ ÇÏ¸é¼­ ÀÐÀ»¼öµµ ÀÖ´Ù.
        ¶Ç´Â, <filename>.html</filename> ÆÄÀÏ·Î º¯È¯ÇÏ¿© À¥ ºê¶ó¿ìÀú¿¡¼­ ÀÐÀ» ¼öµµ ÀÖ°í...
        ±âÅ¸ ¿©·¯ºÐµéÀÌ ÁÁ¾ÆÇÏ´Â Æ÷¸äÀ¸·Î º¯È¯ÇÒ ¼ö ÀÖ´Ù. 
        .info ÆÄÀÏÀº GCC¸¦ Á¦´ë·Î ¼³Ä¡Çß´Ù¸é ÇÔ²² ¼³Ä¡µÇ¾úÀ» °ÍÀÌ´Ù.
    </para>
    <para>
        ¿©·¯ºÐÀÌ Á¤º¸¸¦ ¾ò±â À§ÇØ¼­ Ã£¾Æ¾ß ÇÒ ¼½¼ÇÀº <literal>C Extensions::Extended Asm::
        </literal> ¼½¼ÇÀÌ´Ù.
    </para>
    <para>
        ¶ÇÇÑ, <literal>Invoking GCC::Submodel Options::i386 Options::</literal> ¼½¼Ç¿¡
        ÀÖ´Â ³»¿ëµµ »ó´çÈ÷ À¯¿ëÇÒ °ÍÀÌ´Ù.
        Æ¯È÷³ª ÀÌ ¼½¼ÇÀ» ÀÚ¼¼È÷ »ìÆìº¸¸é, i386 °è¿­ÀÇ ·¹Áö½ºÅÍ¸¦ À§ÇØ ±ÔÁ¤µÈ ÀÌ¸§¿¡ ´ëÇÑ
        Á¤º¸¸¦ ¾òÀ» ¼ö ÀÖ´Âµ¥ : 
        <literal>abcdSDB</literal> °¡ °¢°¢
        <literal>%eax</literal>,
        <literal>%ebx</literal>,
        <literal>%ecx</literal>,
        <literal>%edx</literal>,
        <literal>%esi</literal>,
        <literal>%edi</literal>,
        <literal>%ebp</literal>
        °ú ÇÏ³ª¾¿ ÀÏÄ¡ÇÏ°Ô µÈ´Ù. (´Ü <literal>%esp</literal> ¿¡ ÇØ´çÇÏ´Â °ÍÀº ¾øÀ½), 
    </para>
    <para>
        À¥ÀÇ DJGPP °ÔÀÓÁî ¸®¼Ò½º ÆäÀÌÁö¿¡ ¾î¼Àºí¸®¿¡ °üÇÑ ³»¿ëÀÌ ¸Å¿ì ¸¹ÀÌ ÀÖ¾ú´Âµ¥...
        Áö±ÝÀº ¼­¹ö°¡ Á×¾î ÀÖ´Â°Í °°´Ù. ±×·¯³ª, ÀÚ·á´Â <link linkend="p-djgpp">DJGPP »çÀÌÆ®</link>
        ¿¡ º¹±¸µÇ¾î ÀÖ´Ù. ÀÌ »çÀÌÆ®¿¡´Â ´Ù¸¥ À¯¿ëÇÑ Á¤º¸µéµµ ¸¹ÀÌ Á¸ÀçÇÑ´Ù : 
        <ulink url="http://www.delorie.com/djgpp/doc/brennan/">
        http://www.delorie.com/djgpp/doc/brennan/</ulink>, 
        ¶ÇÇÑ, Á¤¸» À¯¿ëÇÑ ÀÚ·áÀÎ <ulink url="http://www.castle.net/~avly/djasm.html">
        DJGPP Quick ASM Programming Guide</ulink> µµ Ã£¾Æº¼ ¼ö ÀÖ´Ù.
    </para>
    <para>
        GCC ´Â ¾î¼Àºí¸® ¼Ò½º¸¦ ¾î¼Àºí ÇÏ±â À§ÇØ¼­ GAS ¿¡ ÀÇÁ¸ÇÏ¸ç, GAS ÀÇ ¹®¹ýÀ» µû¸¥´Ù(¾Æ·¡¸¦ º¸¶ó:)
        ÀÎ¶óÀÎ ¾î¼Àºí¸®¸¦ ¾µ ¶§, ÆÛ¼¾Æ® ¹®ÀÚ´Â µû¿ÈÇ¥·Î µÑ·¯½Î¾ß ÇÑ´Ù´Â °ÍÀ» ¸í½ÉÇÏ¶ó.
        ÆÛ¼¾Æ® ¹®ÀÚ´Â GAS ·Î ³Ñ°ÜÁö°Ô µÈ´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº ¾Æ·¡ÀÇ GAS ¿¡ °ü·ÃµÈ ¼½¼ÇÀ» º¸¶ó.
    </para>
    <para>
        ±×¸®°í, Á¤¸» À¯¿ëÇÑ ¿¹Á¦µéÀÇ ÁýÇÕÃ¼ÀÎ <filename>linux/include/asm-i386/</filename>
        µð·ºÅä¸® ¾Æ·¡¸¦ »ìÆìº¸¶ó. ¶ÇÇÑ, ¸®´ª½º Ä¿³ÎÀÇ ¼­ºêµð·ºÅä¸®µéµµ »ìÆìº¸µµ·Ï ÇÏ¶ó.
        À¯¿ëÇÑ ¿¹Á¦µéÀ» Á¤¸»·Î ¸¹ÀÌ ¾òÀ» ¼ö ÀÖÀ» °ÍÀÌ´Ù.
    </para>
</section>

<section>
<title>GCC ¸¦ ÀÌ¿ëÇÏ¿© ÀÎ¶óÀÎ ¾î¼Àºí¸® ÄÚµå¸¦ »ý¼ºÇÏ±â</title>
    <para>
        Ä¿³Î Çì´õµé¿¡¼­ Ã£¾Æº¼ ¼ö ÀÖ´Â ¾î¼Àºí¸® ·çÆ¾µéÀº
        <function>extern inline</function> ÇÔ¼öµé ³»ºÎ¿¡ µé¾î°¡ ÀÖ±â ¶§¹®¿¡,
        (¸¸¾à ¿©·¯ºÐÀÌ ¿©·¯ºÐÀÌ ¸¸µç Çì´õÆÄÀÏÀ» °¡Áö°í ÀÖÀ¸¸ç, ¿©·¯ºÐÀÇ
        ¾î¼Àºí¸® ÄÚµå¸¦ ¸®´ª½º Ä¿³ÎÀÇ ±×°ÍÃ³·³ ¸í·áÇÏ°Ô ÀÛ¼ºÇÏ°í ½Í´Ù¸é ¿©·¯ºÐµµ
        ±×Ã³·³ ÇÏ¸é µÈ´Ù) ÀÌµé ·çÆ¾µéÀÌ »ç¿ë°¡´ÉÇÏ°Ô ÇÏ±â À§ÇØ¼­
        GCC ´Â ¹Ýµå½Ã <option>-O</option> ÇÃ·¡±×¿Í ÇÔ²² ½ÇÇàµÇ¾î¾ß ÇÑ´Ù.
        (¶Ç´Â <option>-O2</option>, <option>-O3</option> µî°ú °°Àº ¿É¼Ç°ú ÇÔ²² ½ÇÇàµÇ¾î¾ß ÇÑ´Ù.)
        ±×·¸°Ô ÇÏÁö ¾ÊÀ¸¸é, ¿©·¯ºÐÀÇ ÄÚµå´Â ÄÄÆÄÀÏµÉ·±Áö´Â ¸ô¶óµµ, Á¦´ë·Î
        ¸µÅ©µÇÁö´Â ¾ÊÀ» °ÍÀÌ´Ù. ¿Ö³ÄÇÏ¸é, ÇÁ·Î±×·¥ÀÌ ¸µÅ©µÉ ¶§, ¸µÄ¿´Â
        ÀÎ¶óÀÎÀÌ ¾Æ´Ñ <function>extern</function> ÇÔ¼öµéÀ» ¿©·¯ºÐÀÇ ÇÁ·Î±×·¥ÀÌ ¸µÅ©µÉ 
        ¶óÀÌºê·¯¸®¿¡¼­ Ã£±â ¶§¹®ÀÌ´Ù.
        ¶Ç ´Ù¸¥ ¹æ¹ýÀº ·çÆ¾µéÀÇ fallback ¹öÁ¯ÀÌ Á¸ÀçÇÏ´Â ¶óÀÌºê·¯¸®¿Í
        ¸µÅ©½ÃÅ°´Â °ÍÀÌ´Ù.
        </para>
	<para>
        Because assembly routines from the kernel headers 
        (and most likely your own headers, if you try making your assembly programming 
        as clean as it is in the linux kernel) are embedded in extern inline functions, 
        GCC must be invoked with the -O flag (or -O2, -O3, etc), 
        for these routines to be available. 
        If not, your code may compile, but not link properly, 
        since it will be looking for non-inlined extern functions 
        in the libraries against which your program is being linked! 
        Another way is to link against libraries that include fallback versions of the routines.
    </para>
    <para>
        ÀÎ¶óÀÎ ¾î¼Àºí¸®°¡ »ç¿ëÇÏ±â ½È´Ù¸é, <option>-fno-asm</option> ÇÃ·¡±×¸¦ ÁÖ¸é µÈ´Ù.
        ±×·¸°Ô ÇÏ¸é, ÄÄÆÄÀÏ·¯´Â È®Àå ¹®¹ýÀÎ ÀÎ¶óÀÎ ¾î¼Àºí¸®°¡ ¹ß°ßµÇ¾úÀ» °æ¿ì,
        Á¾·áÇÏ°Ô µÈ´Ù. ±×·¸Áö ¾ÊÀ¸¸é, ¸µÄ¿°¡ ÀÎ½ÄÇÏÁö ¸øÇÏ´Â ¿ÜºÎÇÔ¼öÀÎ <function>asm()</function> 
        ÇÔ¼ö¿¡ ´ëÇÑ È£ÃâÀ» »ý¼ºÇÏ°Ô µÇ¾î¹ö¸°´Ù. (¹ø¿ªÀÌ Á» ÀÌ»óÇÏ³×¿ä... -_-a) ±× ¹Ý´ëÀÇ ÇÃ·¡±×´Â
        <option>-fasm</option> ¿É¼ÇÀ¸·Î½á, asm Å°¿öµå¿¡ ´ëÇÑ Ãë±Þ¹æ¹ýÀ» º¹±¸ÇÑ´Ù(?)
        </para><para>
        which will have the compiler die when using extended inline asm syntax,
        or else generate calls to an external function named <function>asm()</function>
        that the linker can't resolve.
        To counter such flag, <option>-fasm</option> restores treatment
        of the <literal>asm</literal> keyword.
    </para>
    <para>
        º¸´Ù ÀÏ¹ÝÀûÀÎ °ÍÀ¸·Î½á, x86 ÇÃ·§Æû¿¡¼­ ½ÇÇàµÇ´Â gcc ¿¡
        ¸Å¿ì À¯¿ëÇÑ ÇÃ·¡±×°¡ ÀÖ´Âµ¥, ¹Ù·Î        
    </para>
    <para>
    <command>gcc -O2 -fomit-frame-pointer -W -Wall</command>
    </para>
    <para>
        ÀÌ´Ù. <option>-O2</option> ´Â ÀÏ¹ÝÀûÀ¸·Î, ¾µ¸¸ÇÑ ÃÖÀûÈ­ ·¹º§ÀÌ´Ù.
        ±× ¿ÜÀÇ ÃÖÀûÈ­ ·¹º§Àº ÄÄÆÄÀÏÇÏ´Âµ¥ ½Ã°£ÀÌ ´õ ¿À·¡ ±Û¸®°í, ´õ Å« ÄÚµå¸¦ »ý»êÇÑ´Ù. 
        ±×·³¿¡µµ ºÒ±¸ÇÏ°í, »ý¼ºµÈ ÄÚµåÀÇ ¼öÇà¼º´ÉÀº ¾à°£ ´õ »¡¶óÁú »ÓÀÌ´Ù.
        °úµµÇÑ ÃÖÀûÈ­ ¿É¼ÇÀ» ÁÖ¾î¼­ È¿°úÀûÀÎ °ÍÀº ¸Å¿ì Å¸ÀÌÆ®ÇÑ ·çÇÁ°¡ ÀÖÀ»¶§ »ÓÀÌ´Ù.
        ¿©·¯ºÐÀÌ Á¤¸», °­·ÂÇÑ(!) ÃÖÀûÈ­ ÄÄÆÄÀÏÀ» ÇÊ¿ä·Î ÇÏ´Â °æ¿ì¿¡´Â 
        <option>-O6</option> ÀÇ ·¹º§±îÁö »ç¿ëÇÏ´Â °ÍÀº °í·ÁÇØ º½Á÷ÇÏ´Ù.
    </para>
    <para>
        <option>-fomit-frame-pointer</option> ¿É¼ÇÀº ¾µµ¥¾ø´Â 
        frameÆ÷ÀÎÅÍ(¿ªÀÚÁÖ : stack ÀÇ ³»¿ëÀ» º¹±¸ÇÏ´Â °Í°ú °ü·ÃµÇ¾î¼­ ÄÄÆÄÀÏ·¯ 
	³»ºÎÀûÀ¸·Î »ý¼ºÇÏ´Â Æ÷ÀÎÅÍÀÔ´Ï´Ù.) ¸¦ À¯ÁöÇÏ´Â ÄÚµå¸¦ »ý¼ºÇÏÁö ¾Êµµ·Ï ÇÑ´Ù. 
	±×·¸°Ô ÇÏ¸é »ý¼ºµÈ 
        ¾î¼Àºí¸® ÄÚµå´Â º¸´Ù ÀÛ°í, ºü¸¥ °ÍÀÌ µÇ¸ç, ´õ ³ªÀº ÃÖÀûÈ­¸¦ À§ÇÑ 
        ·¹Áö½ºÅÍµéÀÇ È®º¸¸¦ °¡´ÉÇÏ°Ô ÇØ ÁØ´Ù.
        ´Ü, µð¹ö±ë Åø (<command>gdb</command> ¿Í °°Àº..) À» »ç¿ëÇÑ 
        µð¹ö±ëÀÌ ºÒ°¡´ÉÇØÁø´Ù.
    </para>
    <para>
        <option>-W -Wall</option> ¿É¼ÇÀº À¯¿ëÇÑ °æ°í¸Þ¼¼ÁöµéÀ» 
        ¹ß»ý½ÃÅ°µµ·Ï ÇÑ´Ù. °æ°í¸Þ¼¼Áö¸¦ ÅëÇØ ¿©·¯ºÐÀº
        È¤½Ã ¹ß»ýÇÒÁöµµ ¸ð¸¦ ¾î¸®¼®Àº ¿¡·¯µéÀ» ¹Ì¸® Ã¼Å©ÇÒ ¼ö ÀÖ°Ô ÇÑ´Ù.        
    </para>
    <para>
        ¿©·¯ºÐÀº ÀÏ·ÃÀÇ ÇÁ·Î¼¼¼­ Á¾¼ÓÀûÀÎ ÃÖÀûÈ­ ¿É¼ÇÀ» ÁÙ ¼ö ÀÖ´Âµ¥, ¿¹¸¦ µé¸é,
        <option>-m486</option> µî°ú °°Àº ¿É¼ÇÀÌ ±×°ÍÀÌ´Ù. ±×·¯ÇÑ CPU Æ¯Á¤ÀÇ ¿É¼ÇÀ»
        ÁÜÀ¸·Î½á, GCC ´Â ¿©·¯ºÐÀÌ Å¸°ÙÀ¸·Î »ï´Â ÇÁ·Î¼¼¼­¿¡ º¸´Ù ´õ Àß ¸Â°í,
        ÃÖÀûÈ­µÈ ÄÚµå¸¦ ¸¸µé¾î ÁÙ °ÍÀÌ´Ù.
        ¶ÇÇÑ, ÃÖ±ÙÀÇ GCC ´Â <option>-mpentium</option> °ú °°Àº ÇÃ·¡±×µµ 
        °¡Áö°Ô µÇ¾ú´Ù. (GCC 2.7.x ¶Ç´Â ±× ÀÌÇÏÀÇ ¹öÁ¯¿¡¼­´Â Áö¿øÇÏÁö ¾Ê´Â´Ù.)
        ¶ÇÇÑ <ulink url="http://goof.com/pcg/">PGCC</ulink>, ¼ÒÀ§ ÆæÆ¼¾ö GCC ¶ó´Â °ÍÀº
        ´õ ¸¹Àº ¿É¼ÇµéÀ» °¡Áö°í ÀÖ´Ù. ±¸ÇÒ ¼ö ÀÖ´Â Àå¼Ò´Â ´ÙÀ½°ú °°´Ù : 
        <ulink url="http://goof.com/pcg/">http://goof.com/pcg/</ulink>
        ÀÌÃ³·³ Æ¯Á¤ ÇÁ·Î¼¼¼­¿¡ ÃÖÀûÈ­ ½ÃÅ°´Â ÇÃ·¡±×µéÀº ¸®´ª½ºÀÇ Ä¿³ÎÀ» ÄÄÆÄÀÏ ÇÒ ¶§
        º¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù. ¿©·¯ºÐÀÇ GCC ¿¡ µþ·Á¿Â TeXInfo ¹®¼­¸¦ È®ÀÎÇÏ¸é
        º¸´Ù ¸¹Àº Á¤º¸¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
    </para>
    <para>
        <option>-m386</option> ¿É¼ÇÀº ÄÚµåÀÇ Å©±â¸¦ ÃÖÀûÈ­½ÃÅ³ ¼ö ÀÖµµ·Ï ÇØÁØ´Ù.
        ±×°ÍÀÌ Áß¿äÇÑ ÀÌÀ¯´Â ¸Þ¸ð¸® »ç¿ëÀ²ÀÌ ¸Å¿ì ³ôÀº ÄÄÇ»ÅÍµé¿¡¼­
        ¼Óµµ¿¡ ÃÖÀûÈ­µÇ¾úÁö¸¸, ±× ÃÖÀûÈ­·Î ÀÎÇØ Å©±â°¡ ¸Å¿ì Å« ÇÁ·Î±×·¥À» 
        ½ÇÇà½ÃÅ²´Ù¸é, ½ÊÁßÆÈ±¸ ½º¿ÍÇÎÀÌ ¹ß»ýÇÏ°Ô µÇ¸ç, ±×·Î ÀÎÇØ
        ¿ø·¡ÀÇ ¸ñÀûÀÎ ºü¸¥ ¼ÓµµÀÇ È¿°ú¿¡ ¹ÝÇÏ´Â ÀÏÀÌ ¹ß»ýÇÑ´Ù.
        ÀÌ·² °æ¿ì¿¡´Â, C ¸¦ ¾²´Â °Í º¸´Ù, ÄÚµåÀÇ ºÐÇÒ(?)À» 
        ±¸ÇöÇÑ ¾ð¾î (functional language È¤Àº FORTH ¶ó°í ºÒ¸®¿ì´Â ¾ð¾î¸¦ 
        »ç¿ëÇØ¼­, ¹ÙÀÌÆ®ÄÚµå³ª ¿öµåÄÚµå¿¡ ±âÃÊÇÑ ±¸ÇöÀ» ÇÏµµ·Ï ÇÏ¶ó.)
        </para><para>
        In such settings, it might be useful to stop using C,
        and use instead a language that favors code factorization,
        such as a functional language and/or FORTH,
        and use a bytecode- or wordcode- based implementation.
    </para>
    <para>
        ¿©·¯ºÐÀº ÃÖÀûÈ­ ¿É¼ÇÀ» ÆÄÀÏº°·Î ´Ù ´Ù¸£°Ô ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.
        ±×·¡¼­, ¸Å¿ì ÁÁÀº ¼º´ÉÀÌ ¿ä±¸µÇ´Â ·çÆ¾À» ´ã°í ÀÖ´Â ÆÄÀÏ¿¡´Â
        ÃÖ°í ·¹º§ÀÇ ¼Óµµ¸¦ ³¾ ¼ö ÀÖµµ·Ï ÃÖÀûÈ­¸¦ ¼öÇàÇÏ°í, ´Ù¸¥ ÆÄÀÏ¿¡´Â »ý¼ºµÇ´Â ÄÚµåÀÇ
        Å©±â¸¦ ÀÛ°Ô ÇÏ´Â ¹æÇâÀ¸·Î ÃÖÀûÈ­ÇÒ ¼öµµ ÀÖ´Ù´Â °ÍÀ» À¯³äÇÏ¶ó.
    </para>
    <para>
        Á» ´õ ³ªÀº ÃÖÀûÈ­¸¦ ½ÃÅ°·Á¸é <option>-mregparm=2</option> ¿É¼ÇÀ»
        »ç¿ëÇÏ°Å³ª, ÇØ´çÇÏ´Â ÇÔ¼ö Æ¯¼ºÀ» »ç¿ëÇÏ´Â°ÍÀÌ µµ¿òÀÌ µÉ °ÍÀÌ´Ù.
        ±×·¯³ª, ´Ù¸¥ ÄÚµå(<emphasis><application>libc</application>µî°ú °°Àº</emphasis>)ÀÇ 
        ¸µÅ©½Ã¿¡ ¸î°¡Áö ¹®Á¦°¡ ¹ß»ýÇÒ ¼ö ÀÖ´Ù´Â »ç½ÇÀ» ¸í½ÉÇÏ¶ó(¿ªÀÚÁÖ : 
        ¹ø¿ªÀÌ Á¤¸»-_- ¸Å²ô·´Áö ¸øÇÕ´Ï´Ù.)
        To optimize even more, option <option>-mregparm=2</option>
        and/or corresponding function attribute might help,
        but might pose lots of problems when linking to foreign code,
        <emphasis>including <application>libc</application></emphasis>.
    </para>
    <para>
        ¿ÜºÎÀÇ ÇÔ¼öµéÀ» Á¤È®ÇÏ°Ô ¼±¾ðÇØ ÁÜÀ¸·Î½á, ¿Ã¹Ù¸¥ ¼ø¼­¿¡ µû¸¥
        È£ÃâÀÌ ¹ß»ýÇÏµµ·Ï Á¶Á¤ÇØ ÁÖ°Å³ª, ¿ÜºÎ ¶óÀÌºê·¯¸®µéÀ» ¿©·¯ºÐÀÌ
        ¸¸µç ÇÁ·Î±×·¥°ú °°Àº ·¹Áö½ºÅÍ¸¦ »ç¿ëÇÏ´Â È£Ãâ ÄÁº¥¼ÇÀ» »ç¿ëÇÏµµ·Ï
        ÀçÄÄÆÄÀÏ ÇØ ÁÜÀ¸·Î½á, ¹®Á¦¸¦ ±Øº¹ÇÒ ¼ö ÀÖ±âµµ ÇÏ´Ù.
    </para>
    <para>
        There are ways to correctly declare foreign functions
        so the right call sequences be generated,
        or you might want to recompile the foreign libraries
        to use the same register-based calling convention...
    </para>
    <para>
        <filename>/usr/lib/gcc-lib/i486-linux/2.7.2.3/specs</filename>
        À» ÆíÁýÇØ¼­ ¿©·¯ºÐÀÇ make ¿¡ À§¿¡¼­ ¼³¸íÇÑ ÇÃ·¡±×µéÀÌ µðÆúÆ®°¡
        µÇµµ·Ï ÇÒ ¼öµµ ÀÖ´Ù.(±×·¯³ª ±× °æ¿ì, <option>-W -Wall</option> ¿É¼ÇÀº
        µ¡ºÙÀÌÁö ¾Ê´Â °ÍÀÌ ³ªÀº °æ¿ìµµ ÀÖ´Ù.)
        ¿©·¯ºÐÀÇ ½Ã½ºÅÛ¿¡¼­ GCC specs ÆÄÀÏÀÇ Á¤È®ÇÑ À§Ä¡´Â
        <command>gcc -v</command> ¸¦ ÇÔÀ¸·Î½á ¾Ë ¼ö ÀÖ´Ù.
    </para>
</section>

<section><title>¸ÅÅ©·ÎÀÇ Áö¿ø</title>
    <para>
        GCC ´Â ¿©·¯ºÐÀÌ ¿©·¯ºÐÀÇ ÀÎ¶óÀÎ ¾î¼Àºí¸® ÄÚµå ³»¿¡ ·¹Áö½ºÅÍ ±Ô¾à(? - constraints)À»
        ¸í½ÃÇÏ´Â °ÍÀ» °¡´ÉÇÏ°Ô ÇÕ´Ï´Ù. ±×·³À¸·Î½á, ÃÖÀûÈ­ ÇÒ ¶§ ÄÄÆÄÀÏ·¯°¡ ±× 
        »ç½ÇÀ» Âü°íÇÏ¿© ÀÎ¶óÀÎ ¾î¼Àºí¸® ÄÚµå°¡ ÆÐÅÏµéÀÇ ÁýÇÕÀ¸·Î »ý¼ºµÇµµ·Ï 
        ÇÕ´Ï´Ù. (-_-; ³Ê¹« ¹ø¿ªÀ» ¸øÇÏ´Â °Å °°±º¿©)
    </para>
    <para>
        GCC allows (and requires) you to specify register constraints
        in your inline assembly code, so the optimizer always know about it;
        thus, inline assembly code is really made of patterns,
        not forcibly exact code.
    </para>
    <para>
        µû¶ó¼­ ¿©·¯ºÐÀº ¿©·¯ºÐÀÇ ¾î¼Àºí¸®¸¦ CPP ¸ÅÅ©·Î ¶óµçÁö,
        ÀÎ¶óÀÎÀÇ C ÇÔ¼öµé ³»ºÎ¿¡ Æ÷ÇÔ ½ÃÅ³ ¼ö ÀÖ½À´Ï´Ù.
        ±×·¸°Ô ÇÏ¸é, ´©±¸µçÁö, ±× ¾î¼Àºí¸® ÄÚµå¸¦ Æò¹üÇÑ C ÇÔ¼ö³ª ¸ÅÅ©·ÎÃ³·³
        »ç¿ëÇÒ ¼ö ÀÖ°Ô µË´Ï´Ù.
        ÀÎ¶óÀÎ ÇÔ¼öµéÀº ¸ÅÅ©·Î¿Í ¸Å¿ì ºñ½ÁÇÏ°Ô º¸ÀÌÁö¸¸, ¶§·Î´Â
        ´õ¿í ¸íÈ®ÇÏ¿© ¾²±â°¡ ´õ ½±´Ù.
        ±×·¯³ª, ¸ÅÅ©·Î¸¦ »ç¿ëÇÏµç, ÀÎ¶óÀÎ ÇÔ¼ö¸¦ ¾²´ø, 
        °è¼Ó Áßº¹µÈ ÄÚµå¸¦ ¾²°Ô µÈ´Ù´Â °ÍÀ» ¸í½ÉÇÏ¶ó.
        µû¶ó¼­, <literal>1:</literal> °ú °°Àº ½ºÅ¸ÀÏÀÇ ·ÎÄÃ ·¹ÀÌºí¸¸ÀÌ
        ±×·¯ÇÑ ¾î¼Àºí¸® ÄÚµå¿¡¼­ Á¤ÀÇµÇ°í, »ç¿ëµÇ¾î¾ß ÇÑ´Ù.
        ±×·¯³ª, ¸ÅÅ©·Î´Â ·ÎÄÃ ·¹ÀÌºí·Î Á¤ÀÇµÇÁö ¾ÊÀº ·¹ÀÌºíÀÌ 
        ÆÄ¶ó¹ÌÅÍ·Î ³Ñ°ÜÁö´Â °ÍÀ» Çã¿ëÇÑ´Ù. (È¤Àº, ¿©·¯ºÐÀº
        ºÎ°¡ÀûÀÎ ¸ÞÅ¸ ÇÁ·Î±×·¡¹Ö ±â¹ýÀ» »ç¿ëÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.)
        ¶ÇÇÑ, ÀÎ¶óÀÎ ¾î¼Àºí¸® ÄÚµå¸¦ È®ÀåÇÏ°Ô µÇ¸é, ±× ÄÚµå ¾ÈÀÇ
        ÀáÀçÀûÀÎ ¹ö±× ¶ÇÇÑ ³ªÅ¸³¯ ¼ö ÀÖ´Ù.
        ±×·¯¹Ç·Î, ±×·¯ÇÑ ÀÎ¶óÀÎ ¾î¼Àºí¸® ÄÚµå¿¡¼­
        ·¹Áö½ºÅÍ »ç¿ë¹æ¹ýÀ» ÀÌÁßÀ¸·Î °íÂûÇÏµµ·Ï ÇÏ¶ó.
    </para>
    <para>
        Thus, you can make put your assembly into CPP macros, and inline C functions,
        so anyone can use it in as any C function/macro.
        Inline functions resemble macros very much, but are sometimes cleaner to use.
        Beware that in all those cases, code will be duplicated,
        so only local labels (of <literal>1:</literal> style)
        should be defined in that asm code.
        However, a macro would allow the name for a non local defined label
        to be passed as a parameter
        (or else, you should use additional meta-programming methods).
        Also, note that propagating inline asm code will spread potential bugs in them;
        so watch out doubly for register constraints in such inline asm code.
    </para>
    <para>
        ¸¶Áö¸·À¸·Î, C ¾ð¾î ±× ÀÚÃ¼°¡ ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÇ ¸Å¿ì ÁÁÀº 
        Ãß»óÈ­¶ó´Â °ÍÀ» ¸í½ÉÇÏ°í, C ¸¦ »ç¿ëÇÔÀ¸·Î½á, ¾î¼Àºí¸® ÇÁ·Î±×·¡¹Ö½Ã
        ¹ß»ýÇÒ ¼ö ÀÖ´Â ¸¹Àº ³­Á¡µé ±Øº¹ÇÏ°í, º¸´Ù ½Å·Úµµ ³ôÀº ÇÁ·Î±×·¥À» ¿©·¯ºÐÀÌ
        ¸¸µé ¼ö ÀÖ°Ô µÉ °ÍÀÌ´Ù.
    </para>
    <para>
        Lastly, the C language itself may be considered as a good abstraction
        to assembly programming,
        which relieves you from most of the trouble of assembling.
    </para>
</section>

</section>

<section id="p-gas" xreflabel="GAS">
<?html-filename gas.html>
<title>GAS</title>

<para>
    GAS ´Â GCC °¡ »ç¿ëÇÏ´Â GNU ¾î¼Àºí·¯ÀÌ´Ù.
</para>

<section><title>¾îµð¿¡¼­ GAS ¸¦ Ã£À» ¼ö ÀÖ´Â°¡</title>
    <para>
    GCC ¸¦ Ã£Àº °÷°ú °°Àº Àå¼Ò¿¡ ÀÖ´Ù.
    ÆÐÅ°Áö binutils ¾È¿¡ ÆÐÅ°Â¡µÇ¾î ÀÖ´Ù.
    </para>
    <para>
    ÃÖ½ÅÀÇ GAS ¹öÁ¯Àº HJLu ¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù. url Àº ´ÙÀ½°ú °°´Ù :
    <ulink url="ftp://ftp.varesearch.com/pub/support/hjl/binutils/">
    ftp://ftp.varesearch.com/pub/support/hjl/binutils/</ulink>.
    </para>
</section>

<section><title>AT&amp;T ¹®¹ý</title>
    <para>
    GAS °¡ ¿ø·¡ 32-bit ÀÇ À¯´Ð½º ÄÄÆÄÀÏ·¯¸¦ Áö¿øÇÏµµ·Ï Ã³À½¿¡
    °í¾ÈµÇ¾ú±â ¶§¹®¿¡, GAS ´Â Ç¥ÁØ AT&amp;T ¹®¹ýÀ» »ç¿ëÇÑ´Ù.
    Ç¥ÁØ AT&amp;T ¹®¹ýÀº m68k ¾î¼Àºí·¯ÀÇ ¹®¹ý°ú »ó´çÈ÷ À¯»çÇÏ´Ù.
    ÇöÀç UNIX °è¿­ ¾î¼Àºí¸®ÀÇ Ç¥ÁØ ¹®¹ýÀÌ±âµµ ÇÏ´Ù.
    ÀÌ ¹®¹ýÀº Intel ¹®¹ý¿¡ ºñÇØ¼­ ÁÁÁöµµ ¾Ê°í, ³ª»ÚÁöµµ ¾Ê´Ù. 
    ´ÜÁö ´Ù¸¦ »ÓÀÌ´Ù. ¿©·¯ºÐµéÀÌ ±×°ÍÀ» »ç¿ëÇØº¸°Ô µÇ¸é, 
    ÀÎÅÚ ¹®¹ý¿¡ ºñÇØ Á»´õ ¸¹Àº ±ÔÄ¢ÀÌ ÀÖÀ½ À» ¾Ë°Ô µÉ °ÍÀÌ´Ù.
    </para>
    <para>
    ¾Æ·¡¿¡ GAS ¹®¹ýÀÇ ÁÖ¿ä »çÇ×µéÀ» ³ª¿­ÇÏ°Ú´Ù.
    <itemizedlist>
        <listitem><para>
        ·¹Áö½ºÅÍÀÇ ÀÌ¸§Àº <literal>%</literal>¹®ÀÚ·Î ½ÃÀÛÇÑ´Ù.
        ±×·¡¼­, ·¹Áö½ºÅÍ¸¦ Ç¥±âÇÒ ¶§ ´ÙÀ½Ã³·³ Ç¥½ÃÇÑ´Ù : 
        <literal>%eax</literal>, <literal>%dl</literal> µîµî..
        ÀÌ·¸°Ô ÇÏ´Â °ÍÀº ¿ÜºÎÀÇ C µî¿¡¼­ Á¤ÀÇµÈ ½Éº¼À» ¾Æ¹«·± È¥¶õ ¾øÀÌ
        °ð¹Ù·Î ¾î¼Àºí¸® ¼Ò½º¿¡ Æ÷ÇÔ½ÃÅ°´Â °ÍÀ» °¡´ÉÇÏ°Ô ÇØ ÁØ´Ù.
        </para></listitem>

        <listitem><para>
        ¿ÀÆÛ·£µåÀÇ ¼ø¼­°¡, ¼Ò½º°¡ ¸ÕÀú ¿À°í, µ¥½ºÆ¼³×ÀÌ¼ÇÀÌ µÚ¿¡ ¿Â´Ù.
        ÀÎÅÚÀÇ ¹®¹ý°ú´Â ¹Ý´ëÀÌ´Ù.
        ±×·¡¼­, ÀÎÅÚÀÇ ¹®¹ýÀ¸·Î ¾´ ¹®ÀåÀÌ <function>mov eax,edx</function>
        °ú °°´Ù¸é, GAS ÀÇ ¹®¹ýÀ¸·Î´Â <function>mov %edx,%eax</function> °ú 
        °°ÀÌ ¾´´Ù. (edx ·¹Áö½ºÅÍÀÇ ³»¿ëÀ» eax ·¹Áö½ºÅÍ·Î ¿Å°Ü¶ó...´Â ¶æ)
        </para></listitem>
        
        <listitem><para>
        ¿ÀÆÛ·£µåÀÇ Å©±â°¡ ÀÎ½ºÆ®·°¼ÇÀÇ Á¢¹Ì¾î·Î ºÙ´Â´Ù.
        °¡´ÉÇÑ Á¢¹Ì¾î´Â <literal>b</literal> ´Â ¹ÙÀÌÆ®¸¦(8-bit),
        <literal>w</literal> ´Â ¿öµå¸¦(16-bit)
        <literal>l</literal> ´Â long ÇüÀ»(32-bit) ³ªÅ¸³»´Â Á¢¹Ì¾îÀÌ´Ù.
        ¿¹¸¦ µéÀÚ¸é, ¹Ù·Î ¾Õ ´Ü¶ô¿¡¼­ ¾ð±ÞÇÑ ÀÎ½ºÆ®·°¼ÇÀÇ ¿Ã¹Ù¸¥ 
        ¹®¹ýÀº <function>movl %edx,%eax</function> °¡ µÇ¾î¾ß ÇÑ´Ù.
        ±×·¯³ª, GAS ´Â ¾ö°ÝÇÏ°Ô AT&amp;T ¹®¹ýÀÇ ±ÔÄ¢À» ÁØ¼öÇÒ °ÍÀ»
        ¿ä±¸ÇÏÁö ¾Ê´Â´Ù. ±×·¡¼­, ¿ÀÆÛ·£µåÀÇ Å©±â¸¦ ³ªÅ¸³»´Â 
        Á¢¹Ì¾î´Â ¿ÀÆÛ·£µå·Î ¾²ÀÎ ·¹Áö½ºÅÍÀÇ ÀÌ¸§À¸·ÎºÎÅÍ ¿ÀÆÛ·£µåÀÇ
        Å©±â¸¦ À¯ÃßÇÒ ¼ö ÀÖÀ» °æ¿ì¿¡´Â »ý·«ÇØµµ µÈ´Ù.
        ¶ÇÇÑ ±×·¸Áö ¾ÊÀ» °æ¿ì¶ó°í ÇÏ´õ¶óµµ, 32-bit ÀÇ Å©±â¸¦ °¡Á³´Ù°í
        °¡Á¤ÇÑ »óÅÂ¿¡¼­ µ¿ÀÛÇÑ´Ù(°æ°í ¸Þ¼¼Áö¸¦ »Ñ¸°´Ù)
        </para></listitem>

        <listitem><para>
        ¿ÀÆÛ·£µå¿¡ ·¹Áö½ºÅÍ°¡ ¾Æ´Ï¶ó »ó¼ö µîÀ» »ç¿ëÇÒ ¶§¿¡´Â
        ±× ¿ÀÆÛ·£µå ¾Õ¿¡ <literal>$</literal> ÀÇ Á¢µÎ¾î¸¦ ºÙ¿©ÁØ´Ù.
        Áï, <function>addl $5,%eax</function> Àº, <literal>%eax</literal> 
        ·¹Áö½ºÅÍ¿¡ long Çü ¼ýÀÚ 5 ¸¦ ³ÖÀ¸¶ó´Â ¶æÀÌ´Ù.
        </para></listitem>
        
        <listitem><para>
        ¿ÀÆÛ·£µå¿¡ Á¢µÎ¾î°¡ ¾øÀ» °æ¿ì¿¡´Â ±×°ÍÀÌ ¸Þ¸ð¸® ÁÖ¼Ò¶ó´Â °ÍÀ»
        ÀÇ¹ÌÇÑ´Ù. ±×·¡¼­, <function>movl $foo,%eax</function> Àº
        º¯¼ö <literal>foo</literal> ÀÇ <emphasis>ÁÖ¼Ò</emphasis> ¸¦
        ·¹Áö½ºÅÍ <literal>%eax</literal> ¿¡ ³ÖÀ¸¶ó´Â ¶æÀÌ µÈ´Ù.
        ±×·¯³ª, <function>movl foo,%eax</function> Àº º¯¼ö <literal>foo</literal>
        ÀÇ °ªÀ» <literal>%eax</literal> ·¹Áö½ºÅÍ¿¡ ³ÖÀ¸¶ó´Â ¶æÀÌ´Ù.
        </para></listitem>
        
        <listitem><para>
        ÀÎµ¦½ÌÀÌ³ª °£Á¢ ÁÖ¼ÒÁöÁ¤ ¹æ½ÄÀº ÀÎµ¦½º ·¹Áö½ºÅÍ¸¦ ÀÌ¿ëÇÏ°Å³ª
        °£Á¢ ¸Þ¸ð¸® ÁÖ¼ÒÀÇ ¹øÁö¸¦ °ýÈ£ ¾È¿¡ ³ÖÀ½À¸·Î½á Ç¥ÇöµÇ¾îÁø´Ù.
        ¿¹¸¦ µé¾î, <function>testb $0x80,17(%ebp)</function> °ú °°Àº Ç¥ÇöÀº
        <literal>%ebp</literal> °¡ °¡¸®Å°´Â ¸Þ¸ð¸® ¹øÁö¿¡¼­ 17¹øÂ° ¿ÀÇÁ¼Â¿¡
        ÀÖ´Â ¹ÙÀÌÆ® °ªÀÇ ÃÖ»óÀ§ ºñÆ®¸¦ Å×½ºÆ®ÇÏ¶ó´Â ¸»ÀÌ µÈ´Ù.
        </para></listitem>
    </itemizedlist>
    </para>

    <para>
    <anchor id="p-convert">
    ÁÖÀÇ : AT&amp;T ¹®¹ýÀ» ÀÌ¿ëÇÑ ¾î¼Àºí¸® ¼Ò½ºÄÚµå¿Í ÀÎÅÚÀÇ ¹®¹ýÀ» ÀÌ¿ëÇÑ
    ¼Ò½º ÄÚµå °£¿¡ ¼­·Î º¯È¯À» ½ÃÄÑ ÁÖ´Â ÇÁ·Î±×·¥Àº <link linkend="s-res">
    °ÅÀÇ ¾ø´Ù.(few programs)</link>
    </para>
    <para>
    Note: There are <link linkend="s-res">few programs</link>
    which may help you to convert source code between AT&amp;T and Intel assembler syntaxes;
    some of the are capable of performing conversion in both directions.
    </para>

    <para>
    GAS ´Â ÆÐÅ°Áö¿¡ TeXinfo Çü½ÄÀ¸·Î µÈ ¸Å¿ì ÀÌÇØÇÏ±â ½¬¿î ¹®¼­¸¦ °¡Áö°í ÀÖ´Ù.
    <filename>.info</filename> ÆäÀÌÁö Çü½ÄÀ¸·Î Emacs µî¿¡¼­
    ºê¶ó¿ìÂ¡ ÇÒ ¼öµµ ÀÖ´Ù.
    ÆÄÀÏ¸íÀº gas.doc ÀÌ°Å³ª as.doc ÀÏ °ÍÀÌ´Ù.
    ÀÇ½ÉÀÇ ¿©Áö ¾øÀÌ ÃÖ°íÀÇ ¹®¼­´Â ¼Ò½ºÄÚµå ÀÚÃ¼ÀÌ´Ù.
    </para>

    <para>
    ´Ù½ÃÇÑ¹ø, ¸®´ª½ºÀÇ ¼Ò½º°¡ ÃÖ»óÀÇ ¿¹Á¦ÀÓÀ» »ó±âÇÏ¶ó. <filename>linux/arch/i386/</filename>
    µð·ºÅä¸® ¾Æ·¡¿¡¼­ 
    <filename>kernel/*.S</filename>,
    <filename>boot/compressed/*.S</filename>,
    <filename>mathemu/*.S</filename>.
    °ú °°Àº ÆÄÀÏÀ» ¿­¾î¼­ ÀÐ¾î º¸¾Æ¶ó.
    ÃÖ°íÀÇ ¿¹Á¦ÀÌ´Ù.
    </para>

    <para>
    ¸¸¾à ¿©·¯ºÐÀÌ ¾ð¾î¸¦ ÇÏ³ª °í¾ÈÇÏ°í ÀÖ°Å³ª, ¾²·¹µå ÆÐÅ°Áö¸¦
    ÇÁ·Î±×·¡¹ÖÇÏ°í ÀÖ´Ù¸é, ´Ù¸¥ ¾ð¾î(
    <ulink url="http://para.inria.fr/">OCaml</ulink>,
    <ulink url="http://www.jwdt.com/~paysan/gforth.html">Gforth</ulink>,
    etc.) ³ª ½º·¹µå ÆÐÅ°Áöµé (QuickThreads, MIT pthreads, LinuxThreads, etc)
    À» »ìÆì º¸±â¸¦ ¿øÇÒ °ÍÀÌ´Ù.
    ±×¸®°í, »ìÆì º¸¸é µÈ´Ù!!!
    </para>

    <para>
    ¸¶Áö¸·À¸·Î, ´ÜÁö, C ÇÁ·Î±×·¥À» ¾î¼Àºí¸®·Î ÄÄÆÄÀÏ ÇÏ±â¸¸À»
    ¿øÇÑ´Ù¸é, ´ÜÁö, ¿©·¯ºÐÀÌ ¿øÇÏ´Â ÀÎ½ºÆ®·°¼ÇÀÇ Á¾·ù¿Í ¹®¹ý¸¸ ¾Ë¸é µÉ °ÍÀÌ´Ù.
    À§¿¡¼­ ¿©·¯ºÐÀÌ Á¤¸» ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÌ ÇÊ¿äÇÑ°¡¸¦
    ÆÇ´ÜÇÏµµ·Ï µ½´Â ¼½¼ÇÀ» º¸µµ·Ï ÇÏ¶ó : See section <xref linkend="s-doyou"> above.
    </para>
</section>

<section><title>GAS ÀÇ ÀÎÅÚ ¹®¹ý Áö¿ø</Title>
    <para>
        binutils 2.10 ºÎÅÍ GAS ´Â ÀÎÅÚ °è¿­ÀÇ ¹®¹ý ¶ÇÇÑ Áö¿øÇÑ´Ù.
        <literal>.intel_syntax</literal> Áö½Ã¾î¸¦ ÀÌ¿ëÇÏ¿©
        È°¼ºÈ­ ½ÃÅ²´Ù.
    </para>
</section>

<section><title>16-ºñÆ® ¸ðµå</title>
    <para>
        Binutils (2.9.1.0.25+) ÀÌÈÄÀÇ ¹öÁ¯ºÎÅÍ´Â i386 °è¿­ÀÇ
        ÄÄÇ»ÅÍµé¿¡¼­ 16ºñÆ® ¸ðµå(·¹Áö½ºÅÍ<emphasis>¿Í</emphasis> ÁÖ¼ÒÁöÁ¤¹æ½Ä)¸¦
        ¿Ïº®ÇÏ°Ô Áö¿øÇÑ´Ù. 
        ¾î¼Àºí¸® ÄÚµå¿¡¼­ 16ºñÆ®¿Í 32ºñÆ® ¸ðµå¸¦ ÀüÈ¯ÇÒ ¶§´Â
        <literal>.code16</literal> °ú <literal>.code32</literal> Áö½ÃÀÚ¸¦
        »ç¿ëÇÏ¸é µÈ´Ù.
    </para>
    <para>
        ¶ÇÇÑ, ¸î¸î »ç¶÷µé(oskit ÀÇ ÀúÀÚµéµµ Æ÷ÇÔ)ÀÌ »ç¿ëÇß´ø ±ò²ûÇÑ Æ®¸¯ÀÌ
        ÀÖ´Âµ¥, ±×°ÍÀº GCC ·Î ÇÏ¿©±Ý 16 ºñÆ® ¸®¾ó¸ðµå¿ëÀÇ ÄÚµå¸¦ 
        »ý¼ºÇÏµµ·Ï °­Á¦ÇÏ´Â °ÍÀÎµ¥,
        ÀÎ¶óÀÎ ¾î¼Àºí¸® ¹®ÀåÀÎ <literal>asm(".code16\n")</literal> À»
        ¾¸À¸·Î½á ±×·¸°Ô Çß´Ù.
        ±× ¹®ÀåÀ» »ç¿ëÇÏ¸é, GCC ´Â ¿©ÀüÈ÷ 32ºñÆ®ÀÇ ÁÖ¼ÒÁöÁ¤ ¹æ½ÄÀ»
        »ç¿ëÇÑ ÄÚµå¸¦ »ý»êÇÏÁö¸¸, GAS °¡ Àû´çÇÑ 32ºñÆ®ÀÇ Á¢µÎ¾î¸¦ ºÙ¿©ÁØ´Ù.
    </para>
</section>

<section><title>¸ÅÅ©·Î Áö¿ø</title>
    <para>
    GAS ¿¡´Â ¾ó¸¶ÀÇ ¸ÅÅ©·Î¿Í °ü·ÃµÈ ±â´Éµµ Æ÷ÇÔµÇ¾î ÀÖ´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº
    texinfo ¹®¼­¸¦ º¸¶ó. 
    ¸ÅÅ©·Î¿¡ ´õÇÏ¿©, GCC ´Â <filename>.s</filename> È®ÀåÀÚÀÇ ÆÄÀÏÀ» 
    GAS ¿¡ ¹Ù·Î º¸³»¿©¾ß ÇÒ ¼ø¼öÇÑ ¾î¼Àºí¸® ·Î ÀÎ½ÄÇÏ´Âµ¥,
    ¶ÇÇÑ, <filename>.S</filename> ÀÇ È®ÀåÀÚ¸¦ °¡Áö´Â ÆÄÀÏÀº GAS ·Î
    ³Ñ±âÁö Àü¿¡ ¸ÕÀú CPP ¸¦ °ÅÄ£ ÈÄ¿¡ ³Ñ°Ü¾ß ÇÒ ÆÄÀÏ·Î ÀÎ½ÄÇÑ´Ù.
    °è¼Ó ¸»ÇÏ´Â °ÍÀÌÁö¸¸, ¸®´ª½ºÀÇ ¼Ò½º¸¦ ¿¹Á¦»ï¾Æ º¸¶ó.
    </para>
    <para>
    GAS ´Â ¶ÇÇÑ, GASP (GAS Preprocessor) ¸¦ °¡Áö°í ÀÖ´Âµ¥,
    GASP °¡ ÇÏ´Â ÀÏÀº ÀÏ¹ÝÀûÀÎ ¸ÅÅ©·Î¾î¼Àºí¸®ÀÇ Æ®¸¯À» GAS ¿¡ ´õÇØÁÖ´Â
    °ÍÀÌ´Ù. GASP ´Â  GNU binutils ÆÐÅ°Áö ¾È¿¡ GAS ¿Í ´õºÒ¾î¼­ ¹èÆ÷µÈ´Ù.
    GASP ´Â CPP ³ª m4 À¯Æ¿¸®Æ¼Ã³·³ ÇÊÅÍ·Î½á µ¿ÀÛÇÑ´Ù.
    ÀÚ¼¼ÇÑ °ÍÀº ÀúÀÚ°¡ Àß ¸ð¸£°ÚÀ¸³ª, texinfo Çü½ÄÀÇ ¹®¼­°¡ µû¶ó¿À¹Ç·Î,
    ¹®¼­¸¦ ÂüÁ¶ÇÏ±â ¹Ù¶õ´Ù.
    ÀúÀÚ¿¡°Õ GAS ¿Í GASP ÀÇ Á¶ÇÕÀÌ ÀÏ¹ÝÀûÀÎ macro-assembler Ã³·³ 
    ´À²¸Á³´Ù.
    </para>
</section>
</section>

<section id="p-nasm" xreflabel="NASM">
<?html-filename nasm.html>
<title>NASM</title>

<para>
    Netwide Assembler project ´Â ¸Å¿ì ±¦ÂúÀº i386 ¾î¼Àºí·¯¸¦ Á¦°øÇÑ´Ù.
    ±× ¾î¼Àºí·¯´Â C ·Î ¾²¿©Á³À¸¸ç, ÃæºÐÈ÷ ¸ðµâÈ­ µÇ¾î ÀÖ´Ù. 
    ±×¸®°í, Áö±ÝÀº °ÅÀÇ ¸ðµç ¾Ë·ÁÁø ¹®¹ý°ú, ¸ñÀû ÆÄÀÏÀÇ Çü½ÄÀ» Áö¿øÇÏ°Ô µÇ¾ú´Ù.
</para>

<section id="p-nasm-where">
    <title>NASMÀ» ¾îµð¼­ ±¸ÇÒ ¼ö ÀÖ´Â°¡</title>
    <para>
        <ulink url="http://www.cryogen.com/nasm/">http://www.cryogen.com/nasm/</ulink>,
        <ulink url="http://nasm.rm-f.net">http://nasm.rm-f.net</ulink>
    </para>

    <para>
        ¿©·¯ºÐÀÌ ÀÚÁÖ °¡´Â metalab ¹Ì·¯ »çÀÌÆ®ÀÇ <filename>devel/lang/asm/</filename>
        µð·ºÅä¸®¿¡ ÀÖ´Ù. ¾Æ¸¶µµ rpm ÀÌ³ª deb Çü½ÄÀÇ ÆÐÅ°Áö·Îµµ ±¸ÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
    </para>
</section>

<section><title>NASM À¸·Î ¹«¾ùÀ» ÇÒ ¼ö ÀÖ´Â°¡</title>
    <para>
    ¹®¹ýÀº ÀÎÅÚ ½ºÅ¸ÀÏÀÌ´Ù. 
    ¶ÇÇÑ, ÀÌÇØÇÏ±â ½¬¿î ¸ÅÅ©·Î ÇÁ·Î¼¼½Ì¿¡ ´ëÇÑ Áö¿øµµ ÇÑ´Ù.
    </para>
    <para>
        Áö¿øµÇ´Â ¸ñÀû ÄÚµåÀÇ Çü½ÄÀº ´ÙÀ½°ú °°´Ù :
        <literal>bin</literal>,
        <literal>aout</literal>,
        <literal>coff</literal>,
        <literal>elf</literal>,
        <literal>as86</literal>,
        <literal>obj</literal> (DOS),
        <literal>win32</literal>,
        <literal>rdf</literal> (NASM °íÀ¯ÀÇ Æ÷¸Ë).
    </para>
    <para>
    NASM Àº ¶ÇÇÑ LCC ÄÄÆÄÀÏ·¯ÀÇ ¹é¿£µå·Îµµ »ç¿ëµÉ ¼ö ÀÖ´Ù.
    </para>
    <para>
    ¿©·¯ºÐÀÌ BCC ¸¦ 16ºñÆ® ÄÄÆÄÀÏ·¯·Î »ç¿ëÇÏÁö ¾Ê´Â´Ù¸é
    ¿©·¯ºÐÀº ¾Æ¸¶µµ, AS86 ÀÌ³ª MASM º¸´Ù NASM À» »ç¿ëÇØ¾ß
    ÇÒ °ÍÀÌ´Ù. NASM Àº ¿Â¶óÀÎÀ¸·Î °è¼Ó Áö¿øÀÌ ÀÌ·ç¾îÁö°í ÀÖ°í,
    ¶ÇÇÑ, °ÅÀÇ ¸ðµç ÇÃ·§Æû¿¡¼­ µ¹¾Æ°¡±â ¶§¹®ÀÌ´Ù.
    </para>
    <para>
    Note: NASM ¿¡´Â µð½º¾î¼Àºí·¯ÀÎ NDISASM µµ µþ·Á¿Â´Ù.
    </para>
    <para>
    NASM Àº »ç¶÷ÀÇ ¼ÕÀ¸·Î ÀÛ¾÷ÇØ³½ ÆÄ¼­¸¦ Å¾ÀçÇÏ°í ÀÖ´Âµ¥, 
    ±×·Î ÀÎÇØ GAS º¸´Ù ÈÎ¾À ºü¸£´Ù. (¿ªÀÚ ÁÖ : ±× ÀÌÈÄÀÇ ¸»Àº... ÇØ¼®ÀÌ Á» Èûµé±º¿ä -_-
    ¿ø¹®À» ±×´ë·Î µÎ°Ú½À´Ï´Ù.)
    Its hand-written parser makes it much faster than GAS,
    though of course, it doesn't support three bazillion different architectures.
    If you like Intel-style syntax, as opposed to GAS syntax,
    then it should be the assembler of choice..
    </para>
</section>

</section>

<section id="p-as86" xreflabel="AS86">
<?html-filename as86.html>
<title>AS86</title>

<para>
    AS86 Àº 16ºñÆ®¿Í 32ºñÆ® ¸ðµÎ¸¦ Áö¿øÇÏ´Â 80x86 ¿ëÀÇ ¾î¼Àºí·¯ÀÌ´Ù.
    ÀÌ ÇÁ·Î±×·¥Àº Bruce Evans ÀÇ C ÄÄÆÄÀÏ·¯(BCC) ÆÐÅ°ÁöÀÇ ÀÏºÎÀÌ´Ù.
    °ÅÀÇ ´ëºÎºÐ ÀÎÅÚÀÇ ¹®¹ýÀ» µû¸£Áö¸¸, ÁÖ¼Ò ÁöÁ¤¹æ½Ä µî¿¡¼­
    ¾à°£ÀÇ Â÷ÀÌ¸¦ º¸ÀÎ´Ù.
</para>

<section><title>AS86 À» ¾îµð¼­ ±¸ÇÒ ¼ö ÀÖ´Â°¡</title>
    <para>
    ¿ÏÀüÈ÷ ½Ã´ë¿¡ µÚ¶³¾îÁø AS86 ÀÇ ¹öÁ¯Àº HJLu ¿¡ ÀÇÇØ ¹èÆ÷µÈ´Ù.
    ¿ëµµ´Â ´ÜÁö ¸®´ª½º Ä¿³ÎÀ» ÄÄÆÄÀÏÇÏ´Â°Í ¹Û¿¡ ¾ø´Ù.
    bin86 ÆÐÅ°Áö (ÇöÀç ¹öÁ¯ 0.4) ¾È¿¡ Æ÷ÇÔµÇ¾î ÀÖ´Ù.
    ¸®´ª½º GCC ¸¦ ±¸ÇÒ ¼ö ÀÖ´Â °÷ÀÌ¸é ¾îµð¿¡³ª ÀÖ´Ù.
    ±×·¯³ª, ÀúÀÚ´Â ¸®´ª½º¸¦ ÄÄÆÄÀÏÇÏ´Â ¿ëµµ ¿Ü¿¡´Â ¾Æ¹«µµ
    AS86 À» ¾²Áö ¾Ê´Â´Ù°í ¸»ÇØÁÖ°í ½Í´Ù.
    °Ô´Ù°¡ ¸®´ª½º¸¦ ÄÄÆÄÀÏÇÏ´Âµ¥¿¡µµ, ¹Ì´Ð½ºÀÇ ¿ÀºêÁ§Æ® ÆÄÀÏ Æ÷¸ËÀ» 
    Áö¿øÇÏ´Â ºÎºÐ ¿Ü¿¡´Â ¾²ÀÌÁö ¾Ê´Â´Ù.
    ÀÌ ºÐ¾ß´Â GNU binutils µî°ú °°Àº ´Ù¸¥ Åø¿¡¼­´Â
    ÀüÇô Áö¿øÇÏÁö ¾Ê´Â ºÐ¾ßÀÌ´Ù.
    ±×¸®°í, AS86 Àº 32ºñÆ® ¸ðµå¿¡¼­ ¸î°¡Áö ¹ö±×¸¦
    ³»Æ÷ÇÏ°í ÀÖ´Ù.
    ±×³É AS86 À» ¸®´ª½º¸¦ ÄÄÆÄÀÏÇÏ´Â µ¥¿¡¸¸ »ç¿ëÇÏ¶ó.
    </para>
    <para>
    <link linkend="bde">Bruce Evans</link> ÀÇ ÄÄÆÄÀÏ·¯ÀÇ
    ÃÖ½Å ¹öÁ¯Àº Ç×»ó FreeBSD ¿Í ÇÔ²² ¹èÆ÷µÈ´Ù.
    2.1 ¹öÁ¯ÀÇ ¹èÆ÷ÆÇ¿¡¼­´Â ¼Ò½º¸¦ Ã£À» ¼ö ¾ø¾ú´Ù :(
    ÀúÀÚÀÇ È¨ÆäÀÌÁö¿¡ ¼Ò½º¸¦ µÎ°Ú´Ù.
    <ulink url="http://www.tunes.org/~fare/files/asm/bcc-95.3.12.src.tgz">
    http://www.tunes.org/~fare/files/asm/bcc-95.3.12.src.tgz</ulink>
    </para>
    <para>
    ¾îÂ·µç Linux/8086 (aka ELKS) ÇÁ·ÎÁ§Æ®´Â bcc ¸¦ À¯Áö/º¸¼ö ÇÏ°í ÀÖ±â´Â ÇÏ´Ù.
    (ÀúÀÚ´Â 32 ºñÆ® ÆÐÄ¡°¡ Æ÷ÇÔµÇ¾ú´Ù°í´Â »ý°¢ÇÏÁö ¾Ê´Â´Ù)
    <ulink url="http://www.linux.org.uk/ELKS-Home/">
    http://www.linux.org.uk/ELKS-Home/</ulink> (È¤Àº 
    <ulink url="http://www.elks.ecs.soton.ac.uk">
    http://www.elks.ecs.soton.ac.uk</ulink>) ¿Í
    <ulink url="ftp://linux.mit.edu/pub/linux/ELKS/">
    ftp://linux.mit.edu/pub/linux/ELKS/</ulink> ¸¦ µÑ·¯º¸µµ·Ï ÇÏ¶ó.
    ÀúÀÚ°¡ ¿©±â ¿Ã¶ó¿À´Â °³¹ß ¹öÁ¯µéÀ» ¸ðµÎ È®ÀÎÇØ º¼ ¼ö
    ¾ø¾ú´Ù. ÀÌ ±ÛÀ» ÀÐÀ¸½Ã´Â ºÐÀÌ °ü½ÉÀÌ ÀÖ´Ù¸é Á¶»çÇØ º¸°í
    ÀúÀÚ¿¡°Ô ÀÌ¾ß±âÇØ ÁØ´Ù¸é ÁÁ°Ú´Ù.
    </para>
    <para>
    ±×¸®°í, ¹«¾ùº¸´Ù ÀÌ ÅøÀÇ º¸´Ù ÃÖ½ÅÀÇ ¹öÁ¯Àº
    ¸®´ª½ºÀÇ a.out Æ÷¸ËÀÇ ½ÇÇàÆÄÀÏ Çü½ÄÀ» Áö¿øÇÑ´Ù.
    ±×·¡¼­, ¿©·¯ºÐÀº ¿©·¯ºÐÀÇ ÄÚµå¸¦ ¸®´ª½º ÇÁ·Î±×·¥¿¡ ¸µÅ©½ÃÄÑ¼­
    »ç¿ëÇÏ°Å³ª, GNU binutils ÆÐÅ°ÁöÀÇ ÅøµéÀ» ¿©·¯ºÐÀÇ
    ÇÁ·Î±×·¥ÀÇ ÀÚ·á¸¦ À¯ÁöÇÏ´Âµ¥ »ç¿ëÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
    AS86 ÇÁ·Î±×·¥Àº ÀÌÀü ¹öÁ¯ È¤Àº ´Ù¸¥ ÇÁ·Î±×·¥°ú ¾Æ¹«·± Ãæµ¹ ¾øÀÌ 
    ¿©·¯ºÐÀÇ ½Ã½ºÅÛ¿¡ °øÁ¸ÇÒ ¼ö ÀÖ´Ù.
    </para>
    <para>
    1995 ³â 3¿ù 12ÀÏ ÀÌÀüÀÇ ¹öÁ¯ÀÇ BCC ´Â 
    ¸ðµç ¼¼±×¸ÕÆ®ÀÇ Çª½Ã/ÆË À» 16ºñÆ®·Î ÇÏ´Â ¿À·ù°¡ ÀÖ´Âµ¥,
    ±×°ÍÀº 32ºñÆ® ¸ðµå·Î ÇÁ·Î±×·¡¹Ö ÇÏ´Âµ¥ ÀÖ¾î¼­
    »ó´çÈ÷ ±ÍÂú°í, °ñÄ¡¾ÆÇÂ ¹®Á¦ÀÌ´Ù.
    ÀúÀÚ´Â TUNES ÇÁ·ÎÁ§Æ®°¡ AS86 À» »ç¿ëÇÒ ´ç½Ã
    ±×¿¡´ëÇÑ ÆÐÄ¡¸¦ Çß¾ú´Ù.
    <ulink url="http://www.tunes.org/~fare/files/asm/as86.bcc.patch.gz">
    http://www.tunes.org/~fare/files/asm/as86.bcc.patch.gz</ulink>
    ºê·ç½º ¿¡¹Ý½ºµµ ÀÌ ÆÐÄ¡¸¦ ½ÂÀÎÇÏ¿´´Ù.
    ±×·¸Áö¸¸, ±×´Â bcc ÀÇ »õ·Î¿î ¸±¸®Áî´Â ¹ßÇ¥ÇÏÁö ¾Ê¾Ò´Ù.
    </para>
</section>

<section><title>¾î¼Àºí·¯¸¦ ÀÛµ¿½ÃÅ°´Â ¹æ¹ý : How to invoke the assembler? </title>
    <para>
        ¾Æ·¡¿¡ BCC ¸¦ »ç¿ëÇØ¼­ <filename>.s</filename> ÆÄÀÏ·ÎºÎÅÍ
        a.out Çü½ÄÀÇ <filename>.o</filename> ¿ÀºêÁ§Æ® ÄÚµå¿Í <filename>.l</filename> ÀÇ
        ¸®½ºÆÃ ÆÄÀÏÀ» »ý¼º½ÃÅ°´Â 
        »ý¼º½ÃÅ°´Â GNU makefile ÀÇ ¿£Æ®¸®°¡ ÀÖ´Ù.
    </para>

    <para><programlisting>
    %.o %.l:	%.s
        bcc -3 -G -c -A-d -A-l -A$*.l -o $*.o $<
    </programlisting></para>

    <para>
        ¿©·¯ºÐÀÌ ¸®½ºÆÃ ÆÄÀÏÀ» »ý¼ºÇÏ±â¸¦ ¿øÇÏÁö ¾Ê´Â´Ù¸é, 
        <literal>%.l</literal> °ú <literal>-A-l</literal>, ±×¸®°í 
        <literal>-A$*.l</literal> À» »èÁ¦ÇÏ¸é µÈ´Ù.
        ±×¸®°í, a.out ¸»°í ´Ù¸¥ ÆÄÀÏÀÌ Ãâ·ÂµÇ°Ô ÇÏ·Á¸é,
        bcc ÀÇ ¹®¼­¸¦ ÂüÁ¶ÇÏ¿© ´Ù¸¥ Áö¿øµÇ´Â Çü½ÄÀ» Ã£¾Æº¸°Å³ª,
        GNU binutils ÆÐÅ°ÁöÀÇ objcopy À¯Æ¿¸®Æ¼¸¦ »ç¿ëÇÏ¶ó.
    </para>
</section>

<section><title>AS86ÀÇ ¹®¼­¸¦ Ã£À» ¼ö ÀÖ´Â °÷</title>
    <para>
    ¹®¼­µéÀº bcc ÆÐÅ°Áö ¾È¿¡ Æ÷ÇÔµÇ¾î ÀÖ´Ù.
    FreeBSD »çÀÌÆ®ÀÎ <ulink url="http://www.tunes.org/~fare/files/asm/bcc-95.3.12.src.tgz">
    http://www.tunes.org/~fare/files/asm/bcc-95.3.12.src.tgz</ulink> ¿¡¼­ ¸ÇÆäÀÌÁö¸¦
    ±¸ÇÒ ¼ö ÀÖ¾ú´Ù.
    ELKS ÀÇ °³¹ßÀÚµéÀÌ ´õ ¸¹ÀÌ ¾Ë°í ÀÖÀ» °ÍÀÌ´Ù.
    Èì... ±×¸®°í, Á» ´õ ¾Ë°í ½Í´Ù¸é, AS86 ÀÇ ¼Ò½º ±× ÀÚÃ¼°¡ 
    ÁÁÀº ¹®¼­°¡ µÉ °ÍÀÌ´Ù. 
    ÁÖ¼®ÀÌ ±×¸® Àß µÇ¾î ÀÖ´Â °ÍÀº ¾Æ´ÏÁö¸¸, ÇÁ·Î±×·¡¹Ö ½ºÅ¸ÀÏÀº
    ¸Å¿ì Á÷¼±Àû(?)ÀÌ´Ù. ¿©·¯ºÐÀº ELKS ÇÁ·ÎÁ§Æ®³ª TUNES ÇÁ·ÎÁ§Æ® 0.0.0.25
    ¿¡¼­ AS86 ÀÌ ¾î¶»°Ô ¾²¿´´ÂÁö »ìÆìº¼ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù.
    </para>
</section>

<section><title>¸ÅÅ©·Î Áö¿ø</title>
    <para>
        AS86 Àº °£´ÜÇÑ ¸ÅÅ©·Îµµ Áö¿øÇÑ´Ù. ±×·¸Áö¸¸, ÀúÀÚ´Â 
        ±×¿¡´ëÇÑ ¹®¼­´Â Ã£Áö ¸øÇÏ¿´´Ù.
        AS86ÀÇ ¼Ò½º´Â ¸Å¿ì straightforward ÇÏ°Ô ¾²¿´À¸¹Ç·Î,
        ¿©·¯ºÐÀÌ ¿øÇÑ´Ù¸é, ¼Ò½º¸¦ »ìÆìº¸°í, ¿øÇÏ´Â ºÎºÐÀ» 
        ½±°Ô ÀÌÇØÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
        ¿©·¯ºÐÀÌ ´Ü¼øÇÑ ¸ÅÅ©·Î ÀÌ»óÀÇ 
        ´õ ¸¹Àº °ÍÀ» ¿øÇÑ´Ù¸é ¿ÜºÎÀÇ ÇÊÅÍ (µÚ¿¡¼­ ¼³¸íÇÑ´Ù)¸¦ ÀÌ¿ëÇÒ ¼öµµ ÀÖ´Ù.
    </para>
</section>

<section><title>¸¸¾à ÀÌ »õ·Î¿î ¹öÁ¯À» ÀÌ¿ëÇØ¼­ ¸®´ª½º¸¦ ´õÀÌ»ó ÄÄÆÄÀÏ ÇÒ ¼ö ¾ø´Ù¸é ¾î¶»°Ô ÇØ¾ß ÇÏ´Â°¡ 
        : What if I can't compile Linux anymore with this new version?</title>
<para>
    Linus ´Â ½ñ¾ÆÁö´Â ¸ÞÀÏ´õ¹Ì¿¡ ÆÄ¹¯Çô :) ÀÖ´Ù.
    ±×¸®°í, HJLu (bin86 ÀÇ °ø½ÄÀû À¯Áö/º¸¼öÀÚ) °¡ 
    as86 ÀÇ as86 ÀÇ ÃÖ½Å ¹öÁ¯À» »ç¿ëÇÑ ÄÚµåÀÇ Àç ±¸Ãà º¸´Ù
    ±¸¹öÁ¯ÀÇ ÇØÅ·À» ¼±ÅÃÇß±â ¶§¹®¿¡ 
    ÀúÀÚ°¡ as86 ¿¡ ¸®´ª½º¸¦ ÄÄÆÄÀÏ ÇÒ ¼ö ÀÖµµ·Ï ÇÑ ÆÐÄ¡°¡ 
    Á¦´ë·Î ¹Þ¾Æµé¿©ÁöÁö ¾Ê¾Ò´Ù°í »ý°¢ÇÑ´Ù.
    (¿ªÀÚÁÖ : ¹ø¿ªÀÌ ÀÌ»óÇØ¼­ ¿ø¹®À» ½Æ½À´Ï´Ù)
    Linus is buried alive in mail,
    and since HJLu (official bin86 maintainer)
    chose to write hacks around an obsolete version of as86
    instead of building clean code around the latest version,
    I don't think my patch for compiling Linux with a modern as86
    has any chance to be accepted if resubmitted.
</para>
<para>
    ±×·¯³ª, º° ¹®Á¦ ¾ø´Ù. bin86 ÆÐÅ°Áö¿¡¼­ as86 À» <filename>/usr/bin/</filename>
    ¿¡ ±×´ë·Î ³öµÎ°í, bcc °¡ ÃÖ½ÅÀÇ as86 À» <filename>/usr/local/libexec/i386/bcc/as</filename>
    ·Î ÀÎ½ºÅçÇÏµµ·Ï ÇØ ÁÖ¸é µÈ´Ù.
    ¿©·¯ºÐÀº ¸í½ÃÀûÀ¸·Î /ÁÁÀº/ ¹öÁ¯ÀÇ as86 À» È£ÃâÇÒ ÇÊ¿ä´Â ¾ø´Ù.
    Á¦´ë·Î µÈ ¿É¼Ç°ú ÇÔ²² È£ÃâµÇ¸é, bcc °¡ ¸ðµç°ÍÀ» Á¦´ë·Î 
    Á¶Á¤ÇØ ÁÖ±â ¶§¹®ÀÌ´Ù. ¸®´ª½ºÀÇ a.out Æ÷¸ËÀ¸·ÎÀÇ º¯È¯±îÁö Æ÷ÇÔÇØ¼­ ¸»ÀÌ´Ù.
    ±×·¡¼­, ÆÄÀÏÀ» as86 À» ¹Ù·Î »ç¿ëÇÏÁö ¸»°í, bcc ¸¦ ÇÁ·ÐÆ®¿£µå·Î ÀÌ¿ëÇØ¼­ ¾î¼ÀºíÇÏ¶ó. 
    Now, this shouldn't matter: just keep your as86 from the bin86 package
    in <filename>/usr/bin/</filename>, and let bcc install the good as86 as
    <filename>/usr/local/libexec/i386/bcc/as</filename>
    where it should be. You never need explicitly call this "good" as86,
    because bcc does everything right, including conversion to Linux a.out,
    when invoked with the right options;
    so assemble files exclusively with bcc as a frontend, not directly with as86.
</para>
<para>
    Áö±ÝÀº gas µµ 16ºñÆ® ÄÚµåµµ Áö¿øÇÏ°í, NASM µµ ±×·¸°Ô ÇÒ ¸ð¾çÀÌ¹Ç·Î,
    ¸®´ª½º´Â AS86 ÀÇ ±×´Ã¿¡¼­ ¹þ¾î³¯ ¼ö ÀÖÀ» °ÍÀÌ´Ù. ´©°¡ ¾Ë¸®...
    Since GAS now supports 16-bit code, and NASM looks promising,
    maybe Linux will get rid of AS86, anyway? Who knows!
    </para>
</section>

</section>

<section id="p-other">
<?html-filename other.html>
<title>´Ù¸¥ ¾î¼Àºí·¯µé</title>

<para>
    Áö±ÝºÎÅÍ ¼Ò°³ÇÏ°íÀÚ ÇÏ´Â ¾î¼Àºí·¯µéÀº ÀÏ¹ÝÀûÀ¸·Î »ç¿ëÇÏ´Â °ÍÀÌ
    ¾Æ´Ñ ¾î¼Àºí·¯µéÀÌ´Ù. ¾Õ¼­ ¾ð±ÞÇÑ ¾î¼Àºí·¯µéÀÌ 
    ºÒ¸¸Á·½º·´´Ù¸é Áö±ÝºÎÅÍ ¼Ò°³ÇÏ´Â ¾î¼Àºí·¯µéÀ» »ç¿ëÇÏ¶ó.
    ±×·¯³ª ¾Õ¼­ ¾ð±ÞÇÑ ¾î¼Àºí·¯µéÀÌ ºÒ¸¸Á·½º·¯¿ï ÀÌÀ¯°¡ ¾ø´Ù. :)
    ±×·¡¼­ ÀúÀÚ´Â ¾Õ¼­ÀÇ ¾î¼Àºí·¯µéÀ» »ç¿ëÇÏ±â¸¦ ÃßÃµÇÏ´Â ¹ÙÀÌ´Ù.
    ÇÏÁö¸¸, ¿©·¯ºÐÀÌ °³¹ßÇÏ´Â ¼ÒÇÁÆ®¿þ¾î¿¡ »ç¿ëÇÏ´Â 
    ¾î¼Àºí·¯¸¦ ÀÏ·üÀûÀ¸·Î °°Àº °ÍÀ¸·Î ÇÒ ÇÊ¿ä´Â ¾ø´Ù.
</para>

<section><title>Win32Forth ¾î¼Àºí·¯</title>
    <para>
    Win32Forth ´Â <emphasis>free</emphasis> 32-bit ANS FORTH system ÀÌ´Ù.
    Win32 È¯°æ, Áï, À©95, À©NT µî¿¡¼­ ¼º°øÀûÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ´Â ¾î¼Àºí·¯ÀÌ´Ù.
    ÀÌ ¾î¼Àºí·¯´Â reflective FORTH language ¿¡ Æ÷ÇÔµÇ¾î ÀÖ´Â
    °ø°³ 32ºñÆ® ¾î¼Àºí·¯ÀÌ´Ù. (¹®¹ýÀº prefix ³ª postfix ¸ðµÎ¸¦ Áö¿øÇÑ´Ù)
    ¸ÅÅ©·Î ÇÁ·Î¼¼½Ìµµ reflective language FORTH ÀÇ ´É·Â ÇÏ¿¡¼­
    ¼º°øÀûÀ¸·Î Àß Áö¿øµÈ´Ù.
    ±×·¯³ª, ´ÜÁ¡ÀÌ ÀÖ´Ù¸é, Áö¿øµÇ´Â ÀÔ.Ãâ·Â ³»¿ëÀÌ Win32Forth ¿¡¼­¸¸
    »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù. (.obj ÆÄÀÏ·ÎÀÇ ´ýÇÁ´Â ¾ø´Ù. ±×·¯³ª
    ¿©·¯ºÐÀÌ ÇÊ¿äÇÏ´Ù¸é ±×·¯ÇÑ ±â´ÉÀ» Ãß°¡ÇÒ ¼ö ÀÖ´Ù)
    ÀÌ ¾î¼Àºí·¯¸¦ Ã£À» ¼ö ÀÖ´Â Àå¼Ò´Â ´ÙÀ½°ú °°´Ù : 
        <ulink url="ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/">
        ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/</ulink>.
    </para><para>
    Win32Forth is a <emphasis>free</emphasis> 32-bit ANS FORTH system
    that successfully runs under Win32s, Win95, Win/NT.
    It includes a free 32-bit assembler (either prefix or postfix syntax)
    integrated into the reflective FORTH language.
    Macro processing is done with
    the full power of the reflective language FORTH;
    however, the only supported input and output contexts is Win32For itself
    (no dumping of <filename>.obj</filename> file,
    but you could add that feature yourself, of course).
    Find it at
    <ulink url="ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/"></ulink>.
    </para>
</section>

<section><title>TDASM</title>
    <para>
        TDASM (the Table Driven Assembler) Àº ¾î¶² ¾î¼Àºí¸® ¾ð¾î·Îµµ
        Æ÷ÆÃÀÌ °¡´ÉÇÑ <emphasis>°ø°³</emphasis> ¾î¼Àºí·¯ÀÌ´Ù.
        ÀÌ ¾î¼Àºí·¯´Â Å¸°ÙÀÌ µÇ´Â ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­°¡ ¹«¾ùÀÌµç °£¿¡ 
        ±×¿¡ ÇØ´çÇÏ´Â ÄÄÆÄÀÏ ÀÛ¾÷À» Á¤ÀÇÇÏ´Â Å×ÀÌºíÀ» ÀÌ¿ëÇÏ¿©¼­ 
        ÇØ´ç ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­ÀÇ ÄÄÆÄÀÏ·¯·Î »ç¿ëÀÌ °¡´ÉÇÑ 
        ¾î¼Àºí·¯ÀÌ´Ù.
    </para><para>
        The Table Driven Assembler (TDASM) is a <emphasis>free</emphasis> portable
        cross assembler for any kind of assembly language.
        It should be possible to use it as a compiler to any target microprocessor
        using a table that defines the compilation process.
    </para>
    <para>
        ±¸ÇÒ ¼ö ÀÖ´Â Àå¼Ò´Â <ulink url="http://www.penguin.cz/~niki/tdasm/">
        http://www.penguin.cz/~niki/tdasm/</ulink> ÀÌ´Ù.
    </para>
</section>

<section><title>Terse</title>
    <para>
    <ulink url="http://www.terse.com">Terse</ulink> ´Â
    x86 °è¿­À» À§ÇÑ <emphasis>°¡Àå ÄÄÆÑÆ®ÇÑ</emphasis> 
    ¾î¼Àºí·¯ ¹®¹ýÀ» °¡Áö°í ÀÖ´Â ÇÁ·Î±×·¡¹Ö ÅøÀÌ´Ù.
    ÇÏÁö¸¸, ÀÌ ¾î¼Àºí·¯´Â evil proprietary software ÀÌ´Ù
    (¿ªÀÚÁÖ:¸¶¶¥ÇÑ ¸»À» ¸øÃ£¾Ò½À´Ï´Ù) ÀÌ ¾î¼Àºí·¯ÀÇ 
    °ø°³ Å¬·ÐÀ» ¸¸µå´Â ÇÁ·ÎÁ§Æ®°¡ ÀÖ¾ú´Ù°í´Â ÇÏ´Âµ¥, 
    Áö±ÝÀº ´õÀÌ»ó °³¹ßµÇÁö ¾Ê´Â °ÍÀ¸·Î ÇÊÀÚ´Â ¾Ë°í ÀÖ´Ù.
    ¸¸¾à ¿©·¯ºÐÀÌ terse ¿Í ºñ½ÁÇÑ ¹®¹ýÀ» °¡Áø ¾î¼Àºí·¯¸¦
    Ã£´Â´Ù¸é, NASM ÀÇ ÇÁ·ÐÆ®¿£µå·Î ±× ¹®¹ýÀ» °³¹ßÇÏ¸é µÉ °ÍÀÌ´Ù.
    °ü½ÉÀÖ´Ù¸é, 
    <ulink URL="news:comp.compilers">comp.compilers</ulink>
    ¿¡¼­ ¿ª»çÀûÀÎ ÅäÀÇµé(?)À» ÈÈ¾îº¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
    </para>
    <para><literallayout>
    1999/07/11 19:36:51, the moderator wrote:

    "There's no reason that assemblers have to have awful syntax.  About
    30 years ago I used Niklaus Wirth's PL360, which was basically a S/360
    assembler with Algol syntax and a a little syntactic sugar like while
    loops that turned into the obvious branches.  It really was an
    assembler, e.g., you had to write out your expressions with explicit
    assignments of values to registers, but it was nice.  Wirth used it to
    write Algol W, a small fast Algol subset, which was a predecessor to
    Pascal.  As is so often the case, Algol W was a significant
    improvement over many of its successors. -John"
    </literallayout></para>
</section>

<section><title>HLA</title>
    <para>
    <ulink url="http://webster.cs.ucr.edu">HLA</ulink> ´Â
    <emphasis remap="bold">H</Emphasis>igh
    <emphasis remap="bold">L</Emphasis>evel
    <emphasis remap="bold">A</Emphasis>ssembly language ÀÇ 
    ¾àÀÚÀÌ´Ù.
    ÀÌ ¾î¼Àºí·¯´Â º¯¼ö ¼±¾ðÀÌ³ª
    ÇÔ¼ö ¼±¾ð, ÇÔ¼ö È£Ãâ°ú °°Àº ºÎºÐ¿¡¼­ 
    ÆÄ½ºÄ®ÀÌ³ª C/C++ °ú °°Àº °í±Þ¾ð¾î¿Í
    ¸Å¿ì ºñ½ÁÇÑ ¹®¹ýÀ» »ç¿ëÇÑ´Ù.
    ±×¸®°í ÀÌ ¾î¼Àºí·¯´Â Ç¥ÁØ ¸Ó½Å ÀÎ½ºÆ®·°¼ÇÀ» À§ÇÑ
    ¼öÁ¤µÈ ¾î¼Àºí¸® ¾ð¾î ¹®¹ýÀ» »ç¿ëÇÑ´Ù.
    ¶ÇÇÑ if, while, repeat, until µî°ú °°Àº °í±Þ¾ð¾î¿¡¼­
    Á¦°øÇÏ´Â Á¦¾î ±¸Á¶¸¦ °¡Áø´Ù.
    </para>
    <para>
    HLA ´Â free ÀÌÁö¸¸, Win32 È¯°æ¿¡¼­¸¸ µ¿ÀÛÇÑ´Ù.
    HLA ´Â MASM ¿ëÀÇ ÄÚµå¸¦ »ý»êÇÏ±â ¶§¹®¿¡ ¸ñÀûÆÄÀÏÀ» »ý¼ºÇÏ±â 
    À§ÇÑ ÃÖÁ¾ ¾î¼Àºí¸µ°ú ¸µÅ·À» À§ÇØ ¿©·¯ºÐÀº MASM °ú MS-link ÀÇ 32ºñÆ®
    ¹öÁ¯ÀÌ ÇÊ¿äÇÏ´Ù. ±×·¯³ª, HLA ÀÇ MASM ¹öÁ¯ÀÇ Ãâ·ÂÀ»
    TASM ¿¡¼­ ÄÄÆÄÀÏ µÉ ¼ö ÀÖµµ·Ï º¯È¯ÇØÁÖ´Â <command>m2t</command>
    Æ÷½ºÆ® ÇÁ·Î¼¼¼­ ÇÁ·Î±×·¥µµ µû¶ó¿Â´Ù. ºÒÇàÈ÷µµ, NASM Àº Áö¿øµÇÁö ¾Ê´Â´Ù.
    </para>
</section>

<section><title>TALC</title>
    <para>
    <ulink url="http://www.cs.cornell.edu/talc/">TALC</ulink> ´Â
    ¶Ç´Ù¸¥ MASM/Win32 ±â¹ÝÀÇ °ø°³ ÄÄÆÄÀÏ·¯ÀÌ´Ù. (±×·³¿¡µµ ºÒ±¸ÇÏ°í,
    ELF Çü½ÄÀÇ Ãâ·Âµµ Áö¿øÇÏ´Â °Í °°´Ù)
    </para>
    <para>
    TAL Àº 
    <emphasis>T</emphasis>yped
    <emphasis>A</Emphasis>ssembly
    <emphasis>L</Emphasis>anguage ÀÇ ¾àÀÚÀÌ´Ù.
    (¿ªÀÚÁÖ:Á¤¸».. ¾Æ·¡ÀÇ ¹®ÀåµéÀº Àü¹®ÀûÀÎ ¿ë¾î¶ó.. ¹ø¿ªÀÌ Èûµé±º¿ä..
    ´©±º°¡ ¹ø¿ªÇØÁÖ½Ç ºÐÀº... ÂªÀ¸´Ï±î Àú¿¡°Ô ¸ÞÀÏ ÁÖ½Ê½Ã¿À. ¹Ý¿µÇÏ°Ú½À´Ï´Ù)
    It extends traditional untyped assembly languages with typing annotations,
    memory management primitives, and a sound set of typing rules, to guarantee
    the memory safety, control flow safety,and type safety of TAL programs.
    Moreover, the typing constructs are expressive enough to encode
    most source language programming features including records and structures,
    arrays, higher-order and polymorphic functions, exceptions, abstract data types,
    subtyping, and modules. Just as importantly,
    TAL is flexible enough to admit many low-level compiler optimizations.
    Consequently, TAL is an ideal target platform for type-directed compilers
    that want to produce verifiably safe code
    for use in secure mobile code applications
    or extensible operating system kernels.
    </para>
</section>

<section><title>x86 ¿ëÀÇ ÇÁ¸®°¡ ¾Æ´Ï°Å³ª 32ºñÆ®°¡ ¾Æ´Ñ ¾î¼Àºí·¯µé</title>
    <para>
    ¿©·¯ºÐÀº <link linkend="s-res-gen">Raymond Moon's x86 assembly FAQ</link>
    ¿¡¼­ x86 ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÇ ±âÃÊÀûÀÎ Áö½Ä°ú ÇÔ²² 
    ±×·¯ÇÑ ¾î¼Àºí¸®¿¡ ´ëÇØ º¸´Ù ¸¹Àº ÀÚ·áµéÀ» Ã£À» ¼ö ÀÖ´Ù.
    </para><para>
    Note : ¸ðµç µµ½º ±â¹ÝÀÇ ¾î¼Àºí·¯µéÀº ¸®´ª½ºÀÇ DOS ¿¡¹Ä·¹ÀÌÅÍ¸¦ ÅëÇØ¼­
    »ç¿ëµÇ¾î¾ß ÇÑ´Ù. ÃÖ±ÙÀÇ µµ½º ±â¹ÝÀÇ ¾î¼Àºí·¯µéÀº GNU BFD ¶óÀÌºê·¯¸®¿¡¼­ 
    Áö¿øÇÏ´Â COFF ³ª ´Ù¸¥ ¸ñÀû ÆÄÀÏ Æ÷¸ËµéÀ» Áö¿øÇÏ±â ¶§¹®¿¡ 
    ¿©·¯ºÐÀº ±×·¯ÇÑ ¾î¼Àºí·¯µéÀ» ´Ù¸¥ °ø°³ÀÇ 32ºñÆ® Åøµé°ú ÇÔ²² 
    »ç¿ëÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù. ¾Æ¸¶µµ GNU objcopy(binutils ÆÐÅ°Áö¿¡
    ÀÖ´Ù) ¸¦ º¯È¯¿ë ÇÊÅÍ·Î ÀÌ¿ëÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù.
    </para>
</section>
</section>
</chapter>


<chapter id="s-meta" xreflabel="Metaprogramming">
<?html-filename metaprogramming.html>
<title>¸ÞÅ¸ÇÁ·Î±×·¡¹Ö</title>
<para>
    ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀº Áö·çÇÑ ÀÛ¾÷ÀÌ´Ù. ±×·¯³ª,
    ±×·¸´Ù°í °áÁ¤ÀûÀÎ ºÎºÐ¿¡¼­ ¾î¼Àºí¸®¸¦ »ç¿ëÇÏÁö ¾ÊÀ»¼ö´Â ¾ø´Ù.
</para>
<para>
    ¿©·¯ºÐÀº Á¦´ë·Î ÀÛ¾÷À» ¼öÇàÇÏ±â À§ÇØ¼­ ÀûÀýÇÑ ÅøÀ» »ç¿ëÇØ¾ß 
    ÇÒ °ÍÀÌ´Ù.... ´Ù½Ã ¸»ÇÏÀÚ¸é, ¾î¼Àºí¸® ¾ð¾î°¡ ¹Ýµå½Ã ÇÊ¿äÇÏÁö ¾Ê´Ù¸é
    ¾î¼Àºí¸®¸¦ »ç¿ëÇØ¼­´Â ¾ÈµÈ´Ù. ´ë½Å, C, OCaml, perl, Scheme, µîÀÇ
    °í±Þ¾ð¾î¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ´ë°³ÀÇ °æ¿ì ´õ ³ªÀº ¼±ÅÃÀÌ µÉ °ÍÀÌ´Ù.
</para>
<para>
    ±×·¯³ª, ¾Õ¼­ ¾ð±ÞÇÑ °í±Þ ÇÁ·Î±×·¡¹Ö ¾ð¾î°¡ 
    ±â°è ÀÚÃ¼¸¦ ¸¸Á·ÇÒ ¸¸ÇÑ ¼öÁØÀ¸·Î ÄÁÆ®·Ñ ÇÒ ¼ö ÀÖ´Â ±â´ÉÀ» Á¦°øÇÏÁö
    ¸øÇÏ´Â °æ¿ì°¡ ÀÖ´Ù. ´Ù½Ã ¸»ÇØ¼­, ±×·¯ÇÑ ¾ð¾î°¡ Á¦°øÇÏ´Â
    ¸Ó½Å¿¡ ´ëÇÑ Á¦¾î±â´É º¸´Ù ´õ ¼¼¹ÐÇÏ°Ô ÇÏµå¿þ¾î¸¦ 
    ÄÁÆ®·Ñ ÇØ¾ß ÇÏ´Â °æ¿ì¿¡ ¾î¼Àºí¸®°¡ À¯¿ëÇÏ°Å³ª, ÇÊ¿äÇÒ °ÍÀÌ´Ù.
    ±×·¯ÇÑ °æ¿ì, ¿©·¯ºÐÀº ¸ÅÅ©·Î ÇÁ·Î¼¼½ÌÀÌ³ª ¸ÞÅ¸ ÇÁ·Î±×·¡¹Ö ÅøÀ»
    À¯¿ëÇÏ°Ô ¾µ ¼ö ÀÖ´Ù. ±×·¯ÇÑ ÅøÀ» »ç¿ëÇÏ¸é, ¿©·¯ºÐÀº ÆÐÅÏÀ» 
    ÀÌ¿ëÇÑ ÇÁ·Î±×·¡¹ÖÀ» ÇÒ ¼ö ÀÖ°Ô µÈ´Ù. ´Ù½Ã ¸»ÇØ¼­, ÇÑ ÆÐÅÏ¿¡ ´ëÇÑ
    Á¤ÀÇ¸¦ ³»·Á µÎ¸é, ±×°ÍÀ» ÀÌ¿ëÇÏ¿© ¾ÈÀüÇÏ°Ô, ¶Ç Àç»ç¿ë °¡´ÉÇÏ°Ô
    ¸ÅÅ©·Î Ã³·³ »ç¿ëÇÏ¿© ÇÁ·Î±×·¡¹ÖÀ» ÇÒ ¼ö ÀÖ°Ô µÇ´Â °ÍÀÌ´Ù.
    ±×·¯ÇÑ ¹æ½ÄÀ¸·Î ÇÁ·Î±×·¡¹ÖÀ» ÇÑ´Ù¸é, ¿©·¯ºÐÀÌ ¸¸µç ÄÚµå´Â º¸´Ù ¾ÈÀüÇÏ¸ç,
    ¼öÁ¤ÇÒ ¶§¿¡µµ ÆÐÅÏÀÇ Á¤ÀÇ¸¸ ¹Ù²ãÁÖ¸é ÀÚµ¿À¸·Î ¼öÁ¤µÈ ¹öÁ¯ÀÇ ¼Ò½º°¡
    ´Ù½Ã »ý¼ºµÇ°Ô ÇÏ´Â µîÀÇ ¿©·¯°¡Áö ÀÕÁ¡ÀÌ ÀÖ´Ù.
    ÀÏ¹ÝÀûÀ¸·Î »ç¿ëÇÏ´Â ¾î¼Àºí·¯¸¸ °¡Áö°í´Â ½ÉÁö¾î
    ÀÛÀº ·çÆ¾À» C ¿Í ¿¬°áÇÏ·Á°í ÇÒ ¶§¿¡µµ ÀÌ¿Í°°ÀÌ º¹ÀâÇÑ 
    ±â´ÉÀ» ¼öÇàÇÒ ¼ö ¾ø´Ù.
</para>

<section>
<?html-filename external.html>
<title>¿ÜºÎ ÇÊÅÍµé</title>
    <para>
    ¿©·¯ºÐÀÌ Áñ°Ü »ç¿ëÇÏ´Â ¾î¼Àºí·¯¿¡¼­ Áö¿øÇÏ´Â ¸ÅÅ©·Î°¡ ¹«¾ùÀÌµç,
    ¿©·¯ºÐÀÌ ÁÖ·Î »ç¿ëÇÏ´Â ¾ð¾î°¡ ¹«¾ùÀÌµçÁö°£¿¡ (½ÉÁöÀÇ C ÀÏ °æ¿ì¿¡µµ)
    ±× ¾ð¾î°¡ ¿©·¯ºÐÀÌ »ý°¢ÇÏ±â¿¡ ÃæºÐÈ÷ expressive(¸ðµç °ÍÀ» Ç¥ÇöÇÒ ¼ö ÀÖ´Â) ÇÏÁö
    ¾Ê´Ù¸é, ¿©·¯ºÐÀº ¿©·¯ºÐÀÇ ¼Ò½º ÆÄÀÏÀ» ¿ÜºÎÀÇ ÇÊÅÍ¸¦ Åë°úÇØ¼­
    Àç»ý¼º(?)µÇ°Ô ÇÒ ¼ö ÀÖÀ¸¸ç, Makefile ¿¡¼­ ´ÙÀ½¿¡ º¸¿©Áö´Â °Í°ú °°Àº
    °£´ÜÇÑ ±ÔÄ¢¸¸ Ãß°¡ ÇÔÀ¸·Î¼­ ±×·¸°Ô ÇÒ ¼ö ÀÖ´Ù.
    </para>

    <para>
<programlisting>
%.s:    %.S other_dependencies
        $(FILTER) $(FILTER_OPTIONS) < $< > $@
</programlisting>
    </para>

    <section id="p-cpp" xreflabel="CPP">
    <title>CPP</title>
        <para>
        CPP ´Â ½ÇÀº ±×¸® Ç¥ÇöÀûÀÌÁö ¸øÇÏ´Ù(is truly not very expressive),
        ÇÏÁö¸¸, °£´ÜÇÑ ÀÏÀ» ÇÏ±â À§ÇØ¼­´Â CPP ·Îµµ ÃæºÐÇÏ´Ù.
        CPP ´Â Ç¥ÁØÀÌ¸ç, GCC ¿¡ ÀÇÇØ¼­ Åõ¸íÇÏ°Ô È£ÃâµÇ¾îÁø´Ù.
        </para>
        <para>
        CPP ÀÇ ÇÑ°è¿¡ ´ëÇÑ ¿¹¸¦ µéÀÚ¸é, ¿©·¯ºÐÀº ¿©·¯ºÐÀÇ °´Ã¼°¡
        ¼±¾ðµÇ¾î¼­, »ç¿ëÇÒ ¶§, ±× °´Ã¼°¡ À¯È¿ÇÑ ºÎºÐÀÇ ¸¶Áö¸·¿¡ ÀÚµ¿À¸·Î 
        ¼Ò¸êÀÚ(destructor) °¡ È£ÃâµÇ°Ô ÇÏ´Â ±â´ÉÀ»
        ±¸ÇöÇÒ ¼ö´Â ¾ø´Ù.
        </para><para>
        As an example of its limitations, you can't declare objects so that
        destructors are automatically called at the end of the declaring block;
        you don't have diversions or scoping, etc.
        </para>
        <para>
        CPP ´Â ´ëºÎºÐÀÇ C ÄÄÆÄÀÏ·¯ ÆÐÅ°Áöµé¿¡ Æ÷ÇÔµÇ¾î ÀÖ´Ù.
        ±×·¯³ª, Æ¯º°È÷ ¶Ù¾î³ª°Å³ª ÇÏÁöµµ ¾Ê´Ù.
        </para>
    </section>

    <section id="p-m4" xreflabel="M4">
        <title>M4</title>
        <para>
        M4 ´Â ¿©·¯ºÐ¿¡°Ô ¸Å¿ì ÈÇ¸¢ÇÏ°í, °­·ÂÇÑ ¸ÅÅ©·Î ÇÁ·Î¼¼½Ì µµ±¸°¡ µÇ¾î ÁÙ °ÍÀÌ´Ù.
        °Ô´Ù°¡ Turing °ú °°Àº ¾ð¾î¸¦ Áö¿øÇÏ°í, Àç±Í, Á¤±Ô Ç¥Çö½Ä µîµµ Áö¿øÇÑ´Ù.
        ¿©·¯ºÐÀº CPP ·Î ÇÏÁö ¸øÇß´ø ¸ðµç °ÍÀ» M4 ¸¦ °¡Áö°í ÇÒ ¼ö ÀÖ°Ô µÉ °ÍÀÌ´Ù.
        </para><para>
        M4 gives you the full power of macroprocessing,
        with a Turing equivalent language, recursion, regular expressions, etc.
        You can do with it everything that CPP cannot.
        </para>
        <para>
        m4 ¸¦ »ç¿ëÇÑ ¸ÅÅ©·Î ÇÁ·Î±×·¡¹ÖÀÇ ¿¹Á¦¸¦ ±¸ÇÏ±â¸¦ ¿øÇÑ´Ù¸é,
        <ulink url="ftp://ftp.forth.org/pub/Forth/Compilers/native/unix/this4th.tar.gz">
        macro4th (this4th - ftp://ftp.forth.org/pub/Forth/Compilers/native/unix/this4th.tar.gz)
        </ulink> ³ª
        <ulink url="ftp://ftp.tunes.org/pub/tunes/obsolete/dist/tunes.0.0.0/tunes.0.0.0.25.src.zip">
        the Tunes 0.0.0.25 sources(ftp://ftp.tunes.org/pub/tunes/obsolete/dist/tunes.0.0.0/tunes.0.0.0.25.src.zip)
        </ulink> À» ÂüÁ¶ÇÏ±â ¹Ù¶õ´Ù.
        </para>
        <para>
        ±×·¯³ª, 
        However, its disfunctional quoting and unquoting semantics force you to use
        explicit continuation-passing tail-recursive macro style if
        you want to do <emphasis>advanced</emphasis> macro programming
        (which is remindful of TeX -- BTW, has anyone tried to use TeX as
        a macroprocessor for anything else than typesetting ?).
        This is NOT worse than CPP that does not allow quoting and recursion anyway.
        </para>

        <para>
        ±¸ÇØ¾ß ÇÒ M4 ÀÇ ¹öÁ¯Àº GNU m4 1.4 È¤Àº ±× ÀÌ»óÀÇ ¹öÁ¯ÀÌ´Ù.
        °¡Àå ¸¹Àº ±â´É°ú °¡Àå ÀûÀº ¹ö±× È¤Àº Á¦ÇÑÀ» °¡Áö°í ÀÖ´Â ¹öÁ¯ÀÌ±â ¶§¹®ÀÌ´Ù.
        m4 ´Â ¼È°èµÉ ¶§, °£ÆíÇÑ »ç¿ëÀ» ¸ñÀûÀ¸·Î ¼³°èµÇ°í, ºü¸¥ ¼Óµµ¸¦ ¸ñÇ¥·Î ÇØ¼­ 
        ¼³°èµÇÁö ¾Ê¾Ò±â ¶§¹®¿¡, ¹«¾ùÀ» ÇÏµçÁö Á».. ´À¸®´Ù.
        ±×·¯³ª, ¾î¼Àºí¸® ÇÁ·Î±×·¥À» ¸¸µé¶§¿¡´Â º° ¹®Á¦°¡ µÇÁö ¾Ê´Â´Ù.
        ¾î¼Àºí¸®·Î ¸î¹é¸¸ ¶óÀÎÀÌ³ª µÇ´Â ¾çÀ» ÄÚµùÇÒ °ÍÀÎ°¡? ±×·¸Áö ¾Ê´Ù.
        </para>
    </section>

    <section><title>¿©·¯ºÐÀÌ ¸¸µç ÇÊÅÍ¸¦ ÀÌ¿ëÇÑ ¸ÅÅ©·Î ÇÁ·Î¼¼½Ì</title>
        <para>
        ¿©·¯ºÐÀº perl ÀÌ³ª awk, sed µîÀ» °¡Áö°íµµ ¿©·¯ºÐ ÀÚ½ÅÀÇ °£´ÜÇÑ ¸ÅÅ©·Î È®Àå ÇÊÅÍ¸¦ ¸¸µé ¼ö ÀÖ´Ù.
        ¿ÀÈ÷·Á °£´ÜÇÑ °ÍÀº ÀÌ·¯ÇÑ ÅøÀ» °¡Áö°í ¸¸µå´Â °ÍÀÌ ´õ ³ªÀ»Áöµµ ¸ð¸¥´Ù.
        ±×·¯³ª. ¸ÅÅ©·Î ÇÁ·Î¼¼½ÌÀÌ¶õ ¸»Àº "the hard way(Á» ´õ Èûµç ¹æ¹ý?)" ¶ó´Â ´µ¾Ó½º¸¦ Ç³±ä´Ù.
        You can write your own simple macro-expansion filter
        with the usual tools: perl, awk, sed, etc.
        It can be made rather quickly, and you control everything.
        But, of course, power in macroprocessing implies "the hard way".
        </para>
    </section>

</section>

<section>
<?html-filename meta.html>
<title>¸ÞÅ¸ÇÁ·Î±×·¡¹Ö</Title>

    <para>
    ¸ÅÅ©·Î¸¦ È®Àå½ÃÄÑ ÁÖ´Â ¿ÜºÎÇÊÅÍ¸¦ »ç¿ëÇÏ´Â ´ë½Å »ç¿ëÇÒ ¼ö ÀÖ´Â 
    ¶Ç´Ù¸¥ ¹æ¹ýÀÌ ÀÖ´Âµ¥, ±×°ÍÀº ¿©·¯ºÐÀÇ ÇÁ·Î±×·¥ÀÇ ÀÏºÎ È¤Àº ÀüÃ¼¸¦ 
    ¸¸µé¾îÁÖ´Â ÇÁ·Î±×·¥À» Â¥´Â °ÍÀÌ´Ù.
    </para>

    <para>
    ¹«½¼ ¸»ÀÎ°í ÇÏ´Ï, ¿¹¸¦ µé¾î ¼³¸íÇØ º¸¸é, 
    ¿©·¯ºÐÀº ¼Ò½º ÄÚµå¸¦ Ãâ·ÂÇØÁÖ´Â ÇÁ·Î±×·¥À» »ç¿ëÇÒ ¼öµµ ÀÖ´Ù.
    ±×·¯ÇÑ ÇÁ·Î±×·¥ÀÇ ¿¹¸¦ µéÀÚ¸é,

    <itemizedlist>
        <listitem><para>
        »çÀÎ(sine)ÀÌ³ª ÄÚ»çÀÎ(cosine) µîÀÇ ÇÔ¼ö°ªÀÇ Å×ÀÌºíÀ» 
        Ã£¾Æ¼­ ÀûÀýÇÑ °ªÀ» »ý¼º½ÃÄÑ ÁÖ´Â ÇÁ·Î±×·¥
        </para></listitem>

        <listitem><para>
        ÀÌÁøÆÄÀÏ¿¡¼­ ¼Ò½º-Æû(source-form) À» ÃßÃâÇÏ´Â ÇÁ·Î±×·¥
        </para></listitem>
        
        <listitem><para>
        ¿©·¯ºÐÀÇ ºñÆ®¸ÊÀ» ÄÄÆÄÀÏÇØ¼­ °í¼Ó Ãâ·Â ·çÆ¾À» ¸¸µé¾îÁÖ´Â ÇÁ·Î±×·¥
        </para></listitem>
        
        <listitem><para>
            ÃÊ±âÈ­¿Í Á¾·á ÄÚµå¸¦ ¸¸µé¾îÁÖ°Å³ª, ¹®¼­¸¦ ÃßÃâÇÏ°Å³ª, ÇÏ´Â ÇÁ·Î±×·¥
            </para><para>
            to extract documentation, initialization/finalization code,
            description tables, as well as normal code from the same source files,
        </para></listitem>
        
        <listitem><para>
        ¾î¶² ÀÏÀ» ÇÏ´Â ½©ÀÌ³ª ÆÞ ÄÚµå¸¦ ¾î¼Àºí¸® ÄÚµå·Î ¹Ù²Ù¾î ÁÖ´Â ÇÁ·Î±×·¥
        </para></listitem>
        
        <listitem><para>
        ÇÑ°÷¿¡¼­ Á¤ÀÇµÈ µ¥ÀÌÅÍ¸¦ ¿©·¯°¡ÁöÀÇ »óÈ£ ÂüÁ¶ÇÏ´Â Å×ÀÌºí°ú ÄÚµå
        Ã»Å©µé·Î »ý¼º½ÃÄÑ ÁÖ´Â ÇÁ·Î±×·¥
        </para></listitem>
        
        <listitem><para>
        µîÀÌ ÀÖÀ» ¼ö ÀÖ´Ù. (¿ªÀÚÀÇ »ý°¢À¸·Î´Â yacc ³ª lex µî°ú °°Àº ÇÁ·Î±×·¥À» ÀÌ¾ß±âÇÏ´Â °Í °°´Ù
        : ¿ªÀÚÁÖ : yacc ³ª lex ¸¦ ÀÌ¿ëÇØ¼­ °£´ÜÇÑ ÄÄÆÄÀÏ·¯³ª ¾î¼Àºí·¯¸¦ ¸¸µé ¼ö ÀÖ´Ù. »ç¿ëÇÒ 
        ·©±ÍÁöÀÇ ¹®¹ýÀ» ÀÔ·ÂÇÏ¸é, ÇØ´çÇÏ´Â ÄÄÆÄÀÏ·¯°¡ »ý¼ºµÈ´Ù.)
        </para></listitem>
    </itemizedlist>
    </para>

    <para>
    ±×·¯ÇÑ ÇÁ·Î±×·¥µéÀ» ÇÑ¹ø °í·ÁÇØ º¸¶ó!
    </para>

    <section><title>ÄÄÆÄÀÏ·¯ÀÇ ¹é¿£µå·Î Á¦°øµÇ´Â ¾î¼Àºí·¯ÀÇ ÀÌ¿ë</title>
        <para>
        GCC, SML/NJ, Objective CALM, MIT-Scheme, CMUCL µî°ú °°Àº 
        ÄÄÆÄÀÏ·¯µéÀº °íÀ¯ÀÇ ¾î¼Àºí·¯ ¹é¿£µå¸¦ °®Ãß°í ÀÖ´Ù.
        ¿©·¯ºÐÀº ÀÌ·¯ÇÑ ¹é¿£µå¸¦ ÀÌ¿ëÇØ¼­ ¾î¼Àºí¸® ÄÚµå¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
        ¿©·¯ºÐÀÌ »ç¿ëÇÏ´Â ¾ð¾î¸¦ ÀÌ¿ëÇØ¼­ ¸¸µç ÇÁ·Î±×·¥À» ¾Õ¼­ ¾ð±ÞÇÑ ÄÄÆÄÀÏ·¯·Î
        ÄÄÆÄÀÏÇØ¼­ ÈÇ¸¢ÇÑ ¾î¼Àºí¸® ÄÚµå¸¦ ¾òÀ» ¼ö ÀÖ°í,
        ±× ÄÚµå¸¦ ¿©·¯ºÐÀÌ ´õ ³´°Ô ¼öÁ¤ÇØ¼­ ¸¶À½¿¡ µå´Â ¾î¼Àºí¸® ÄÚµå¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
        </para>
    </section>

    <section><title>´ºÀúÁö ¸Ó½Å-ÄÚµå ÅøÅ¶</title>
        <para>
        ÇÁ·Î±×·¡¹Ö ¾ð¾î¶ó´Â ¾ÆÀÌÄÜÀ» »ç¿ëÇØ¼­ ±â°è¾î¸¦ ´Ù·ç´Â ÅøÅ¶ÀÇ 
        °³¹ß°ú °ü·ÃµÈ ÇÁ·ÎÁ§Æ®°¡ ÀÖ´Ù(½ÇÇèÀûÀÎ ML ¹öÁ¯µµ Á¦°øÇÑ´Ù)
        <ulink url="http://www.eecs.harvard.edu/~nr/toolkit/">
        http://www.eecs.harvard.edu/~nr/toolkit/</ulink>À»
        ÇÑ¹ø µÑ·¯º¸¶ó
        </para>
    </section>

    <section><title>TUNES ÇÁ·ÎÁ§Æ®</title>
        <para>
        Free Reflective Computing System À» À§ÇÑ
        <ulink url="http://www.tunes.org">TUNES Project(http://www.tunes.org)</ulink>
        ¿¡¼­µµ ÀÚÃ¼ÀûÀÎ ¾î¼Àºí·¯¸¦ Scheme ¾ð¾îÀÇ È®ÀåÀ¸·Î °³¹ßÇÏ°í ÀÖ´Ù.
        ¾ÆÁ÷ Á¦´ë·Î ½ÇÇàµÇ´Â °ÍÀº ¾Æ´ÏÁö¸¸ ¸»ÀÌ´Ù.
        </para>
        <para>
        tunes ÇÁ·ÎÁ§Æ®¿¡¼­ °³¹ßÁßÀÎ ¾î¼Àºí·¯´Â abstract syntax Æ®¸®¸¦ ´Ù·ç´Âµ¥,
        ±×·¸°Ô ÇÏ¿©, µð½º¾î¼Àºí·¯·Îµµ, ¾î¼Àºí·¯ ¹®¹ý ¹ø¿ª±â·Îµµ, ÄÄÆÄÀÏ·¯³ª 
        ¾î¼Àºí·¯µéÀÇ °øÅëÀûÀÎ ¹é¿£µå·Îµµ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ÇÏ°í ÀÖ´Ù.
        ¶ÇÇÑ, Scheme ÀÌ¶ó´Â ¾ð¾îÀÇ °­·ÂÇÔÀº ¸ÅÅ©·Î ÇÁ·Î¼¼½ÌÀÌ³ª ¸ÞÅ¸ ÇÁ·Î±×·¡¹ÖÃ³·³ 
        µµÀüÇÒ ¸¸ÇÑ ºÐ¾ßÀÌ´Ù.(?)
        </para><para>
        The assembler manipulates abstract syntax trees,
        so it could equally serve as the basis for a assembly syntax translator,
        a disassembler, a common assembler/compiler back-end, etc.
        Also, the full power of a real language, Scheme,
        make it unchallenged as for macroprocessing/metaprogramming.
        </para>
    </section>
</section>
</chapter>


<chapter id="s-call" xreflabel="Calling conventions">
<?html-filename conventions.html>
<title>ÇÔ¼ö È£Ãâ ±ÔÄ¢</title>

<section>
<?html-filename linux.html>
<title>Linux</title>

<section><title>GCC ·ÎÀÇ ¸µÅ· : Linking to GCC</title>

<para>
    ¸¸¾à ¿©·¯ºÐÀÌ C ¿Í ¾î¼Àºí¸®°¡ È¥ÇÕµÈ ÇÁ·ÎÁ§Æ®¸¦ ¼öÇàÇÏ°í ÀÖ´Ù¸é,
    Áö±Ý ¼Ò°³ÇÏ°íÀÚ ÇÏ´Â ¹æ¹ýÀ» ÃßÃµÇÏ°íÀÚ ÇÑ´Ù.
    ¸®´ª½º Ä¿³Î¿¡¼­ <filename>.S</filename> ÀÇ È®ÀåÀÚ¸¦ °¡Áø ÆÄÀÏµé Áß¿¡¼­,
    gas °¡ Ã³¸®ÇÏ´Â (as86 ÀÌ Ã³¸®ÇÏ´Â ÆÄÀÏÀÌ ¾Æ´Ô!) ÆÄÀÏµéÀ» ÅëÇØ¼­
    À¯¿ëÇÑ ¿¹Á¦¸¦ ¹ß°ßÇÒ ¼ö ÀÖ´Ù.
</para>

<para>
    32ºñÆ®ÀÇ argument µéÀº ½ºÅÃ¿¡ Çª½ÃµÉ ¶§, 
    32ºñÆ®ÀÇ ±Ù°Å¸® ¹ÝÈ¯ ÁÖ¼Ò (32-bit near return address) ÀÇ
    À­ºÎºÐ¿¡ ¿ª¼øÀ¸·Î Çª½ÃµÇ¾îÁø´Ù. 
    µû¶ó¼­, ±×°ÍµéÀÌ pop µÉ ¶§¿¡´Â ¿Ã¹Ù¸¥ ¼ø¼­·Î pop µÇ¾îÁø´Ù.
    <literal>%ebp</literal>,
    <literal>%esi</literal>,
    <literal>%edi</literal>,
    <literal>%ebx</literal>
    ·¹Áö½ºÅÍµéÀº ÇÇÈ£ÃâÀÚ°¡ ÀúÀåÇÏ°Ô µÇ°í, ´Ù¸¥ ·¹Áö½ºÅÍµéÀº 
    È£ÃâÀÚ°¡ ÀúÀåÇÏ°Ô µÈ´Ù.
    <literal>%eax</literal> ´Â °á°ú°¡ 32ºñÆ® ÀÏ¶§ °á°ú¸¦ ÀúÀåÇÏ´Â ¿ëµµ·Î
    »ç¿ëµÇ¾îÁö°í, ¸¸¾à, °á°ú°¡ 64ºñÆ®¶ó¸é, ±×¶§´Â <literal>%edx:%eax</literal> ·¹Áö½ºÅÍ
    ½ÖÀÌ °á°ú¸¦ ÀúÀåÇÏ´Âµ¥ »ç¿ëµÈ´Ù.
</para>

<para>
    FP stack ¿¡ ´ëÇØ¼­´Â È®½ÇÇØ Àß ¸ð¸£°ÚÁö¸¸, ÀúÀÚ´Â °á°ú°¡
    <literal>st(0)</literal> ¿¡ ÀúÀåµÇ°í, ½ºÅÃ ÀüÃ¼°¡ È£ÃâÀÚ°¡ ÀúÀåÇÏ´Â ¿ëµµ·Î ¾²ÀÎ´Ù°í »ý°¢ÇÑ´Ù.    
</para>

<para>
    GCC °¡ ·¹Áö½ºÅÍµéÀÇ ¿ëµµ¸¦ ¹Ì¸® ÁöÁ¤ÇØ¼­ À§¿¡¼­ ¼³¸íÇÑ È£Ãâ ±ÔÄ¢À» ¼öÁ¤ÇÏ´Â 
    ¿É¼ÇÀ» °¡Áö°í ÀÖ´Ù´Â °ÍÀ» ÀØÁö ¾Êµµ·Ï ÇÏ¶ó.
    ÀÚ¼¼ÇÑ ³»¿ëÀº i386 <filename>.info</filename> ÆäÀÌÁö¸¦ ÂüÁ¶ÇÏ¶ó.
</para>

<para>
	¿©·¯ºÐÀº GCC ÀÇ Ç¥ÁØ ÇÔ¼ö È£Ãâ ±ÔÄ¢À» µû¸£´Â ÇÔ¼ö¸¦
	À§ÇØ¼­ <literal>cdecl</literal> ÀÌ³ª <literal>regparm(0)</literal>
	attribute ¸¦ ¼±¾ðÇØ¾ß¸¸ ÇÑ´Ù´Â °ÍÀ» ±â¾ïÇÏ¶ó.
	GCC info ÆäÀÌÁöÀÇ <literal>C Extensions::Extended Asm::</literal> ¼½¼ÇÀ»
	ÂüÁ¶ÇÏ¶ó. ¶ÇÇÑ, Linux °¡ <literal>asmlinkage</literal> ¸ÅÅ©·Î¸¦
	¾î¶»°Ô Á¤ÀÇÇÏ°í ÀÖ´ÂÁöµµ ÂüÁ¶ÇÏ¶ó.
</para>
</section>

<section><title>ELF ¿Í a.out ¹®Á¦</title>

<para>
	¸î¸î C ÄÄÆÄÀÏ·¯µéÀº ¹ØÁÙ ¹®ÀÚ¸¦ ´Ù¸¥ ½Éº¼µé º¸´Ù ¸ÕÀú È®ÀåÇÑ´Ù.
	´Ù¸¥ ÄÄÆÄÀÏ·¯´Â ±×·¸°Ô ÇÏÁö ¾ÊÁö¸¸ (¿ªÀÚ ÁÖ : ¿ø¹®ÀÇ ³»¿ëÀº 
	Some C compilers prepend an underscore before every symbol, while others do not. ÀÔ´Ï´Ù)
</para>

<para>
	Linux ÀÇ a.out GCC ´Â ±×·¯ÇÑ È®ÀåÀ» ÇÑ´Ù. ±×·¸Áö¸¸,
	ELF GCC ´Â ÇÏÁö ¾Ê´Â´Ù.
</para>

<para>
	¿©·¯ºÐÀÌ ±×·¯ÇÑ Æ¯¼ºÀ» ±Øº¹ÇÒ ÇÊ¿ä°¡ ÀÖ´Ù¸é, ÇöÁ¸ÇÏ´Â
	ÆÐÅ°ÁöµéÀº ¾î¶»°Ô ÇÏ´ÂÁö¸¦ ÂüÁ¶ÇÏ¶ó. ¿¹¸¦ µé¾î,
	¿À·¡µÈ ¸®´ª½ºÀÇ ¼Ò½ºÆ®¸®³ª, È¤Àº Elk, qthreads, OCaml µî°ú °°Àº
	ÆÐÅ°Áö¸¦ ±¸ÇØ¼­ »ìÆìº¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
</para>

<para>
	¿©·¯ºÐÀº ¶ÇÇÑ, ´ÙÀ½°ú °°Àº ¹®ÀåÀ» »ðÀÔÇÔÀ¸·Î½á 
	ÇÔÃàµÈ(implicit) C -> asm ÀÇ renaming ±ÔÄ¢À»
	override ÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù.

<programlisting>
	void foo asm("bar") (void);
</programlisting>

	±×·¸°Ô ÇÏ¸é, <function>foo()</function> C ÇÔ¼ö´Â
	½ÇÁ¦·Î ¾î¼Àºí¸®¿¡¼­´Â <function>bar</function> ÀÌ¶ó°í ºÒ¸®¿ì°Ô
	µÉ °ÍÀÌ´Ù.
</para>

<para>
	binutils ÆÐÅ°ÁöÀÇ <command>objcopy</command> À¯Æ¿¸®Æ¼°¡ 
	¿©·¯ºÐÀÇ a.out ¿ÀºêÁ§Æ®¸¦ ELF Çü½ÄÀÇ ¿ÀºêÁ§Æ® ÆÄÀÏ·Î º¯È¯ÇØ ÁÙ ¼ö 
	ÀÖÀ½À» ÁÖ¸ñÇÏ¶ó. ±×¸®°í, ±× ¹Ý´ëÀÇ ÀÏµµ °¡´ÉÇÒ °ÍÀÌ´Ù.
	º¸´Ù ÀÏ¹ÝÀûÀ¸·Î ÀÌ¾ß±âÇÏÀÚ¸é, ±× À¯Æ¿¸®Æ¼´Â 
	´õ ¸¹Àº ÇüÅÂÀÇ ÆÄÀÏ Çü½Ä º¯È¯µµ ÇØ ÁÙ °ÍÀÌ´Ù.
</para>

</section>

<section><title>Direct Linux syscalls</title>

<para>
	¿©·¯ºÐÀº Á¾Á¾ 
	<application>C library</application> (<acronym>libc</acronym>)
	¸¦ »ç¿ëÇÏ´Â °ÍÀÌ À¯ÀÏÇÑ ¹æ¹ýÀÌ¸ç, Á÷Á¢ÀûÀÎ ½Ã½ºÅÛ ÄÝÀº º°·Î
	ÁÁÁö ¾Ê´Ù´Â ¸»À» µéÀ» °ÍÀÌ´Ù.
	ÀÌ°ÍÀº »ç½ÇÀÌ´Ù. 
	±×·¯³ª ÀÏ¹ÝÀûÀ¸·Î ¿©·¯ºÐÀº <application>libc</application> °¡
	½Å¼º½ÃµÇ°í ÀÖÁö ¾Ê´Ù´Â °Í°ú, <emphasis>´ëºÎºÐÀÇ</emphasis> °æ¿ì
	libc ´Â ¸î°¡Áö Ã¼Å©¸¸ ÇÏ°í, Ä¿³ÎÀ» È£ÃâÇÑ ÈÄ, errno º¯¼ö¸¦¼¼ÆÃÇÒ »ÓÀÌ¶ó´Â °ÍÀ»
	¾Ë¾Æ¾ß ÇÑ´Ù.
	¿©·¯ºÐÀº ¿©·¯ºÐÀÇ ÇÁ·Î±×·¥¿¡¼­µµ ÀÌ¿Í °°Àº °ÍÀ» ½±°Ô ÇÒ ¼ö ÀÖ´Ù (¸¸¾à
	¿©·¯ºÐÀÌ ±×°ÍÀ» ÇÊ¿ä·Î ÇÑ´Ù¸é). ±×¸®°í ¿©·¯ºÐÀÌ 
	°øÀ¯ ¶óÀÌºê·¯¸®¸¦ »ç¿ëÇÏÁö ¾Ê´Â´Ù´Â ÀÌÀ¯¸¸À¸·Îµµ 
	¿©·¯ºÐÀÇ ÇÁ·Î±×·¥Àº ¸î½Ê¹è ´õ
	Å©±â°¡ ÁÙ¾îµé °ÍÀÌ¸ç, ¼öÇà¼º´É ¶ÇÇÑ ´õ ÁÁ¾ÆÁú °ÍÀÌ´Ù. 
	<application>libc</application> À» ¾î¼Àºí¸® ÇÁ·Î±×·¡¹Ö¿¡¼­
	»ç¿ëÇÏ°Å³ª ÇÏÁö ¾Ê°Å³ª ÇÏ´Â ¹®Á¦´Â ½Ç¿ëÀûÀÎ ¹®Á¦¶ó±â º¸´Ù´Â 
	±âÈ£³ª ½Å³ä¿¡ °üÇÑ ¹®Á¦ÀÌ´Ù.
	Linux ´Â POSIX È£È¯À» ¸ñÇ¥·Î ÇÏ°í ÀÖ´Ù´Â °ÍÀ» ±â¾ïÇÏ¶ó. ±×¸®°í,
	<application>libc</application> ´Â ±×·¯ÇÑ ¸ñÇ¥¸¦ ¸¸Á·ÇÑ´Ù.
	ÀÌ°ÍÀº <application>libc</application> system call ÀÇ °ÅÀÇ ¸ðµç ¹®¹ýÀÌ
	Ä¿³ÎÀÇ ½Ã½ºÅÛ ÄÝÀÇ ½ÇÁ¦ ¹®¹ý°ú Á¤È®È÷ ÀÏÄ¡ÇÑ´Ù´Â ¶æÀÌ´Ù.
	±×·¯³ª 
	<application>GNU libc</application>(<application>glibc</application>)
	´Â ¹öÁ¯¾÷ÀÌ µÇ¾î °¥¼ö·Ï ´õ ´À·ÁÁö°í ÀÖ´Ù. ¶ÇÇÑ ¸Þ¸ð¸®µµ ´õ ¸¹ÀÌ 
	Àâ¾Æ¸Ô¾î °¡°í ÀÖ´Ù. ±×·¡¼­ Á÷Á¢ÀûÀÎ ½Ã½ºÅÛ ÄÝÀÌ ²Ï³ª ½Ç¿ëÀûÀÎ °ÍÀÌ
	µÇ¾î°¡°í ÀÖ´Ù.
	±×·¸Áö¸¸... <application>libc</application> ¸¦ »ç¿ëÇÏÁö ¾ÊÀ½À¸·Î½á
	»ý±â´Â ÁÖµÈ ºÎÀÛ¿ë(?, drawback) Àº ¾Æ¸¶µµ ¿©·¯ºÐÀÌ
	¸î¸îÀÇ <application>libc</application> ÀÇ Æ¯Á¤ ÇÔ¼öµé(½Ã½ºÅÛ ÄÝ wrapper °¡ 
	¾Æ´Ñ)À» Á÷Á¢ ±¸ÇöÇÒ ÇÊ¿ä°¡ »ý±æÁöµµ ¸ð¸¥´Ù´Â °ÍÀÌ´Ù. 
	(ÀÌ¸¦Å×¸é, <function>printf()</function> °ú °°Àº...) ±×¸®°í, ¿©·¯ºÐÀÌ
	<application>libc</application> ¸¦ »ç¿ëÇÏÁö ¾Ê±â·Î °áÁ¤Çß´Ù¸é,
	´ç¿¬È÷ ¿©·¯ºÐÀº ±×·¸°Ô ÇÒ °¢¿À(?)°¡ µÇ¾î ÀÖ´Â °ÍÀÌ´Ù. ±×·¸Áö ¾ÊÀº°¡?
</para>

<para>
	¿©±â¿¡ Á÷Á¢ÀûÀÎ ½Ã½ºÅÛ ÄÝÀ» ÇÏ´Â °ÍÀÇ µæ°ú ½ÇÀÌ ³ª¿­µÇ¾î ÀÖ´Ù :
</para>

<para>
ÀÌµæ:

<itemizedlist>
<listitem><para>
	°¡´ÉÇÑÇÑ ÄÚµåÀÇ Å©±â¸¦ ÁÙÀÏ ¼ö ÀÖ´Ù
</para></listitem>
<listitem><para>
	°¡´ÉÇÑ ÃÖ´ëÀÇ ¼Óµµ¸¦ ³¾ ¼ö ÀÖ´Ù.
</para></listitem>
<listitem><para>
	¿©·¯ºÐÀÇ ÇÁ·Î±×·¥ÀÌ³ª ¶óÀÌºê·¯¸®¸¦ ¿©·¯ºÐÀÌ »ç¿ëÇÏ´Â Æ¯Á¤ ¾ð¾î³ª
	¸Þ¸ð¸® ¿ä±¸»çÇ× µî ¾î¶² °Í¿¡µµ Àû¿ëÇÒ ¼ö ÀÖ´Ù. Áï, full control À»
	¾òÀ» ¼ö ÀÖ´Ù.
</para></listitem>
<listitem><para>
	libc cruft ¿¡ ÀÇÇÑ °øÇØ°¡ ¾ø´Ù(? ¿ø¹® : no pollution by libc cruft)
</para></listitem>
<listitem><para>
	C ÀÇ ÇÔ¼ö È£Ãâ ±ÔÄ¢À¸·Î ÀÎÇÑ °øÇØ°¡ ¾ø´Ù (¿ø¹® : no pollution by C calling conventions)
	(¸¸¾à ¿©·¯ºÐÀÌ ¿©·¯ºÐ ÀÚ½ÅÀÇ ¾ð¾î³ª È¤Àº È¯°æÀ» °³¹ßÇÏ°í ÀÖ´Ù¸é)
</para></listitem>
<listitem><para>
	Á¤Àû ¹ÙÀÌ³Ê¸®µéÀº ¿©·¯ºÐÀ» libc ¾÷±×·¹ÀÌµå³ª Å©·¡½¬¿Í ¹«°üÇÏ°Ô
	ÇØ ÁÙ °ÍÀÌ´Ù. È¤Àº, ½©ÀÇ <literal>#!</literal> ÀÎÅÍÇÁ¸®ÅÍ ÆÐ½º¿Íµµ
	¹«°üÇÏ°Ô ÇØ ÁÙ °ÍÀÌ´Ù.</para>
	<para> ¿ø¹® :
	static binaries make you independent from libc upgrades or crashes,
	or from dangling <literal>#!</literal> path to an interpreter
	(and are faster)
</para></listitem>
<listitem><para>
	Àç¹ÌÀÖ´Ù. (¿ø¹® : just for the fun out of it
(don't you get a kick out of assembly programming?)
</para></listitem>
</itemizedlist>

</para>

<para>
¼ÕÇØ:

<itemizedlist>
<listitem><para>
	¸¸¾à ¿©·¯ºÐÀÇ ÄÄÇ»ÅÍÀÇ ´Ù¸¥ ÇÁ·Î±×·¥ Áß libc ¸¦ »ç¿ëÇÏ´Â
	ÇÁ·Î±×·¥ÀÌ ÀÖ´Ù¸é, libc ÀÇ ÄÚµå¸¦ µÎ°³¾¿ÀÌ³ª °¡Áö´Â ÀÏÀº
	¿©·¯ºÐÀÇ ¸Þ¸ð¸®¸¦ ³¶ºñÇÒ »ÓÀÌ´Ù.
</para></listitem>
<listitem><para>
	¿©·¯ Á¤Àû ¹ÙÀÌ³Ê¸®¿¡¼­ ºÒÇÊ¿äÇÏ°Ô ±¸ÇöµÈ ¼­ºñ½ºµé ¿ª½Ã
	¸Þ¸ð¸®ÀÇ ³¶ºñÀÏ µû¸§ÀÌ´Ù. ±×·¯³ª ¿©·¯ºÐÀÈ ¿©·¯ºÐÀÇ libc ´ëÃ¼Ç°À»
	¸¸µé¾î¼­ °øÀ¯ ¶óÀÌºê·¯¸®·Î »ç¿ëÇÒ ¼ö ÀÖ´Ù.
</para></listitem>
<listitem><para>
	¸ðµç°ÍÀ» ¾î¼Àºí¸®·Î ¸¸µå´Â °Í ´ë½Å,
	¹ÙÀÌÆ®ÄÚµå³ª ¿öµåÄÚµå È¤Àº, structure interpreter ¿Í °°Àº °ÍÀ»
	»ç¿ëÇÔÀ¸·Î½á ÄÚµåÀÇ Å©±â°¡ °ý¸ñÇÒ ¸¸Å­ ÁÙ¾îµé °ÍÀÌ´Ù.
	(ÀÎÅÍÇÁ¸®ÅÍ ÀÚÃ¼´Â C ·Î ¸¸µéµç, ¾î¼Àºí¸®·Î ¸¸µéµç »ó°ü ¾ø´Ù.)
	¿©·¯°³ÀÇ ¹ÙÀÌ³Ê¸®µéÀ» ÀÛ°Ô À¯ÁöÇÏ´Â ÃÖ»óÀÇ ¹æ¹ýÀº, ¿©·¯°³ÀÇ 
	¹ÙÀÌ³Ê¸® ÆÄÀÏÀ» À¯ÁöÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó, <literal>#!</literal> µî°ú
	°°Àº ½© ÀÎÅÍÇÁ¸®ÅÍ¸¦ »ç¿ëÇØ¼­ ÀÎÅÍÇÁ¸®ÅÍ ÇÁ·Î¼¼½º¸¦ ÇÏ³ª
	¸¶·ÃÇÏ´Â °ÍÀÌ´Ù.
	ÀÌ·¯ÇÑ ¹æ¹ýÀ¸·Î OCaml Àº ¿öµåÄÚµå ¸ðµå
	(ÃÖÀûÈ­µÈ native code mode ¿Í ¹Ý´ë¸») ¿¡¼­ µ¿ÀÛÇÑ´Ù.
	¶ÇÇÑ, ±×·¸°Ô ÇÏ´Â °ÍÀº libc ¸¦ »ç¿ëÇÏ´Â °Í°úµµ È£È¯¼ºÀÌ ÀÖ´Ù.
	ÀÌ ¹æ¹ýÀº Tom Christiansen ÀÌ 
	<ulink URL="http://language.perl.com/ppt/">Perl PowerTools</ulink>
	¿¡¼­ À¯´Ð½º À¯Æ¿¸®Æ¼µéÀ» »õ·Î ±¸ÇöÇÑ ¹æ¹ýÀÌ´Ù.
	¸¶Áö¸·À¸·Î, ÇÏµåÄÚµåµÈ °æ·Î¿¡ ÀÇÇÑ 
	¿ÜºÎ ÆÄÀÏ¿¡ ÀÇÁ¸ÇÏÁö ¾Ê°í¼­ ÄÚµåÀÇ Å©±â¸¦ ÁÙÀÌ´Â ¹æ¹ýÀ¸·Î,
	´ÜÁö ÇÏ³ªÀÇ ¹ÙÀÌ³Ê¸® ÆÄÀÏ¸¸ À¯ÁöÇÏ°í, ±× ÆÄÀÏ¿¡ ´ëÇÑ ¿©·¯°¡Áö 
	ÀÌ¸§ÀÇ hard È¤Àº soft ¸µÅ©¸¦ À¯ÁöÇÏ´Â ¹æ¹ýÀÌ ÀÖ´Ù :
	µ¿ÀÏÇÑ ¹ÙÀÌ³Ê¸® ÆÄÀÏÀº ÃÖÀûÀÇ °ø°£¿¡¼­ ¿©·¯ºÐÀÌ ¿øÇÏ´Â ¸ðµç°ÍÀ»
	Á¦°øÇÒ °ÍÀÌ¸ç, ±×°Í¿¡´Â ºÒÇÊ¿äÇÑ ¼­ºê·çÆ¾ÀÌ³ª È¤Àº ÇÊ¿ä¾ø´Â
	¹ÙÀÌ³Ê¸® Çì´õµµ ¾øÀ» °ÍÀÌ´Ù. ¹ÙÀÌ³Ê¸®´Â <parameter>argv[0]</parameter>
	¿¡ ÀÇÇØ¼­¸¸ Çàµ¿À» °áÁ¤ÇÒ °ÍÀÌ´Ù. Æ¯Á¤ ÀÌ¸§À¸·Î È£ÃâµÇÁö ¾ÊÀº °æ¿ì¿¡´Â
	µðÆúÆ®·Î ½©ÀÌ µÉ ¼öµµ ÀÖÀ¸¸ç, ¾Æ¸¶µµ ÀÎÅÍÇÁ¸®ÅÍ·Î µ¿ÀÛÇÏÁö ¾ÊÀ»¼öµµ
	ÀÖ´Ù. 
</para>
<para>
	(¿ø¹®À» ÇÔ²² °³Á¦ÇÕ´Ï´Ù :
	Finally, one last way to keep things small,
	that doesn't depend on an external file with a hardcoded path,
	be it library or interpreter,
	is to have only one binary,
	and have multiply-named hard or soft links to it:
	the same binary will provide everything you need in an optimal space,
	with no redundancy of subroutines or useless binary headers;
	it will dispatch its specific behavior
	according to its <parameter>argv[0]</parameter>;
	in case it isn't called with a recognized name,
	it might default to a shell,
	and be possibly thus also usable as an interpreter!
</para></listitem>
<listitem><para>
	¿©·¯ºÐÀº ¸®´ª½º ½Ã½ºÅÛ ÄÝ ÀÌ¿Ü¿¡µµ libc °¡ Á¦°øÇÏ´Â ¸¹Àº
	±â´ÉµéÀ» À¯¿ëÇÏ°Ô »ç¿ëÇÒ ¼ö ¾ø´Ù :
	Áï, ¸ÇÆäÀÌÁö ¼½¼Ç 3 ¿¡ ³ª¿À´Â ¿©·¯°¡Áö ±â´Éµé,
	ÀÌ¸¦Å×¸é, malloc, threads, locale, password,
	high-level network management µî°ú °°Àº °ÍÀ» »ç¿ëÇÒ ¼ö 
	¾ø´Ù´Â ÀÌ¾ß±âÀÌ´Ù.
</para></listitem>
<listitem><para>
	µû¶ó¼­, ¿©·¯ºÐÀº libc ÀÇ ´ëºÎºÐÀ» »õ·Î ±¸ÇöÇØ¾ß ÇÒÁöµµ
	¸ð¸£´Ù. Áï, 
	<function>printf()</function> ·ÎºÎÅÍ 
	<function>malloc()</function> °ú 
	<function>gethostbyname</function> ±îÁöµµ Á÷Á¢ ±¸ÇöÇØ¾ß ÇÒ °ÍÀÌ´Ù.
	±×·¸°Ô ÇÏ´Â °ÍÀº ºÒÇÊ¿äÇÑ ÀÏÀÌ¸ç, ¶§¶§·Î ¸Å¿ì Áö·çÇÑ ÀÛ¾÷ÀÌ µÉ 
	¼öµµ ÀÖ´Ù. ¸î¸î »ç¶÷µéÀÌ ¹ú½á "light" ¹öÁ¯ÀÇ libc ¸¦ ±¸ÇöÇØ
	µÎ¾ú´Ù´Â °Í¿¡ ÁÖ¸ñÇÏ°í, ±×·¯ÇÑ ÀÛ¾÷ÀÇ °á°ú¹°À» Ã¼Å©ÇØ º¸µµ·Ï ÇÏ¶ó.
	(·¹µåÇÞÀÇ minilibc :
	Rick Hohensee's 
	<ulink url="ftp://linux01.gwdg.de/pub/cLIeNUX/interim/libsys.tgz">libsys</ulink>,
	Felix von Leitner's 
	<ulink url="http://www.fefe.de/dietlibc/">dietlibc</ulink>,
	Christian Fowelin's 
	<ulink url="http://www.fowelin.de/christian/computer.linux.assembly.libASM.html">libASM</ulink>,
	<ulink url="http://linuxassembly.org/asmutils.html">asmutils</ulink>
	ÀÌ ÇÁ·ÎÁ§Æ®´Â ¼ø¼ö ¾î¼Àºí¸® libc ¸¦ °¡Áö°í ÀÛ¾÷ÇÏ°í ÀÖ´Ù.)
</para></listitem>
<listitem><para>
	Á¤Àû ¶óÀÌºê·¯¸®¸¦ »ç¿ëÇÏ¸é ¿©·¯ºÐÀº libc ¾÷±×·¹ÀÌµå³ª zlibc ÆÐÅ°Áö
	(gzip À¸·Î ¾ÐÃàµÈ ÆÄÀÏµé¿¡ ´ëÇØ¼­ Åõ¸íÇÑ ¾ÐÃàÇ®±â¸¦ ¼öÇàÇØ ÁÖ´Â)
	¿Í °°Àº libc add-on 
	µé·ÎºÎÅÍ ÀÌµæÀ» ¾òÀ» ¼ö ¾ø°Ô µË´Ï´Ù. 
</para></listitem>
<listitem><para>
	libc ¿¡ ÀÇÇØ¼­ Ãß°¡µÈ ¸î¸î ÀÎ½ºÆ®·°¼ÇÀº ½Ã½ºÅÛ ÄÝ°ú ºñ±³ÇØ¼­
	<emphasis>¹Ï±âÁö ¾ÊÀ»¸¸Å­</emphasis> ÀûÀº ¼ÓµµÀÇ ¿À¹öÇìµå¸¦
	°¡Áø´Ù. ¸¸¾à ¼öÇà¼Óµµ°¡ Áß¿äÇÑ ¹®Á¦¶ó¸é, ¿©·¯ºÐÀÇ ÁÖµÈ ¹®Á¦´Â
	¿©·¯ºÐÀÌ ½Ã½ºÅÛ ÄÝÀ» »ç¿ëÇÏ´Âµ¥ ÀÖÀ» °ÍÀÌ¸ç, ¿©·¯ºÐÀÌ »ç¿ëÇÏ´Â
	wrapper °¡ ±¸ÇöµÈ ¹æ½Ä¿¡´Â ¹®Á¦°¡ ¾øÀ» °ÍÀÌ´Ù.
</para></listitem>
<listitem><para>
	L4Linux ¿Í °°Àº micro-kernel ¸®´ª½º ¹öÁ¯À» »ç¿ëÇÒ ¶§¿¡´Â ½Ã½ºÅÛ ÄÝÀÇ
	Ç¥ÁØ ¾î¼Àºí¸® API ¸¦ »ç¿ëÇÏ´Â °ÍÀÌ libc ÀÇ API ¸¦ »ç¿ëÇÏ´Â °Í º¸´Ù
	ÈÎ¾À ´À¸± ¼ö ÀÖ´Ù. ±×·¯ÇÑ ¸¶ÀÌÅ©·Î Ä¿³Î ¸®´ª½º ¹öÁ¯Àº ÀÚ½Å¸¸ÀÇ
	º¸´Ù ºü¸¥ È£Ãâ ±ÔÄ¢À» °¡Áö°í ÀÖÀ¸¸ç, Ç¥ÁØ È£Ãâ ±ÔÄ¢À» »ç¿ëÇÏ´Â °æ¿ì
	¸Å¿ì ³ôÀº convention translation (È£Ãâ ±ÔÄ¢ º¯È¯) ¿À¹öÇìµå°¡
	°É¸± ¼ö ÀÖ´Ù. (L4Linux ´Â ±×¿¡ ¸Â´Â syscall API ¸¦ ÀÌ¿ëÇØ¼­
	ÀçÄÄÆÄÀÏµÈ libc ¿Í ÇÔ²² Á¦°øµÈ´Ù : ¹°·Ð, ¿©·¯ºÐÀº ¿©·¯ºÐÀÇ ÄÚµå¸¦ 
	Á¦°øµÈ API ¸¦ ÀÌ¿ëÇØ¼­ ´Ù½Ã ÄÄÆÄÀÏ ÇØ¾ß ÇÒÁöµµ ¸ð¸¥´Ù)
</para></listitem>
<listitem><para>
	¾Õ¼­ ´Ù·ç¾ú´ø ÀÏ¹ÝÀûÀÎ ¼Óµµ ÃÖÀûÈ­¿¡ ´ëÇÑ ÅäÀÇ¸¦ ÂüÁ¶ÇÏ¶ó.
</para></listitem>
<listitem><para>
	¸¸¾à¿¡ ½Ã½ºÅÛ ÄÝÀÌ ¿©·¯ºÐÀÌ º¸±â¿¡ ³Ê¹« ´À·Á º¸ÀÎ´Ù¸é, ¿©·¯ºÐÀº
	userland ¿¡ ¸Ó¹°±âº¸´Ù´Â Ä¿³Î ¼Ò½º¸¦ Á÷Á¢ ÇØÅ·ÇØ¼­ ¿øÇÏ´Â °á°ú¸¦
	¾òÀ» ¼ö ÀÖ´Ù.
</para></listitem>
</itemizedlist>

</para>

<para>
	¸¸¾à ¿©·¯ºÐÀÌ ¹æ±Ý ¾ð±ÞÇÑ µæ½ÇµéÀ» ½É»ç¼÷°í ÇßÀ¸¸ç,
	±×·¡µµ ¿©ÀüÈ÷ direct ½Ã½ºÅÛ ÄÝÀ» »ç¿ëÇÏ±â¸¦ ¿øÇÑ´Ù¸é,
	¾Æ·¡¿¡ ¸î°¡Áö Á¶¾ðÀ» Ã·ºÎÇØ ÁÖ°Ú´Ù :
</para>

<para>

<itemizedlist>
<listitem><para>
	¿©·¯ºÐÀº ¿©·¯ºÐÀÇ ½Ã½ºÅÛ ÄÝ ÇÔ¼öµéÀ» <filename>asm/unistd.h</filename> À»
	include ÇÏ°í, Á¦°øµÈ ¸ÅÅ©·ÎµéÀ» »ç¿ëÇÔÀ¸·Î½á C ·Î 
	Æ÷ÅÍºíÇÏ°Ô(¾î¼Àºí¸®¸¦ »ç¿ëÇÑ Æ÷ÅÍºíÇÏÁö ¾ÊÀº ÇüÅÂ¿Í ¹Ý´ëµÇ´Â) 
	±¸ÇöÇÒ ¼ö ÀÖ´Ù. 
</para></listitem>
<listitem><para>
	¿©·¯ºÐÀÌ ±×°ÍÀ» ´ëÃ¼ÇÏ·Á°í ÇÏ±â ¶§¹®¿¡, libc ¼Ò½º ÄÚµå¸¦
	±¸ÇØ¼­, ±×°ÍÀ» ÇØÅ·ÇØ º¸¶ó (and grok them) (±×¸®°í, ¸¸¾à ¿©·¯ºÐÀÌ
	´õ Àß ÇÒ ¼ö ÀÖ´Ù°í »ý°¢ÇÑ´Ù¸é, libc ÀúÀÚµé¿¡°Ô ÇÇµå¹éÀ» 
	ÇÒ ¼ö ÀÖµµ·Ï ÇÏ¶ó!)
</para></listitem>
<listitem><para>
	¿©·¯ºÐÀÌ ¿øÇÏ´Â ¸ðµç°ÍÀ» ÇØ ÁÖ´Â ¼ø¼ö ¾î¼Àºí¸® ÄÚµåÀÇ ¿¹Á¦·Î½á,
	ÀÌ ¹®¼­ÀÇ µÞºÎºÐ¿¡ ³ª¿À´Â ¸®¼Ò½º ¸ñ·ÏÀ» ÂüÁ¶ÇÏ¶ó.<xref linkend="s-res">.
</para></listitem>
</itemizedlist>

</para>

<para>
	±âº»ÀûÀ¸·Î, ½Ã½ºÅÛ ÄÝÀº <function>int 0x80</function> ÀÎ½ºÆ®·°¼ÇÀ»
	<literal>__NR_</literal> ½Ã½ºÅÛ ÄÝ ¹øÈ£ ¸¦
	(<filename>asm/unistd.h</filename> ÆÄÀÏ·ÎºÎÅÍ.) 
	<literal>eax</literal> ·¹Áö½ºÅÍ¿¡ ³Ö°í, ÆÄ¶ó¹ÌÅÍµé
	(<link linkend="six-arg">six</link>°³ ±îÁö) Àº °¢°¢
	<literal>ebx</literal>,
	<literal>ecx</literal>,
	<literal>edx</literal>,
	<literal>esi</literal>,
	<literal>edi</literal>,
	<link linkend="six-arg"><literal>ebp</literal></link> 
	·¹Áö½ºÅÍ¿¡ ³Ö¾î¼­ È£ÃâÇÑ´Ù.
</para>

<para>
	¸®ÅÏ°ªÀº <literal>eax</literal> ·¹Áö½ºÅÍ¿¡ ´ã°ÜÁö°Ô µÇ¸ç,
	À½¼öÀÇ ¸®ÅÏ°ªÀº ¿¡·¯°¡ ÀÖÀ½À» ³ªÅ¸³½´Ù. libc °¡ <literal>errno</literal> º¯¼ö¿¡
	Áý¾î³Ö´Â °ª°ú ´ëÀÀµÇ´Â °ªÀÌ´Ù. »ç¿ëÀÚ ¿µ¿ªÀÇ ½ºÅÃÀº ¿µÇâÀ» ¹ÞÁö ¾Ê´Â´Ù.
	±×·¡¼­ ¿©·¯ºÐÀº ½Ã½ºÅÛ ÄÝÀ» ÇàÇÒ µ¿¾È¿¡ À¯È¿ÇÑ °ÍÀ» °¡Áú ÇÊ¿ä´Â ¾ø´Ù(?)
</para>
<para>
	¿ø¹® : Result is returned in eax, negative result being an error,
	whose opposite is what libc would put into <literal>errno</literal>.
	The user-stack is not touched,
	so you needn't have a valid one when doing a syscall.
</para>

<note><para><anchor id="six-arg">
	<literal>ebp</literal> ·¹Áö½ºÅÍ¿¡ ¿©¼¸¹øÂ° ÆÄ¶ó¹ÌÅÍ¸¦ ´ã¾Æ¼­ 
	³Ñ°ÜÁÖ´Â °ÍÀº Linux 2.4 ¿¡¼­ºÎÅÍ º¼ ¼ö ÀÖ´Ù. ±× ÀÌÀüÀÇ ¸®´ª½º ¹öÁ¯µéÀº
	·¹Áö½ºÅÍ¿¡ ´ã±â´Â ´Ù¼¸°³ÀÇ ÆÄ¶ó¹ÌÅÍ¸¸ ÀÎ½ÄÇÑ´Ù.
</para></note>

<para>
	<ulink url="http://www.linuxdoc.org/LDP/lki/">Linux Kernel Internals</ulink>,
	¹®¼­ÀÇ 
	<ulink url="http://www.linuxdoc.org/LDP/lki/Linux-Kernel-Internals-2.html#ss2.11">
	How System Calls Are Implemented on i386 Architecture?</ulink>
	ÀåÀº ¿©·¯ºÐ¿¡°Ô º¸´Ù È®½ÇÇÑ °³³äÀ» Á¦°øÇÒ °ÍÀÌ´Ù.
</para>

<para>
	ÇÁ·Î¼¼½º¸¦ Ã³À½ ½ÃÀÛÇÒ ¶§ ³Ñ°ÜÁö´Â ÀÎÀÚµé¿¡ ´ëÇØ¼­´Â, ÀÏ¹ÝÀûÀÎ ¿øÄ¢Àº
	½ºÅÃÀÌ ÀÎÀÚÀÇ °¹¼ö¸¦ ÀúÀåÇÏ´Â <parameter>argc</parameter> ÀÇ °ª°ú,
	<parameter>*argc</parameter> ¸¦ ±¸¼ºÇÏ´Â Æ÷ÀÎÅÍÀÇ ¸®½ºÆ®¿Í 
	NULL-terminated µÇ´Â <literal>variable=value</literal> ÀÇ È¯°æº¯¼ö
	(<parameter>environ</parameter>) °ªµéÀÇ ¸®½ºÆ®¸¦ ÀúÀåÇÑ´Ù´Â °ÍÀÌ´Ù.
</para>
<para>
	¿ø¹® : 
	As for the invocation arguments passed to a process upon startup,
	the general principle is that the stack
	originally contains the number of arguments <parameter>argc</parameter>,
	then the list of pointers that constitute <parameter>*argv</parameter>,
	then a null-terminated sequence of null-terminated
	<literal>variable=value</literal> strings for the
	<parameter>environ</parameter>ment.
</para>
<para>
	º¸´Ù ÀÚ¼¼ÇÑ Á¤º¸¸¦ ¿øÇÑ´Ù¸é, ¸®¼Ò½º ¸®½ºÆ®¸¦ ÂüÁ¶ÇØ¼­ (: <xref linkend="s-res">)
	libc ÀÇ C ½ºÅ¸Æ®¾÷ ÄÚµåÀÇ ¼Ò½º¸¦ ÀÐ¾î º¸¾Æ¶ó.
	(<filename>crt0.S</filename> or <filename>crt1.S</filename>)
	È¤Àº ¸®´ª½º Ä¿³ÎÀÇ ¼Ò½º¸¦ ÂüÁ¶ÇÏ¶ó .
	(<filename>exec.c</filename> and <filename>binfmt_*.c</filename>
	in <filename>linux/fs/</filename>).
</para>

</section>

<section><title>¸®´ª½º¿¡¼­ÀÇ ÇÏµå¿þ¾î ÀÔÃâ·Â</title>

<para>
	¿©·¯ºÐÀÌ ¸®´ª½º¿¡¼­ Á÷Á¢ I/O Æ÷Æ®¿¡ÀÇ ÀÔÃâ·ÂÀ» ¼öÇàÇÏ°íÀÚ 
	ÇÑ´Ù¸é, OS ÀÇ ÁßÀç¸¦ ÇÊ¿ä·Î ÇÏÁö ¾Ê´Â ¸Å¿ì °£´ÜÇÑ ÀÏÀÌ¾î¼­ <literal>
	IO-Port-Programming</literal> ¹Ì´Ï ÇÏ¿ìÅõ¸¦ ÂüÁ¶ÇÏ¸é µÉ Á¤µµÀÌ°Å³ª 
	¾Æ´Ï¸é Ä¿³Î µð¹ÙÀÌ½º µå¶óÀÌ¹ö¸¦ ÇÊ¿ä·Î ÇØ¼­ ¿©·¯ºÐÀÌ Ä¿³Î ÇØÅ·ÀÌ³ª
	µð¹ÙÀÌ½º µå¶óÀÌ¹ö °³¹ßÀÌ³ª, Ä¿³Î ¸ðµâ°ú °°Àº °Íµé¿¡ ´ëÇØ¼­ ´õ ¸¹Àº 
	°ÍÀ» ½ÀµæÇØ¾ß¸¸ ÇÏ´Â °æ¿ìÀÌ°Å³ª µÑÁß ÇÏ³ªÀÇ °æ¿ìÀÏ °ÍÀÌ´Ù. (Ä¿³Î 
	¸ðµâÀÌ³ª µð¹ÙÀÌ½º µå¶óÀÌ¹ö¿¡ ´ëÇÑ °ÍµéÀº LDP ¿¡ ¸Å¿ì ÈÇ¸¢ÇÑ 
	ÇÏ¿ìÅõµéÀÌ Á¸ÀçÇÑ´Ù.)
</para>

<para>
	È¤½Ã ¿©·¯ºÐÀÌ ¿øÇÏ´Â °ÍÀÌ ±×·¡ÇÈ ÇÁ·Î±×·¡¹ÖÀÎ °æ¿ì,
	´ÙÀ½ÀÇ ÇÁ·ÎÁ§Æ®µéÀ» ÂüÁ¶ÇÏ¶ó :
	<ulink URL="http://www.ggi-project.org/">GGI</ulink> È¤Àº
	<ulink URL="http://www.XFree86.org/">XFree86</ulink> ÇÁ·ÎÁ§Æ®
</para>

<para>
	¾î¶² »ç¶÷µéÀº ÀÛ°í, °ß°íÇÑ XFree86 µå¶óÀÌ¹öµéÀ»
	interperted domain-specific language ÀÎ
	<ulink URL="http://www.irisa.fr/compose/gal/">GAL</ulink>,
	·Î °³¹ßÇÔÀ¸·Î½á º¸´Ù È¿°úÀûÀÎ °á°ú¸¦ ¾ò¾ú´Ù. 
</para>
<para>
	¿ø¹® :
	Some people have even done better,
	writing small and robust XFree86 drivers
	in an interpreted domain-specific language,
	<ulink URL="http://www.irisa.fr/compose/gal/">GAL</ulink>,
	and achieving the efficiency of hand C-written drivers
	through partial evaluation (drivers not only not in asm, but not even in C!).
	The problem is that the partial evaluator they used
	to achieve efficiency is not free software.
	Any taker for a replacement?
</para>

<para>
	¾îÂ·°Å³ª, ÀÌ ¸ðµç °æ¿ì¿¡µµ, ¿©·¯ºÐÀº <filename>linux/asm/*.h</filename> ¿¡ ÀÖ´Â 
	GCC ÀÎ¶óÀÎ ¾î¼Àºí¸®¿Í ¸ÅÅ©·Î¸¦ 
	»ç¿ëÇÔÀ¸·Î½á ÀüÃ¼¸¦ ¾î¼Àºí¸®·Î ÄÚµùÇÏ´Â °Íº¸´Ù È¿À²ÀûÀ¸·Î ÀÏÀ» 
	¼öÇàÇÒ ¼ö ÀÖ´Ù.
</para>

</section>

<section><title>Accessing 16-bit drivers from Linux/i386</title>

<para>
	±×·¯ÇÑ ÀÏµéÀº ÀÌ·ÐÀûÀ¸·Î °¡´ÉÇÏ´Ù
	(Áõ¸í : <ulink url="http://www.dosemu.org">DOSEMU</ulink>
	°¡ ÇÁ·Î±×·¥µé¿¡°Ô ¼±ÅÃÀûÀ¸·Î ÇÏµå¿þ¾î Æ÷Æ® Á¢±Ù ±ÇÇÑÀ» ÁÖ´Â ¹æ¹ýÀ» º¸¶ó)
	±×¸®°í, ÀúÀÚ´Â ¾îµò°¡ÀÇ ´©±º°¡°¡ ½ÇÁ¦·Î ±×·¯ÇÑ ÀÏÀ» Çß´Ù´Â
	¼Ò¹®À» µé¾ú´Ù. (PCI µå¶óÀÌ¹ö¿¡¼­ÀÎ°¡? ¾Æ´Ï¸é, VESA µå¶óÀÌ¹ö¿¡¼­ÀÎ°¡...
	À½... ISA PnP ¿´´ø°¡... Àß ¸ð¸£°Ú´Ù)
	¸¸¾à ¿©·¯ºÐÀÌ º¸´Ù Á¤È®ÇÑ Á¤º¸¸¦ °¡Áö°í ÀÖ´Ù¸é È¯¿µÇÑ´Ù.
	(¿ªÀÚÁÖ : ¸ÞÀÏÀ» ´Þ¶ó´Â ¶æÀÎµí)
	¾îÂ·µç, Á¤º¸¸¦ Ã£±â ¸Å¿ì ÁÁÀº °÷Àº ¸®´ª½ºÀÇ Ä¿³Î ¼Ò½º¿Í 
	DOSEMU ÀÇ ¼Ò½ºÀÌ´Ù. (±×¸®°í, 
	<ulink URL="ftp://tsx-11.mit.edu/pub/linux/ALPHA/dosemu/">DOSEMU repository</ulink> ÀÇ
	´Ù¸¥ ¸¹Àº ÇÁ·Î±×·¥µéÀÌ´Ù.)
	¶ÇÇÑ, ¿©·¯°¡ÁöÀÇ ¸®´ª½ºÀÇ low-level ÇÁ·Î±×·¥µéÀÇ ¼Ò½ºµéµµ µµ¿òÀÌ µÉ °ÍÀÌ´Ù. 
	(perhaps GGI if it supports VESA)
</para>

<para>
	±âº»ÀûÀ¸·Î ¿©·¯ºÐÀº 16ºñÆ® º¸È£¸ðµå³ª È¤Àº vm86 ¸ðµå¸¦ ÀÌ¿ëÇØ¾ß¸¸ ÇÒ °ÍÀÌ´Ù.
</para>

<para>
	ÀüÀÚ(16ºñÆ® º¸È£¸ðµå) ´Â ¼Â¾÷Àº ºñ±³Àû ½¬¿ì³ª ¼¼±×¸ÕÆ® Á¶ÀÛÀÌ³ª Àý´ë
	¼¼±×¸ÕÆ® ÁÖ¼ÒÁöÁ¤(segment 0 À» ÁÖ¼ÒÁöÁ¤ÇÏ´Â °Í°ú°°Àº) ÀÌ ¾ø´Â Àß 
	µ¿ÀÛÇÏ´Â ÄÚµå¸¦ ¸¸µé¾î¾ß¸¸ µ¿ÀÛÇÑ´Ù. ¿ì¿¬ÀÌ¶óµµ ¸ðµç »ç¿ëÇÏ´Â ¼¼±×¸ÕÆ®°¡
	LDT(¿ªÀÚÁÖ : Local Descriptor Table, ÀÎÅÚ ¾ÆÅ°ÅØÃÄ¿¡¼­ ¼¼±×¸ÕÆ®¿Í 
	³í¸® ÁÖ¼Ò, ¹°¸® ÁÖ¼ÒµéÀ» º¯È¯ÇÏ´Â µ¥ »ç¿ëµÇ´Â ÀÚ·á±¸Á¶) ¸¦ ¸¶¸®
	¼Â¾÷ÇØ ¹ö¸®Áö ¾Ê´Â ÇÑÀº ±×·¯ÇÏ´Ù
</para>
<para>
	¿ø¹® :
	The first is simpler to setup, but only works with well-behaved code
	that won't do any kind of segment arithmetics
	or absolute segment addressing (particularly addressing segment 0),
	unless by chance it happens that all segments used can be setup in advance
	in the LDT.
</para>

<para>
	ÈÄÀÚ(vm86 ¸ðµå) ´Â 'vanilla 16-bit È¯°æ' ¿¡¼­ º¸´Ù ¸¹Àº È£È¯¼ºÀ»
	Á¦°øÇÏ±â´Â ÇÏÁö¸¸, ´õ º¹ÀâÇÑ ÇÚµé¸µÀÌ ÇÊ¿äÇÏ´Ù.
</para>

<para>
	µÎ °æ¿ì ¸ðµÎ ¿©·¯ºÐÀÌ 16ºñÆ® ÄÚµå¸¦ »ç¿ëÇÏ±â Àü¿¡
	¹Ýµå½Ã ÇØ¾ß ÇÒ ÀÏµéÀÌ ÀÖ´Ù :

	<itemizedlist>
		<listitem><para>
		16ºñÆ® ÄÚµå¿¡¼­ »ç¿ëµÉ Àý´ë ÁÖ¼ÒµéÀ» 
		<filename>/dev/mem</filename> À¸·ÎºÎÅÍ ¿©·¯ºÐÀÇ ÇÁ·Î¼¼½ºÀÇ ÁÖ¼Ò °ø°£À¸·Î 
		¸Þ¸ð¸® ¸Ê ÇÏ¶ó. 
		(ÀÌ¸¦Å×¸é, ROM ÀÌ³ª, ºñµð¿À ¹öÆÛ, DMA Å¸°Ùµé, ±×¸®°í, memory-mapped I/O ¿Í
		°°Àº °Íµé)
		</para></listitem>
		<listitem><para>
		LDT ¿Í(³ª) vm86 ¸ðµåÀÇ ¸ð´ÏÅÍ¸¦ ¼Â¾÷ÇÏ¶ó (setup the LDT and/or vm86 mode monitor)
		</para></listitem>
		<listitem><para>
		ÀûÀýÇÑ I/O Á¢±Ù ±ÇÇÑÀ» Ä¿³Î·ÎºÎÅÍ È¹µæÇÏ¶ó(À§ÀÇ ¼½¼ÇÀ» ÂüÁ¶ÇÏ¶ó)
		</para></listitem>
	</itemizedlist>
</para>

<para>
	´Ù½ÃÇÑ¹ø DOSEMU ÇÁ·ÎÁ§Æ®ÀÇ ¼Ò½ºµé¿¡ ³ª¿À´Â
	³»¿ëµéÀ» ÁÖÀÇ±íÀÌ ÀÐµµ·Ï ÇÏ¿©¶ó.
	Æ¯È÷, ¸®´ª½º/i386 ¿¡¼­ ELKS ¿Í °£´ÜÇÑ <filename>.COM</filename> ÇÁ·Î±×·¥µéÀ» 
	µ¹¸± ¼ö ÀÖ´Â mini-emulator µéÀÇ ¼Ò½º¸¦ ÀÚ¼¼È÷ º¸µµ·Ï ÇÏ¶ó.
</para>

</section>

</section>

<section>
<?html-filename dos.html>
<title>DOS and Windows</title>

<para>
	´ëºÎºÐÀÇ µµ½º È®ÀåÀÚµéÀº µµ½º ¼­ºñ½º¿¡ ´ëÇÑ ÀÎÅÍÆäÀÌ½º¸¦ Á¦°øÇÑ´Ù.
	±×µéÀÇ ¹®¼­¿¡¼­ °ü·ÃµÈ ³»¿ëµéÀ» ÀÐ¾î º¸µµ·Ï ÇÏ¶ó.
	±×·¯³ª Á¾Á¾ ±×µéÀº <function>int 0x21</function> À» 
	½Ã¹Ä·¹ÀÌÆ® ÇÏ±â¸¸ ÇÏ¸ç, ¿©·¯ºÐÀÌ Á¤¸»·Î real mode ¿¡ ÀÖ´Â °Í
	"Ã³·³" ¸¸µé¾î ÁØ´Ù.
	(ÀúÀÚ´Â ±×µéÀÌ Á¤¸»·Î ½ºÅÓ ÀÌ»óÀÇ ¹«¾ùÀÎ°¡¸¦ °¡Áö°í ÀÖ´ÂÁö
	ÀÇ½É½º·´´Ù. ±×¸®°í, 32ºñÆ® ¿ÀÆÛ·£µåµéÀ» °¡Áö°í¼­ Á¦´ë·Î
	µ¿ÀÛÇÏ´ÂÁöµµ ÀÇ½É½º·´´Ù. ´ë°³°¡ ±×·¯ÇÑ ÇÁ·Î±×·¥µéÀº
	¸®¾ó ¸ðµå ÀÎÅÍ·´Æ®¸¦ °¡»ó 86 ¸ðµå(vm86 ¸ðµå) ·Î ¹Ý¿µ¸¸
	ÇÒ µû¸§ÀÌ´Ù.
</para>

<para>
	DPMI ¿Í °ü·ÃµÈ ¹®¼­µéÀÌ ´ÙÀ½ÀÇ ¸µÅ©µé¿¡ Á¸ÀçÇÑ´Ù :
	<ulink url="ftp://x2ftp.oulu.fi/pub/msdos/programming/"></ulink>
	(¿ø·¡ÀÇ x2ftp »çÀÌÆ®°¡ ¹®µé ´Ý¾Ò±â ¶§¹®¿¡ ´ÙÀ½ÀÇ ¸µÅ©¸¦ ÀÌ¿ëÇÏ¶ó :
	<ulink url="ftp://ftp.lip6.fr/pub/pc/x2ftp/README.mirror_sites">mirror site</ulink>).
</para>

<para>
	DJGPP ´Â ÀÚÃ¼ÀÇ(Á¦ÇÑ¹öÁ¯ÀÓ) <application>glibc</application> À¯»çÇ°(?) À»
	Á¦°øÇÑ´Ù.
</para>

<para>
	Linux ¿¡¼­ DOS ¿ëÀÇ ¹ÙÀÌ³Ê¸®·Î Å©·Î½º ÄÄÆÄÀÏ ÇÏ´Â °Íµµ °¡´ÉÇÏ´Ù.
	¿©·¯ºÐ Áö¿ªÀÇ metalab.unc.edu ÀÇ FTP ¹Ì·¯ÀÇ
	<filename>devel/msdos/</filename> µð·ºÅä¸®¸¦ º¸¶ó.
	¶ÇÇÑ, MOSS DOS-È®ÀåÀÚ¸¦ Utah ´ëÇÐÀÇ
	<ulink url="http://www.cs.utah.edu/projects/flux/">Flux project</ulink>
	¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.
</para>

<para>
	´Ù¸¥ ¹®¼­µéÀÌ³ª faq µéÀº º¸´Ù µµ½º Áß½ÉÀÌ´Ù. ¿ì¸®´Â
	µµ½ºÈ¯°æÀÇ °³¹ßÀ» ÃßÃµÇÏÁö ¾Ê´Â´Ù.
</para>

<formalpara><title>Windows and Co.</title>
<para>
	ÀÌ ¹®¼­´Â À©µµ¿ìÁî ÇÁ·Î±×·¡¹Ö¿¡ °üÇÑ ¹®¼­°¡ ¾Æ´Ï´Ù.
	´ç½ÅÀº ´Ù¸¥ °÷¿¡¼­ ±×¿¡ °ü·ÃµÈ ¸¹Àº °ÍµéÀ» Ã£À» ¼ö ÀÖ´Ù.
	´ç½ÅÀÌ ¾Ë¾Æ¾ß ÇÒ °ÍÀº 
	<ulink url="http://www.cygnus.com">Cygnus Solutions</ulink>
	°¡ 
	<ulink URL="http://sourceware.cygnus.com/cygwin/">cygwin32.dll library</ulink>
	¸¦ Win32 ÇÃ·§Æû¿¡¼­ GNU ÇÁ·Î±×·¥µéÀ» ½ÇÇà½ÃÅ°±â À§ÇØ¼­ °³¹ßÇß´Ù´Â °ÍÀÌ´Ù.
	µû¶ó¼­, ´ç½ÅÀº gcc, gas, ±×¸®°í ±× ¿ÜÀÇ gnu ÅøµéÀ» ´Ù¸¥ ¸¹Àº À¯´Ð½º 
	ÀÀ¿ë ÇÁ·Î±×·¥Ã³·³ À©µµ¿ì¿¡¼­ ½ÇÇà½ÃÅ³ ¼ö ÀÖ´Ù.
</para>
</formalpara>

</section>

<section>
<?html-filename ownos.html>
<title>¿©·¯ºÐÀÌ ¸¸µç OS</title>

<para>
	½Ã½ºÅÛ¿¡ ´ëÇÑ ¿ÏÀüÇÑ Á¦¾î 
	¶ó´Â Æ¯¼ºÀº ¸¹Àº OS °³¹ßÀÚµéÀ» ¾î¼Àºí¸®·Î À¯È¤ÇÏ´Â
	Æ¯¼ºÀÌ´Ù.
	self-development ¸¦ Çã¿ëÇÏ´Â ½Ã½ºÅÛÀº, ºñ·Ï,
	±×°ÍÀÌ ´Ù¸¥ ½Ã½ºÅÛÀÇ 'À§¿¡¼­' ¿î¿µµÉÁö¶óµµ (Linux over Mach ³ª
	OpenGenera over Unix Ã³·³) "OS" ¶ó°í
	ºÎ¸¦ ¼ö ÀÖÀ½À» ±â¾ïÇÏ¶ó.
</para>

<para>
	µû¶ó¼­, º¸´Ù ½¬¿î µð¹ö±ëÀ» À§ÇØ ¿©·¯ºÐÀº 
	¸®´ª½º¿¡¼­ ½ÇÇàµÇ´Â ÇÁ·Î¼¼½º·Î¼­ÀÇ ¿©·¯ºÐÀÇ "OS" ¸¦
	¸ÕÀú °³¹ßÇÏ°íÀÚ ÇÒÁöµµ ¸ð¸¥´Ù. (´À¸±Áö´Â ¸ð¸£Áö¸¸) ±×¸®°í ³ª¼­
	<ulink url="http://www.cs.utah.edu/projects/flux/oskit/">Flux OS kit</ulink>
	(Linux ¿Í BSD µå¶óÀÌ¹öµéÀ» ¿©·¯ºÐ ÀÚ½ÅÀÇ OS ¿¡¼­ »ç¿ëÇÒ ¼ö ÀÖ°Ô ÇØ ÁÖ´Â
	À¯Æ¿¸®Æ¼) ¸¦ »ç¿ëÇØ¼­ ±×°ÍÀ» stand-alone À¸·Î ¸¸µé°íÀÚ ÇÒÁöµµ ¸ð¸£°Ú´Ù.
	¿©·¯ºÐÀÇ OS °¡ stable ÇÏ°í, ¿©·¯ºÐÀÌ ÁøÁ¤À¸·Î ¿©·¯ºÐÀÇ Ã¢Á¶¹°À»
	»ç¶ûÇÑ´Ù¸é ±×¶§¿¡¾ß ¿©·¯ºÐÀÇ ÇÏµå¿þ¾î µå¶óÀÌ¹öµéÀ» ¸¸µé ½Ã±â°¡ ¿Â °ÍÀÌ´Ù.
</para>

<para>
	ÀÌ ÇÏ¿ìÅõ´Â ºÎÆ®·Î´õÀÇ ÄÚµå³ª, 32-ºñÆ® ¸ðµå·Î ÁøÀÔÇÏ´Â ¹ýÀÌ¶óµçÁö,
	ÀÎÅÍ·´Æ®¸¦ ´Ù·ç´Â ¹ýÀÌ³ª, ÀÎÅÚÀÇ º¸È£¸ðµå, È¤Àº °¡»ó/¸®¾ó 86 ¸ðµå¶óµçÁö
	¿©·¯ºÐÀÇ ¿ÀºêÁ§Æ® ÆÄÀÏ Æ÷¸ËÀÌ³ª È£Ãâ ±ÔÄ¢¿¡ °üÇÑ °ÍµéÀº ´Ù·çÁö ¾Ê´Â´Ù.
</para>

<para>
	¿©·¯ºÐÀÌ ±×·¯ÇÑ °Íµé¿¡ °üÇÑ ¹ÏÀ»¸¸ÇÑ Á¤º¸¸¦ Ã£À» ¼ö ÀÖ´Â ÁÖµÈ Àå¼Ò´Â
	ÇöÁ¸ÇÏ´Â OS µé°ú ºÎÆ®·Î´õµéÀÇ ¼Ò½ºÄÚµåÀÌ´Ù.
	´ÙÀ½ÀÇ À¥ÆäÀÌÁö¿¡ ¸¹Àº ¸µÅ©µéÀÌ ÀÖÀ» °ÍÀÌ´Ù :
	<ulink url="http://www.tunes.org/Review/OSes.html"></ulink>
</para>

</section>

</chapter>


<chapter id="s-quick" xreflabel="Quick Start">
<?html-filename quickstart.html>
<title>ÀÏ´Ü µû¶óÇØº¸ÀÚ(Quick Start)</title>

<section><title>¼Ò°³</title>
    <para>
        ¸¶Ä§³» ¶§°¡ ¿Ô´Ù. ¿©·¯ºÐÀÌ ¾ÆÁ÷µµ ÀÌ ¹®¼­¸¦ ÀÐ°í ÀÖÀ¸¸ç, ¿©ÀüÈ÷ ¾î¼Àºí¸®·Î 
        ¹«¾ð°¡¸¦ ¸¸µé°Ú´Ù´Â ±¤±â¾î¸°(!) »ý°¢À» °¡Áö°í ÀÖ´Ù¸é (¿©±â±îÁö ÀÐÀº »ç¶÷ÀÌ¶ó¸é,
        Á¤¸» ¾î¼Àºí¸® ÆÒÀÓ¿¡ Æ²¸²¾ø´Ù), ÀÌÁ¦ºÎÅÍ ½ÃÀÛÇÏ´Âµ¥¿¡ ÇÊ¿äÇÑ °ÍÀ» ¾Ë·ÁÁÖ°Ú´Ù.
    </para>
    <para>
        ¿©·¯ºÐÀÌ ¾Õ¼­ ÀÐÀº ¹Ù¿Í °°ÀÌ ¿©·¯ºÐÀº ¸®´ª½º ¿î¿µÃ¼Á¦¿¡¼­ ¿©·¯°¡Áö ¹æ¹ýÀ¸·Î
        ÇÁ·Î±×·¡¹ÖÀ» ÇÒ ¼ö ÀÖ´Ù. ÀÌÁ¦ºÎÅÍ º» ÀúÀÚ´Â Ä¿³ÎÀÇ ½Ã½ºÅÛ ÄÝÀ» <emphasis>Á÷Á¢</emphasis> È£ÃâÇÏ´Â
        ¹æ¹ýÀ» º¸¿©ÁÖ·Á ÇÑ´Ù. ¿Ö! Á÷Á¢ Ä¿³ÎÀ» È£ÃâÇÏ´Â°¡? ±×·¸°Ô ÇÏ´Â °ÍÀÌ Ä¿³ÎÀÌ 
        Á¦°øÇÏ´Â ¼­ºñ½º¸¦ È£ÃâÇÏ´Â °¡Àå ºü¸¥(!) ¹æ¹ýÀÌ±â ´ë¹®ÀÌ´Ù. 
        ÀÌ ¹æ¹ýÀ» »ç¿ëÇÏ¸é, ¿ì¸®ÀÇ ÄÚµå´Â ´Ù¸¥ ¶óÀÌºê·¯¸®¿¡ ¸µÅ©µÉ ÇÊ¿ä°¡ ¾ø´Ù. 
        ELF ÀÎÅÍÇÁ¸®ÅÍ¸¦ »ç¿ëÇÒ ÇÊ¿äµµ ¾ø´Ù.´ÜÁö, Ä¿³Î°ú Á÷Á¢ ÀÇ»ç¼ÒÅëÇÒ µû¸§ÀÌ´Ù.
    </para>
    <para>
        ÀúÀÚ´Â µ¿ÀÏÇÑ ÀÏÀ» ÇÏ´Â »ùÇÃ ÇÁ·Î±×·¥À» <command>nasm</command> °ú <command>gas</command>, 
        ÀÌ µÎ°³ÀÇ ¾î¼Àºí·¯¸¦ »ç¿ëÇØ¼­ °¢°¢ ÇÁ·Î±×·¡¹Ö ÇÑ ¼Ò½º¸¦ º¸¿©ÁÖ°Ú´Ù. ÀÚ¼¼È÷ º¸¸é, 
	ÀÎÅÚ°è¿­°ú AT&amp;T
        À¯´Ð½º °è¿­ÀÇ ¹®¹ýÀÇ Â÷ÀÌ¸¦ ¾Ë.. ¼öµµ ÀÖÀ»±î?
    </para>
    <para>
        ¿©·¯ºÐÀº ¶ÇÇÑ, <ulink url="http://linuxassembly.org/intro.html">À¯´Ð½º ¾î¼Àºí¸® 
        ÇÁ·Î±×·¡¹Ö Æ©Åä¸®¾ó(UNIX assembly programming tutorial - 
	http://linuxassembly.org/intro.html)</ulink>ÀÇ 
        ¼Ò°³¸¦ ÀÐ¾îº¼ ¼ö ÀÖ´Ù. °Å±â¿¡´Â ¸®´ª½º ÀÌ¿Ü¿¡µµ, ´Ù¸¥ À¯´Ð½º °è¿­ÀÇ ¿î¿µÃ¼Á¦¸¦ À§ÇÑ
        »ùÇÃ ÄÚµåµéÀÌ ÀÖ´Ù.(¿ªÀÚ ÁÖ : FreeBSD, BeOS µî)
    </para>

    <section><title>ÇÊ¿äÇÑ µµ±¸µé</title>
        <para>
            ´ç¿¬È÷ ¾î¼Àºí·¯°¡ ÇÊ¿äÇÏ´Ù. -- <command>nasm</command> ÀÌ³ª <command>gas</command>.
        </para>
        <para>
            ±×¸®°í, ¸µÄ¿°¡ ÇÊ¿äÇÏ´Ù. -- <command>ld</command>
            ¿Ö³ÄÇÏ¸é, ¾î¼Àºí·¯´Â ´ÜÁö ¸ñÀûÄÚµå(object code)¸¸À» ¸¸µé¾î³»±â ¶§¹®ÀÌ´Ù.
            ´ëºÎºÐÀÇ ¹èÆ÷º»¿¡´Â <application>gas</application> ¿Í <application>ld</application> °¡
            Æ÷ÇÔµÇ¾î ÀÖ´Ù. binutils ÆÐÅ°Áö¿¡ ÆÐÅ°Â¡µÇ¾î ÀÖ´Ù.
        </para>
        <para>
            <application>nasm</application> ÀÇ °æ¿ì, ¸®´ª½º¿ëÀÇ ¹®¼­¿Í ¹ÙÀÌ³Ê¸® ÆÐÅ°Áö¸¦ ´Ù¿î·ÎµåÇØ¼­ ¼³Ä¡ÇØ¾ß ÇÑ´Ù. 
            ´Ù¿î·Îµå ÇÒ ¼ö ÀÖ´Â »çÀÌÆ®´Â ´ÙÀ½°ú °°´Ù : <link linkend="p-nasm-where">nasm site</link>; 
            ¸Çµå·¹ÀÌÅ©, ¼ö¼¼, Stampede, µ¥ºñ¾È µîÀÇ ÆÐÅ°Áö¿¡´Â Æ÷ÇÔµÇ¾î ÀÖ´Ù. ¸ÕÀú, È®ÀÎÇÏ¶ó.
        </para>
        <para>
            Á¤¸» ±íÀÌ ÆÄ°íµé·Á¸é, ¿©·¯ºÐÀÇ ¿î¿µÃ¼Á¦ÀÇ include ÆÄÀÏµéÀ» ¼³Ä¡ÇØ¾ß ÇÏ°í,
            °¡´ÉÇÏ´Ù¸é, Ä¿³Î ¼Ò½º±îÁö ¼³Ä¡ÇÏ¶ó (¿©·¯ºÐÀÇ ¿î¿µÃ¼Á¦°¡ °ø°³ ¿î¿µÃ¼Á¦ÀÌ¸é °¡´ÉÇÏ´Ù.)
        </para>
    </section>
</section>

<section>
<?html-filename hello.html>
<title>Hello, world!</title>

<section><title>Program layout</title>
    <para>
        ¸®´ª½º´Â 32ºñÆ® ÇÁ·ÎÅØÆ¼µå ¸ðµå¿¡¼­ µ¿ÀÛÇÏ¸ç, ¼±Çü ¸Þ¸ð¸® ¸ðµ¨(flat memory model)À» °¡Áø´Ù. 
        ±×¸®°í, ÀÌÁø ½ÇÇàÆÄÀÏ¿¡ ELF Æ÷¸ËÀ» °¡Áø´Ù. 
    </para>

    <para>
        ÇÁ·Î±×·¥Àº ¿©·¯ºÐÀÌ ÀÛ¼ºÇÑ ÄÚµå°¡ ÀÖ´Â <literal>.text</literal> ¼½¼Ç°ú (ÀÌ ºÎºÐÀº ÀÐ±â Àü¿ëÀÌ´Ù)
        ¿©·¯ºÐÀÇ ÃÊ±âÈ­µÈ(!) data °¡ ÀúÀåµÇ¾î ÀÖ´Â <literal>.data</literal> ¼½¼Ç, ÃÊ±âÈ­µÇÁö ¾ÊÀº(!)
        µ¥ÀÌÅ¸°¡ ÀúÀåµÇ´Â <literal>.bss</literal> ¼½¼Ç ¹× ´Ù¸¥ Ç¥ÁØÀûÀÎ ¼½¼Çµé·Î ³ª´¶´Ù. Å©°Ô º¸¸é, 
        .text ¿Í .data ÀÇ µÎ°³ÀÇ ¼½¼ÇÀ¸·Î ³ª´¶´Ù. (Áï, ÄÚµå¿Í µ¥ÀÌÅ¸)
        ±×·¯³ª, ´Ù¸¥ ¼½¼Ç ¾øÀÌ .text ¼½¼Ç¸¸À¸·Îµµ ÇÁ·Î±×·¥ÀÌ °¡´ÉÇÏ´Ù. .text ¼½¼ÇÀº
        ÇÁ·Î±×·¥¿¡ ¹Ýµå½Ã ÀÖ¾î¾ß ÇÏ´Â ¼½¼ÇÀÌ´Ù. (¿ªÀÚÁÖ : »ó»óÇØº¸¶ó! ÄÚµå ¾ø´Â ÇÁ·Î±×·¥
        -- ¸»µµ ¾ÈµÈ´Ù.)
    </para>
    <para>
    ÀÌÁ¦, Ã¹¹øÂ° ÇÁ·Î±×·¥À» ÀÛ¼ºÇØ º¸ÀÚ 
    (¿ªÀÚÁÖ : ¿ª½Ã³ª.. Çï·Î¿ùµå ÇÁ·Î±×·¥ÀÌ´Ù ¤Ñ.¤Ñ)
    </para>
</section>

<section><title>NASM (hello.asm)</title>
<para><programlisting>
section     .data                           ;¼½¼Ç .data ¸¦ ¼±¾ðÇÑ´Ù.(¿©±âºÎÅÍ
                                            ; .data ¼½¼ÇÀÌ´Ù.)

msg     db          "Hello, world!",0xa     ;Ãâ·ÂÇÒ »ç¶û½º·±(!) ½ºÆ®¸µÀÌ´Ù.
len     equ         $ - msg                 ;Ä£¾ÖÇÏ´Â(!) ¹®ÀÚ¿­ÀÇ ±æÀÌ

section     .text                           ;¿©±âºÎÅÍ .text ¼½¼ÇÀÌ´Ù. ÄÚµåÀÖÀ½

                    ;ELF ¸µÄ¿³ª ·Î´õ¿¡°Ô ÇÁ·Î±×·¥ÀÇ ¿£Æ®¸® Æ÷ÀÎÆ®¸¦ ¾Ë·ÁÁÖ¾î¾ß
    global _start   ;ÇÑ´Ù. ·Î´õ È¤Àº ¸µÄ¿´Â ÀÏ¹ÝÀûÀ¸·Î ¿£Æ®¸® Æ÷ÀÎÆ®°¡ _start 
                    ;¶ó°í °¡Á¤ÇÏ°í ÀÖ´Ù. ÀÌ µðÆúÆ® ¼³Á¤À» ¹Ù²Ü·Á¸é,
                    ;ld -e foo ¸¦ »ç¿ëÇÏ¶ó.

_start:

;stdout ¿¡ ¿ì¸®ÀÇ »ç¶û½º·± ¹®ÀÚ¿­À» Ãâ·ÂÇÏÀÚ.

        mov     edx,len ;½Ã½ºÅÛ ÄÝ 4¹ø(sys_write)Àº ¼¼¹øÂ° ÀÎ¼ö·Î Ãâ·ÂÇÒ ¸Þ¼¼ÁöÀÇ
                        ;±æÀÌ¸¦ ÃëÇÑ´Ù.
        mov     ecx,msg ;½Ã½ºÅÛ ÄÝ 4¹øÀº µÎ¹øÂ° ÀÎ¼ö·Î Ãâ·ÂÇÒ ¸Þ¼¼Áö°¡ ´ã±ä ¸Þ¸ð¸®
                        ;ÁÖ¼Ò¸¦ ÃëÇÑ´Ù. Áï, Ãâ·ÂÇÒ ¸Þ¼¼Áö·ÎÀÇ Æ÷ÀÎÅÍ¸¦ ÃëÇÑ´Ù.
        mov     ebx,1   ;½Ã½ºÅÛ ÄÝ 4¹øÀº Ã¹¹øÂ° ÀÎ¼ö·Î ÆÄÀÏÀÇ ÇÚµé(µð½ºÅ©¸³ÅÍ)À» 
                        ;ÃëÇÑ´Ù.
        mov     eax,4   ;eax ·¹Áö½ºÅÍ¿¡ È£ÃâÇÒ Ä¿³Î ½Ã½ºÅÛ ÄÝÀÇ ¹øÈ£¸¦ ³Ö¾î ÁØ´Ù.
                        ;ÀÌ °æ¿ì¿¡´Â 4¹ø(sys_write) ÀÌ´Ù.
        int     0x80    ;Ä¿³ÎÀ» È£ÃâÇÑ´Ù.

;Ãâ·ÂÀÌ ³¡³µÀ¸¸é, exit ¸¦ È£ÃâÇÑ´Ù.

        mov     ebx,0   ;exit ÄÚµå·Î 0À» ÁØ´Ù. (c ÄÚµå·Î´Â exit(0);)
        mov     eax,1   ;½Ã½ºÅÛ ÄÝ 1¹ø (sys_exit)
        int     0x80	;Ä¿³ÎÀ» È£ÃâÇÑ´Ù.
</programlisting></para>
</section>

<section><title>GAS (hello.S)</title>
<para><programlisting>
.data                           # ¼½¼Ç .data °¡ ¿©±â¼­ºÎÅÍ ½ÃÀÛÇÑ´Ù.

msg:
    .string	"Hello, world!\n"   # ¿ì¸®ÀÇ »ç¶û½º·± ¹®ÀÚ¿­
    len = . - msg               # Ä£¾ÖÇÏ´Â ¹®ÀÚ¿­ÀÇ ±æÀÌ

.text                           # ¼½¼Ç .text °¡ ¿©±â¼­ºÎÅÍ ½ÃÀÛÇÑ´Ù.

                    # ELF ¸µÄ¿³ª ·Î´õ¿¡°Ô ÇÁ·Î±×·¥ÀÇ ¿£Æ®¸® Æ÷ÀÎÆ®¸¦ ¾Ë·ÁÁÖ¾î¾ß
    .global _start  # ÇÑ´Ù. ·Î´õ È¤Àº ¸µÄ¿´Â ÀÏ¹ÝÀûÀ¸·Î ¿£Æ®¸® Æ÷ÀÎÆ®°¡ _start 
                    # ¶ó°í °¡Á¤ÇÏ°í ÀÖ´Ù. ÀÌ µðÆúÆ® ¼³Á¤À» ¹Ù²Ü·Á¸é,
                    # ld -e foo ¸¦ »ç¿ëÇÏ¶ó.

_start:

# stdout ¿¡ ¿ì¸®ÀÇ »ç¶û½º·± ¹®ÀÚ¿­À» Ãâ·ÂÇÏÀÚ.

    movl    $len,%edx   # ½Ã½ºÅÛ ÄÝ 4¹ø(sys_write)Àº ¼¼¹øÂ° ÀÎ¼ö·Î Ãâ·ÂÇÒ 
                        # ¸Þ¼¼ÁöÀÇ ±æÀÌ¸¦ ÃëÇÑ´Ù.
    movl    $msg,%ecx   # ½Ã½ºÅÛ ÄÝ 4¹øÀº µÎ¹øÂ° ÀÎ¼ö·Î Ãâ·ÂÇÒ ¸Þ¼¼Áö°¡ 
                        # ´ã±ä ¸Þ¸ð¸® ÁÖ¼Ò¸¦ ÃëÇÑ´Ù. Áï, Ãâ·ÂÇÒ ¸Þ¼¼Áö·ÎÀÇ 
                        # Æ÷ÀÎÅÍ¸¦ ÃëÇÑ´Ù.
    movl    $1,%ebx     # ½Ã½ºÅÛ ÄÝ 4¹øÀº Ã¹¹øÂ° ÀÎ¼ö·Î ÆÄÀÏÀÇ 
                        # ÇÚµé(µð½ºÅ©¸³ÅÍ)À» ÃëÇÑ´Ù.
    movl    $4,%eax     # eax ·¹Áö½ºÅÍ¿¡ È£ÃâÇÒ Ä¿³Î ½Ã½ºÅÛ ÄÝÀÇ ¹øÈ£¸¦ 
                        # ³Ö¾î ÁØ´Ù. ÀÌ °æ¿ì¿¡´Â 4¹ø(sys_write) ÀÌ´Ù. 
    int     $0x80       # Ä¿³ÎÀ» È£ÃâÇÑ´Ù. 

# Ãâ·ÂÀÌ ³¡³µÀ¸¸é, exit ¸¦ È£ÃâÇÑ´Ù.

    movl    $0,%ebx     # exit ÄÚµå·Î 0À» ÁØ´Ù. (c ÄÚµå·Î´Â exit(0);)
    movl    $1,%eax     # ½Ã½ºÅÛ ÄÝ 1¹ø (sys_exit)
    int     $0x80       # Ä¿³ÎÀ» È£ÃâÇÑ´Ù.
</programlisting></para>
</section>

</section>

<section>
<?html-filename build.html>
<title>½ÇÇàÆÄÀÏ ¸¸µé±â</title>
    <section><title>¸ñÀû ÄÚµå »ý¼º</title>
        <para>
            ½ÇÇàÆÄÀÏÀ» ¸¸µé±â À§ÇÑ Ã¹¹øÂ° ´Ü°è´Â ¼Ò½ºÆÄÀÏÀ» ÄÄÆÄÀÏ È¤Àº ¾î¼Àºí¸µ ÇØ¼­
            ¸ñÀû ÄÚµå°¡ ´ã±ä ÆÄÀÏÀ» ¸¸µå´Â °ÍÀÌ´Ù.
        </para>
        <para>
            <application>nasm</application> À» »ç¿ëÇÑ´Ù¸é,
        </para>
        <para><screen>
            $ nasm -f elf hello.asm
        </screen></para>
        <para>
            <application>gas</application> ¸¦ »ç¿ëÇÑ´Ù¸é,
        </para>
        <para><screen>
            $ as -o hello.o hello.S
        </screen></para>
        <para>
            ¿Í °°ÀÌ ÇÏ¸é ¸ñÀû ÄÚµå°¡ ´ã°Ü ÀÖ´Â <filename>hello.o</filename> ¸¦ »ý¼ºÇÏ°Ô µÈ´Ù.
        </para>
    </section>

    <section><title>½ÇÇàÆÄÀÏÀÇ »ý¼º</title>
        <para>
            µÎ¹øÂ° ´Ü°è·Î½á, ¸ñÀûÄÚµå°¡ ´ã±ä ÆÄÀÏ·ÎºÎÅÍ ¸µÄ¿¸¦ È£ÃâÇÏ¿© ½ÇÇà°¡´ÉÇÑ ÆÄÀÏÀ» ¸¸µé¾î³»°Ô µÈ´Ù.
        </para>
        <para><screen>
            $ ld -s -o hello hello.o
        </screen></para>
        <para>
            À§¿Í °°ÀÌ ÇÏ¸é µÈ´Ù.
            ±×·¸°Ô ÇÏ°í ³ª¸é, ¸¶Ä§³», <filename>hello</filename> ¶ó´Â ½ÇÇàÆÄÀÏÀ» º¼ ¼ö ÀÖ°Ô µÈ´Ù.
        </para>
        <para>
            ÇÑ¹ø ½ÇÇà½ÃÄÑ º¸¾Æ¶ó.
            Á¦´ë·Î µ¿ÀÛÇÏ´Â°¡?
            ³¡ÀÌ´Ù. ÀÌ°Ô ÀüºÎÀÌ´Ù.
            ¸Å¿ì °£´ÜÇÏÁö ¾ÊÀº°¡? ³Ê¹«³ª °£´ÜÇØ¼­ µÇ·Á È²´çÇÏÁö ¾ÊÀº°¡?!?!
        </para>
        <note><para>
            (¿ªÀÚ ÁÖ: ±×·¸´Ù. ÀÌ°ÍÀÌ ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÇ ÀüºÎÀÌ´Ù.
             ´õ ±íÀÌ ÇÁ·Î±×·¡¹ÖÇÏ±â À§ÇØ¼­´Â Ä¿³ÎÀÇ ½Ã½ºÅÛ ÄÝÀÇ ¹øÈ£¸¦ ÀüºÎ ¾Ë¾Æ¾ß ÇÏ°í,
             ÀÎÅÚ È¤Àº ¿©·¯ºÐÀÌ ÇÁ·Î±×·¡¹Ö ÇÏ±â ¿øÇÏ´Â ÇÃ·§ÆûÀÇ ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­ÀÇ 
             ÀÎ½ºÆ®·°¼Ç ¼¼Æ® ¹×, Æ¯¼º, Á¦°øÇÏ´Â ±â´É µîÀ» Àß ¾Ë¾Æ¾ß ÇÑ´Ù.
             ±×·¯ÇÑ °ÍÀº ÇØ´ç ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­ÀÇ Á¦Á¶¾÷Ã¼ È¨ÆäÀÌÁö µî¿¡ °¡¸é ÀÚ¼¼ÇÑ ÀÚ·á¸¦
             ±¸ÇÒ ¼ö ÀÖ´Ù.
             ¸®´ª½º Ä¿³ÎÀÇ ½Ã½ºÅÛ ÄÝÀÇ ¸ñ·Ï°ú ÀÎ¼ö·Î ·¹Áö½ºÅÍ¿¡ ¹«¾ùÀ» ³Ö¾îÁÖ¾î¾ß ÇÏ´Â°¡¿¡ 
             °üÇÑ ÀÚ·á´Â <ulink url="http://linuxassembly.org">http://linuxassembly.org</ulink>
             ÀÇ ¹®¼­¸¦ ÂüÁ¶ÇÏ¶ó. 
        </para></note>
    </section>
</section>

</chapter>

<chapter id="s-res" xreflabel="Linux assembly resources">
<?html-filename resources.html>
<title>Resources</title>

<simplesect id="s-res-url"><title>Pointers</title>

<para>
Your main resource for Linux/UNIX assembly programming material is:
</para>

<blockquote><para>
<ulink url="http://linuxassembly.org/resources.html"></ulink>
</para></blockquote>

<para>
Do visit it, and get plenty of pointers to assembly projects,
tools, tutorials, documentation, guides, etc,
concerning different UNIX operating systems and CPUs.
Because it evolves quickly, I will no longer duplicate it here.
</para>

<para>
If you are new to assembly in general, here are few starting pointers:

<anchor id="s-res-gen">

<itemizedlist>
<listitem><para>
<ulink url="http://webster.cs.ucr.edu/Page_asm/ArtOfAsm.html">The Art Of Assembly</ulink>
</para></listitem>
<listitem><para>
<ulink url="http://www2.dgsys.com/~raymoon/faq/">x86 assembly FAQ</ulink>
</para></listitem>
<listitem><para>
<ulink url="ftp://ftp.luth.se/pub/msdos/">ftp.luth.se</ulink>
mirrors the hornet and x2ftp former archives of msdos assembly coding stuff
</para></listitem>
<listitem><para>
<ulink url="http://www.koth.org">CoreWars</ulink>,
a fun way to learn assembly in general
</para></listitem>
<listitem><para>
Usenet:
<ulink url="news://comp.lang.asm.x86">comp.lang.asm.x86</ulink>;
<ulink url="news://alt.lang.asm">alt.lang.asm</ulink>
</para></listitem>
</itemizedlist>

</para>

</simplesect>

<simplesect id="s-res-list">
<title>Mailing list</title>

<para>
If you're are interested in Linux/UNIX assembly programming
(or have questions, or are just curious)
I especially invite you to join Linux assembly programming mailing list.
</para>

<para>
This is an open discussion of assembly programming under Linux, *BSD, BeOS,
or any other UNIX/POSIX like OS; also it is not limited to x86 assembly
(Alpha, Sparc, PPC and other hackers are welcome too!).
</para>

<para>
To subscribe send a blank message to <email>linux-assembly-subscribe@egroups.com</email>.
</para>

<para>
List address is <email>linux-assembly@egroups.com</email>.
</para>

<para>
List archives are available at
<ulink url="http://www.egroups.com/list/linux-assembly/"></ulink>.
</para>

</simplesect>

</chapter>


<chapter id="s-faq" xreflabel="FAQ">
<?html-filename=faq.html>
<title>Frequently Asked Questions</title>

<para>
Here are frequently asked questions (with answers)
about Linux assembly programming.
Some of the questions (and the answers) were taken from the
the <link linkend="s-res-list">linux-assembly mailing list</link>.
</para>

<qandaset defaultlabel="number">

<qandaentry>

<question><para>
How do I do graphics programming in Linux?
</para></question>

<answer>

<para>
An answer from <ulink url="mailto:paulf@icom.co.za">Paul Furber</ulink>:
</para>

<para><screen>
Ok you have a number of options to graphics in Linux. Which one you use
depends on what you want to do. There isn't one Web site with all the
information but here are some tips:

SVGALib: This is a C library for console SVGA access.
Pros: very easy to learn, good coding examples, not all that different
from equivalent gfx libraries for DOS, all the effects you know from DOS
can be converted with little difficulty.
Cons: programs need superuser rights to run since they write directly to
the hardware, doesn't work with all chipsets, can't run under X-Windows.
Search for svgalib-1.4.x on http://ftp.is.co.za

Framebuffer: do it yourself graphics at SVGA res
Pros: fast, linear mapped video access, ASM can be used if you want :)
Cons: has to be compiled into the kernel, chipset-specific issues, must
switch out of X to run, relies on good knowledge of linux system calls
and kernel, tough to debug
Examples: asmutils (http://www.linuxassembly.org) and the leaves example
and my own site for some framebuffer code and tips in asm
(http://ma.verick.co.za/linux4k/)

Xlib: the application and development libraries for XFree86.
Pros: Complete control over your X application
Cons: Difficult to learn, horrible to work with and requires quite a bit
of knowledge as to how X works at the low level. 
Not recommended but if you're really masochistic go for it. All the
include and lib files are probably installed already so you have what
you need. 

Low-level APIs: include PTC, SDL, GGI and Clanlib
Pros: very flexible, run under X or the console, generally abstract away
the video hardware a little so you can draw to a linear surface, lots of
good coding examples, can link to other APIs like OpenGL and sound libs,
Windows DirectX versions for free
Cons: Not as fast as doing it yourself, often in development so versions
can (and do) change frequently.
Examples: PTC and GGI have excellent demos, SDL is used in sdlQuake,
Myth II, Civ CTP and Clanlib has been used for games as well.

High-level APIs: OpenGL - any others?
Pros: clean api, tons of functionality and examples, industry standard
so you can learn from SGI demos for example
Cons: hardware acceleration is normally a must, some quirks between
versions and platforms
Examples: loads - check out www.mesa3d.org under the links section.

To get going try looking at the svgalib examples and also install SDL
and get it working. After that, the sky's the limit.
</screen></para>

</answer></qandaentry>

<qandaentry>

<question><para>
How do I debug pure assembly code under Linux?
</para></question>

<answer>

<para>
There's an early version of the
<ulink url="http://www.ellipse.magenet.com/ald.html">Assembly Language Debugger</ulink>,
which is designed to work with assembly code,
and is portable enough to run on Linux and *BSD.
It is already functional and should be the right choice, check it out!
</para>

<para>
You can also try <command>gdb</command> ;).
Although it is source-level debugger, it can be used to debug
pure assembly code, and with some trickery you can make
<command>gdb</command> to do what you need.
Here's an answer from <ulink url="mailto:dl@gazeta.ru">Dmitry Bakhvalov</ulink>:
</para>

<para><screen>
Personally, I use gdb for debugging asmutils. Try this:
 
1) Use the following stuff to compile:
   $ nasm -f elf -g smth.asm
   $ ld -o smth smth.o

2) Fire up gdb:
   $ gdb smth

3) In gdb:
   (gdb) disassemble _start
   Place a breakpoint at _start+1 (If placed at _start the breakpoint
   wouldnt work, dunno why)
   (gdb) b *0x8048075

   To step thru the code I use the following macro:
   (gdb)define n
   >ni
   >printf "eax=%x ebx=%x ...etc...",$eax,$ebx,...etc...
   >disassemble $pc $pc+15
   >end

   Then start the program with r command and debug with n.

   Hope this helps.
</screen></para>

<para>
An additional note from ???:
</para>

<para><screen>
    I have such a macro in my .gdbinit for quite some time now, and it
    for sure makes life easier. A small difference : I use "x /8i $pc",
    which guarantee a fixed number of disassembled instructions. Then,
    with a well chosen size for my xterm, gdb output looks like it is
    refreshed, and not scrolling.
</screen></para>

<para>
If you want to set breakpoints across your code, you can just use
<function>int 3</function> instruction as breakpoint
(instead of entering address manually in <command>gdb</command>).
</para>

<para>
If you're using <application>gas</application>, you should consult
<application>gas</application> and <application>gdb</application> related
<ulink url="http://linuxassembly.org/resources.html#tutorials">tutorials</ulink>.
</para>

</answer>

</qandaentry>

<qandaentry>

<question><para>Any other useful debugging tools?</para></question>

<answer><para>
Definitely <command>strace</command> can help a lot
(<command>ktrace</command> and <command>kdump</command>
on FreeBSD),
it is used to trace system calls and signals.
Read its manual page (<command>man strace</command>) and
<command>strace --help</command> output for details.
</para></answer>

</qandaentry>

<qandaentry>

<question><para>
How do I access BIOS functions from Linux (BSD, BeOS, etc)?
</para></question>

<answer><para>
Noway. This is protected mode, use OS services instead.
Again, you can't use <function>int 0x10</function>,
<function>int 0x13</function>, etc.
Fortunately almost everything can be implemented
by means of system calls or library functions.
In the worst case you may go through direct port access,
or make a kernel patch to implement needed functionality.
</para></answer>

</qandaentry>

<qandaentry>

<question><para>
Is it possible to write kernel modules in assembly?
</para></question>

<answer>

<para>
Yes, indeed it is. While in general it is not a good idea
(it hardly will speedup anything), there may be a need of such wizardy. 
The process of writing a module itself is not that hard --
a module must have some predefined global function,
it may also need to call some external functions from the kernel.
Examine kernel source code (that can be built as module) for details.
</para>

<para>
Meanwhile, here's an example of a minimum dumb kernel module
(<filename>module.asm</filename>)
(source is based on example by mammon_ from APJ #8):
</para>

<para><programlisting>
section .text

	global init_module
	global cleanup_module
	global kernel_version

	extern printk

init_module:
	push	dword str1
	call	printk
	pop	eax
	xor	eax,eax
	ret

cleanup_module:
	push	dword str2
	call	printk
	pop	eax
	ret
	
str1		db	"init_module done",0xa,0
str2		db	"cleanup_module done",0xa,0

kernel_version	db	"2.2.18",0
</programlisting></para>

<para>
The only thing this example does is reporting its actions.
Modify <filename>kernel_version</filename> to match yours, and build module with:
</para>

<para><screen>
$ nasm -f elf -o module.m module.asm
</screen></para>

<para><screen>
$ ld -r -o module.o module.m
</screen></para>

<para>
Now you can play with it using <command>insmod/rmmod/lsmod</command>
(root privilidged are required); a lot of fun, huh?
</para>

</answer></qandaentry>

</qandaset>

<para>
<emphasis>That's all for now, folks</emphasis>.
</para>

</chapter>

<!--
	end
-->


<appendix id="a-history"><title>History</title>
<?html-filename history.html>

<para>
Each version includes a few fixes and minor corrections,
that need not to be repeatedly mentioned every time.
</para>

<para><revhistory>

<revision>
<revnumber>0.6</revnumber><date>11 Nov 2000</date><authorinitials>konst</authorinitials>
<revremark>
HOWTO is completely rewritten using DocBook DTD.
Layout is totally rearranged;
too much changes to list them here.
</revremark>
</revision>

<revision>
<revnumber>0.5n</revnumber><date>07 Nov 2000</date><authorinitials>konst</authorinitials>
<revremark>
Added question regarding kernel modules to &s-faq;,
fixed NASM URLs, GAS has Intel syntax too
</revremark>
</revision>

<revision>
<revnumber>0.5m</revnumber><date>22 Oct 2000</date><authorinitials>konst</authorinitials>
<revremark>
Linux 2.4 system calls can have 6 args,
Added ALD note to &s-faq;,
fixed mailing list subscribe address
</revremark>
</revision>

<revision>
<revnumber>0.5l</revnumber><date>23 Aug 2000</date><authorinitials>konst</authorinitials>
<revremark>Added TDASM, updates on NASM</revremark>
</revision>

<revision>
<revnumber>0.5k</revnumber><date>11 Jul 2000</date><authorinitials>konst</authorinitials>
<revremark>Few additions to FAQ</revremark>
</revision>

<revision>
<revnumber>0.5j</revnumber><date>14 Jun 2000</date><authorinitials>konst</authorinitials>
<revremark>
Complete rearrangement of &s-intro; and &s-res; sections.
&s-faq; added to &s-res;, misc cleanups and additions.
</revremark>
</revision>

<revision>
<revnumber>0.5i</revnumber><date>04 May 2000</date><authorinitials>konst</authorinitials>
<revremark>
Added HLA, TALC;
rearrangements in &s-res;, &s-quick; &s-assem; sections. Few new pointers.
</revremark>
</revision>

<revision>
<revnumber>0.5h</revnumber><date>09 Apr 2000</date><authorinitials>konst</authorinitials>
<revremark>
finally managed to state LDP license on document,
new resources added, misc fixes
</revremark>
</revision>

<revision>
<revnumber>0.5g</revnumber><date>26 Mar 2000</date><authorinitials>konst</authorinitials>
<revremark>new resources on different CPUs</revremark>
</revision>

<revision>
<revnumber>0.5f</revnumber><date>02 Mar 2000</date><authorinitials>konst</authorinitials>
<revremark>new resources, misc corrections</revremark>
</revision>

<revision>
<revnumber>0.5e</revnumber><date>10 Feb 2000</date><authorinitials>konst</authorinitials>
<revremark>URL updates, changes in GAS example</revremark>
</revision>

<revision>
<revnumber>0.5d</revnumber><date>01 Feb 2000</date><authorinitials>konst</authorinitials>
<revremark>
&s-res; (former "Pointers") section completely redone,
various URL updates.
</revremark>
</revision>

<revision>
<revnumber>0.5c</revnumber><date>05 Dec 1999</date><authorinitials>konst</authorinitials>
<revremark>
New pointers, updates and some rearrangements.
Rewrite of sgml source.
</revremark>
</revision>

<revision>
<revnumber>0.5b</revnumber><date>19 Sep 1999</date><authorinitials>konst</authorinitials>
<revremark>
Discussion about libc or not libc continues.
New web pointers and and overall updates.
</revremark>
</revision>

<revision>
<revnumber>0.5a</revnumber><date>01 Aug 1999</date><authorinitials>konst</authorinitials>
<revremark>
&s-quick; section rearranged, added GAS example.
Several new web pointers.
</revremark>
</revision>

<revision>
<revnumber>0.5</revnumber><date>01 Aug 1999</date>
<authorinitials>konst</authorinitials>
<authorinitials>fare</authorinitials>
<revremark>
GAS has 16-bit mode.
New maintainer (at last): Konstantin Boldyshev.
Discussion about libc or not libc.
Added &s-quick; section with examples of assembly code.
</revremark>
</revision>

<revision>
<revnumber>0.4q</revnumber><date>22 Jun 1999</date><authorinitials>fare</authorinitials>
<revremark>
process argument passing (argc, argv, environ) in assembly.
This is yet another
"last release by Fare before new maintainer takes over".
Nobody knows who might be the new maintainer.
</revremark>
</revision>

<revision>
<revnumber>0.4p</revnumber><date>06 Jun 1999</date><authorinitials>fare</authorinitials>
<revremark>clean up and updates</revremark>
</revision>

<revision>
<revnumber>0.4o</revnumber><date>01 Dec 1998</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.4m</revnumber><date>23 Mar 1998</date><authorinitials>fare</authorinitials>
<revremark>corrections about gcc invocation</revremark>
</revision>

<revision>
<revnumber>0.4l</revnumber><date>16 Nov 1997</date><authorinitials>fare</authorinitials>
<revremark>release for LSL 6th edition</revremark>
</revision>

<revision>
<revnumber>0.4k</revnumber><date>19 Oct 1997</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.4j</revnumber><date>07 Sep 1997</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.4i</revnumber><date>17 Jul 1997</date><authorinitials>fare</authorinitials>
<revremark>info on 16-bit mode access from Linux</revremark>
</revision>

<revision>
<revnumber>0.4h</revnumber><date>19 Jun 1997</date><authorinitials>fare</authorinitials>
<revremark>
still more on "how not to use assembly";
updates on NASM, GAS.
</revremark>
</revision>

<revision>
<revnumber>0.4g</revnumber><date>30 Mar 1997</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.4f</revnumber><date>20 Mar 1997</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.4e</revnumber><date>13 Mar 1997</date><authorinitials>fare</authorinitials>
<revremark>Release for DrLinux</revremark>
</revision>

<revision>
<revnumber>0.4d</revnumber><date>28 Feb 1997</date><authorinitials>fare</authorinitials>
<revremark>Vapor announce of a new Assembly-HOWTO maintainer</revremark>
</revision>

<revision>
<revnumber>0.4c</revnumber><date>09 Feb 1997</date>
<authorinitials>fare</authorinitials>
<revremark>Added section &s-doyou;.</revremark>
</revision>

<revision>
<revnumber>0.4b</revnumber><date>03 Feb 1997</date><authorinitials>fare</authorinitials>
<revremark>NASM moved: now is before AS86</revremark>
</revision>

<revision>
<revnumber>0.4a</revnumber><date>20 Jan 1997</date><authorinitials>fare</authorinitials>
<revremark>CREDITS section added</revremark>
</revision>

<revision>
<revnumber>0.4</revnumber><date>20 Jan 1997</date><authorinitials>fare</authorinitials>
<revremark>first release of the HOWTO as such</revremark>
</revision>

<revision>
<revnumber>0.4pre1</revnumber><date>13 Jan 1997</date><authorinitials>fare</authorinitials>
<revremark>
text mini-HOWTO transformed into a full linuxdoc-sgml HOWTO,
to see what the SGML tools are like
</revremark>
</revision>

<revision>
<revnumber>0.3l</revnumber><date>11 Jan 1997</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.3k</revnumber><date>19 Dec 1996</date><authorinitials>fare</authorinitials>
<revremark>What? I had forgotten to point to terse???</revremark>
</revision>

<revision>
<revnumber>0.3j</revnumber><date>24 Nov 1996</date><authorinitials>fare</authorinitials>
<revremark>point to French translated version</revremark>
</revision>

<revision>
<revnumber>0.3i</revnumber><date>16 Nov 1996</date><authorinitials>fare</authorinitials>
<revremark>NASM is getting pretty slick</revremark>
</revision>

<revision>
<revnumber>0.3h</revnumber><date>06 Nov 1996</date><authorinitials>fare</authorinitials>
<revremark>
more about cross-compiling -- See on sunsite: devel/msdos/
</revremark>
</revision>

<revision>
<revnumber>0.3g</revnumber><date>02 Nov 1996</date><authorinitials>fare</authorinitials>
<revremark>
Created the History. Added pointers in cross-compiling section.
Added section about I/O programming under Linux (particularly video).
</revremark>
</revision>

<revision>
<revnumber>0.3f</revnumber><date>17 Oct 1996</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.3c</revnumber><date>15 Jun 1996</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.2</revnumber><date>04 May 1996</date><authorinitials>fare</authorinitials>
</revision>

<revision>
<revnumber>0.1</revnumber><date>23 Apr 1996</date><authorinitials>fare</authorinitials>
<revremark>
Francois-Rene "Fare" Rideau creates and publishes the first mini-HOWTO,
because "I'm sick of answering ever the same questions
on comp.lang.asm.x86"
</revremark>
</revision>

</revhistory></para>

</appendix>


<appendix id="a-ack"><title>Acknowledgements</title>
<?html-filename acknowledgements.html>

<para>
I would like to thank all the people who have contributed ideas,
answers, remarks, and moral support, and additionally
the following persons, by order of appearance:

<itemizedlist>
<listitem><para>
<ulink URL="mailto:buried.alive@in.mail">Linus Torvalds</ulink>
for Linux
</para></listitem>
<listitem><para>
<anchor id="bde">
<ulink URL="mailto:bde@zeta.org.au">Bruce Evans</ulink>
for bcc from which as86 is extracted
</para></listitem>
<listitem><para>
<ulink URL="mailto:anakin@pobox.com">Simon Tatham</ulink> and
<ulink URL="mailto:jules@earthcorp.com">Julian Hall</ulink>
for NASM
</para></listitem>
<listitem><para>
<ulink URL="mailto:gregh@metalab.unc.edu">Greg Hankins</ulink> and now
<ulink URL="mailto:linux-howto@metalab.unc.edu">Tim Bynum</ulink>
for maintaining HOWTOs
</para></listitem>
<listitem><para>
<ulink URL="mailto:raymoon@moonware.dgsys.com">Raymond Moon</ulink>
for his FAQ
</para></listitem>
<listitem><para>
<ulink URL="mailto:dumas@linux.eu.org">Eric Dumas</ulink>
for his translation of the mini-HOWTO into French
(sad thing for the original author to be French and write in English)
</para></listitem>
<listitem><para>
<ulink URL="mailto:paul@geeky1.ebtech.net">Paul Anderson</ulink> and
<ulink URL="mailto:rahim@megsinet.net">Rahim Azizarab</ulink>
for helping me, if not for taking over the HOWTO
</para></listitem>
<listitem><para>
<ulink URL="mailto:pcg@goof.com">Marc Lehman</ulink>
for his insight on GCC invocation
</para></listitem>
<listitem><para>
<ulink URL="mailto:ams@wiw.org">Abhijit Menon-Sen</ulink>
for helping me figure out the argument passing convention
</para></listitem>
</itemizedlist>

</para>

</appendix>


<appendix id="a-endor">
<?html-filename endorsements.html>
<title>Endorsements</title>
<para>
This version of the document is endorsed by 
<link linkend="konst">Konstantin Boldyshev</link>.
</para>

<para>
Modifications (including translations) must remove this appendix
according to the license agreement included below.
</para>

<para><literal>
$Id: Assembly-HOWTO.sgml,v 1.3 2001/10/27 02:18:17 kss Exp $
</literal></para>
</appendix>


<appendix id="a-gfdl" xreflabel="GNU Free Documentation License">
<?html-filename fdl.html>
<title>GNU Free Documentation License</title>

<para><literallayout>
GNU Free Documentation License
Version 1.1, March 2000

    Copyright (C) 2000  Free Software Foundation, Inc.
    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    Everyone is permitted to copy and distribute verbatim copies
    of this license document, but changing it is not allowed.
</literallayout></para>

<para><variablelist>

<varlistentry><term>0. PREAMBLE</term><listitem>

    <para>The purpose of this License is to make a manual, textbook,
    or other written document "free" in the sense of freedom: to
    assure everyone the effective freedom to copy and redistribute it,
    with or without modifying it, either commercially or
    noncommercially.  Secondarily, this License preserves for the
    author and publisher a way to get credit for their work, while not
    being considered responsible for modifications made by
    others.</para>

    <para>This License is a kind of "copyleft", which means that
    derivative works of the document must themselves be free in the
    same sense.  It complements the GNU General Public License, which
    is a copyleft license designed for free software.</para>

    <para>We have designed this License in order to use it for manuals
    for free software, because free software needs free documentation:
    a free program should come with manuals providing the same
    freedoms that the software does.  But this License is not limited
    to software manuals; it can be used for any textual work,
    regardless of subject matter or whether it is published as a
    printed book.  We recommend this License principally for works
    whose purpose is instruction or reference.</para>

</listitem></varlistentry>
<varlistentry><term>1. APPLICABILITY AND DEFINITIONS</term><listitem>

    <para>This License applies to any manual or other work that
    contains a notice placed by the copyright holder saying it can be
    distributed under the terms of this License.  The "Document",
    below, refers to any such manual or work.  Any member of the
    public is a licensee, and is addressed as "you".</para>

    <para>A "Modified Version" of the Document means any work
    containing the Document or a portion of it, either copied
    verbatim, or with modifications and/or translated into another
    language.</para>

    <para>A "Secondary Section" is a named appendix or a front-matter
    section of the Document that deals exclusively with the
    relationship of the publishers or authors of the Document to the
    Document's overall subject (or to related matters) and contains
    nothing that could fall directly within that overall subject.
    (For example, if the Document is in part a textbook of
    mathematics, a Secondary Section may not explain any mathematics.)
    The relationship could be a matter of historical connection with
    the subject or with related matters, or of legal, commercial,
    philosophical, ethical or political position regarding
    them.</para>

    <para>The "Invariant Sections" are certain Secondary Sections
    whose titles are designated, as being those of Invariant Sections,
    in the notice that says that the Document is released under this
    License.</para>

    <para>The "Cover Texts" are certain short passages of text that
    are listed, as Front-Cover Texts or Back-Cover Texts, in the
    notice that says that the Document is released under this
    License.</para>

    <para>A "Transparent" copy of the Document means a
    machine-readable copy, represented in a format whose specification
    is available to the general public, whose contents can be viewed
    and edited directly and straightforwardly with generic text
    editors or (for images composed of pixels) generic paint programs
    or (for drawings) some widely available drawing editor, and that
    is suitable for input to text formatters or for automatic
    translation to a variety of formats suitable for input to text
    formatters.  A copy made in an otherwise Transparent file format
    whose markup has been designed to thwart or discourage subsequent
    modification by readers is not Transparent.  A copy that is not
    "Transparent" is called "Opaque".</para>

    <para>Examples of suitable formats for Transparent copies include
    plain ASCII without markup, Texinfo input format, LaTeX input
    format, SGML or XML using a publicly available DTD, and
    standard-conforming simple HTML designed for human modification.
    Opaque formats include PostScript, PDF, proprietary formats that
    can be read and edited only by proprietary word processors, SGML
    or XML for which the DTD and/or processing tools are not generally
    available, and the machine-generated HTML produced by some word
    processors for output purposes only.</para>

    <para>The "Title Page" means, for a printed book, the title page
    itself, plus such following pages as are needed to hold, legibly,
    the material this License requires to appear in the title page.
    For works in formats which do not have any title page as such,
    "Title Page" means the text near the most prominent appearance of
    the work's title, preceding the beginning of the body of the
    text.</para>

</listitem></varlistentry>
<varlistentry><term>2. VERBATIM COPYING</term><listitem>

    <para>You may copy and distribute the Document in any medium,
    either commercially or noncommercially, provided that this
    License, the copyright notices, and the license notice saying this
    License applies to the Document are reproduced in all copies, and
    that you add no other conditions whatsoever to those of this
    License.  You may not use technical measures to obstruct or
    control the reading or further copying of the copies you make or
    distribute.  However, you may accept compensation in exchange for
    copies.  If you distribute a large enough number of copies you
    must also follow the conditions in section 3.</para>

    <para>You may also lend copies, under the same conditions stated
    above, and you may publicly display copies.</para>

</listitem></varlistentry>
<varlistentry><term>3. COPYING IN QUANTITY</term><listitem>

    <para>If you publish printed copies of the Document numbering more
    than 100, and the Document's license notice requires Cover Texts,
    you must enclose the copies in covers that carry, clearly and
    legibly, all these Cover Texts: Front-Cover Texts on the front
    cover, and Back-Cover Texts on the back cover.  Both covers must
    also clearly and legibly identify you as the publisher of these
    copies.  The front cover must present the full title with all
    words of the title equally prominent and visible.  You may add
    other material on the covers in addition.  Copying with changes
    limited to the covers, as long as they preserve the title of the
    Document and satisfy these conditions, can be treated as verbatim
    copying in other respects.</para>

    <para>If the required texts for either cover are too voluminous to
    fit legibly, you should put the first ones listed (as many as fit
    reasonably) on the actual cover, and continue the rest onto
    adjacent pages.</para>

    <para>If you publish or distribute Opaque copies of the Document
    numbering more than 100, you must either include a
    machine-readable Transparent copy along with each Opaque copy, or
    state in or with each Opaque copy a publicly-accessible
    computer-network location containing a complete Transparent copy
    of the Document, free of added material, which the general
    network-using public has access to download anonymously at no
    charge using public-standard network protocols.  If you use the
    latter option, you must take reasonably prudent steps, when you
    begin distribution of Opaque copies in quantity, to ensure that
    this Transparent copy will remain thus accessible at the stated
    location until at least one year after the last time you
    distribute an Opaque copy (directly or through your agents or
    retailers) of that edition to the public.</para>

    <para>It is requested, but not required, that you contact the
    authors of the Document well before redistributing any large
    number of copies, to give them a chance to provide you with an
    updated version of the Document.</para>

</listitem></varlistentry>
<varlistentry><term>4. MODIFICATIONS</term><listitem>

    <para>You may copy and distribute a Modified Version of the
    Document under the conditions of sections 2 and 3 above, provided
    that you release the Modified Version under precisely this
    License, with the Modified Version filling the role of the
    Document, thus licensing distribution and modification of the
    Modified Version to whoever possesses a copy of it.  In addition,
    you must do these things in the Modified Version:</para>

    <orderedlist numeration="upperalpha">
      <listitem><para>Use in the Title Page
      (and on the covers, if any) a title distinct from that of the
      Document, and from those of previous versions (which should, if
      there were any, be listed in the History section of the
      Document).  You may use the same title as a previous version if
      the original publisher of that version gives permission.</para>
      </listitem>

      <listitem><para>List on the Title Page,
      as authors, one or more persons or entities responsible for
      authorship of the modifications in the Modified Version,
      together with at least five of the principal authors of the
      Document (all of its principal authors, if it has less than
      five).</para>
      </listitem>

      <listitem><para>State on the Title page
      the name of the publisher of the Modified Version, as the
      publisher.</para>
      </listitem>

      <listitem><para>Preserve all the
      copyright notices of the Document.</para>
      </listitem>

      <listitem><para>Add an appropriate
      copyright notice for your modifications adjacent to the other
      copyright notices.</para>
      </listitem>

      <listitem><para>Include, immediately
      after the copyright notices, a license notice giving the public
      permission to use the Modified Version under the terms of this
      License, in the form shown in the Addendum below.</para>
      </listitem>

      <listitem><para>Preserve in that license
      notice the full lists of Invariant Sections and required Cover
      Texts given in the Document's license notice.</para>
      </listitem>

      <listitem><para>Include an unaltered
      copy of this License.</para>
      </listitem>

      <listitem><para>Preserve the section
      entitled "History", and its title, and add to it an item stating
      at least the title, year, new authors, and publisher of the
      Modified Version as given on the Title Page.  If there is no
      section entitled "History" in the Document, create one stating
      the title, year, authors, and publisher of the Document as given
      on its Title Page, then add an item describing the Modified
      Version as stated in the previous sentence.</para>
      </listitem>

      <listitem><para>Preserve the network
      location, if any, given in the Document for public access to a
      Transparent copy of the Document, and likewise the network
      locations given in the Document for previous versions it was
      based on.  These may be placed in the "History" section.  You
      may omit a network location for a work that was published at
      least four years before the Document itself, or if the original
      publisher of the version it refers to gives permission.</para>
      </listitem>

      <listitem><para>In any section entitled
      "Acknowledgements" or "Dedications", preserve the section's
      title, and preserve in the section all the substance and tone of
      each of the contributor acknowledgements and/or dedications
      given therein.</para>
      </listitem>

      <listitem><para>Preserve all the
      Invariant Sections of the Document, unaltered in their text and
      in their titles.  Section numbers or the equivalent are not
      considered part of the section titles.</para>
      </listitem>

      <listitem><para>Delete any section
      entitled "Endorsements".  Such a section may not be included in
      the Modified Version.</para>
      </listitem>

      <listitem><para>Do not retitle any
      existing section as "Endorsements" or to conflict in title with
      any Invariant Section.</para>
      </listitem>
    </orderedlist>
    
    <para>If the Modified Version includes new front-matter sections
    or appendices that qualify as Secondary Sections and contain no
    material copied from the Document, you may at your option
    designate some or all of these sections as invariant.  To do this,
    add their titles to the list of Invariant Sections in the Modified
    Version's license notice.  These titles must be distinct from any
    other section titles.</para>

    <para>You may add a section entitled "Endorsements", provided it
    contains nothing but endorsements of your Modified Version by
    various parties--for example, statements of peer review or that
    the text has been approved by an organization as the authoritative
    definition of a standard.</para>

    <para>You may add a passage of up to five words as a Front-Cover
    Text, and a passage of up to 25 words as a Back-Cover Text, to the
    end of the list of Cover Texts in the Modified Version.  Only one
    passage of Front-Cover Text and one of Back-Cover Text may be
    added by (or through arrangements made by) any one entity.  If the
    Document already includes a cover text for the same cover,
    previously added by you or by arrangement made by the same entity
    you are acting on behalf of, you may not add another; but you may
    replace the old one, on explicit permission from the previous
    publisher that added the old one.</para>

    <para>The author(s) and publisher(s) of the Document do not by
    this License give permission to use their names for publicity for
    or to assert or imply endorsement of any Modified Version.</para>

</listitem></varlistentry>
<varlistentry><term>5. COMBINING DOCUMENTS</term><listitem>

    <para>You may combine the Document with other documents released
    under this License, under the terms defined in section 4 above for
    modified versions, provided that you include in the combination
    all of the Invariant Sections of all of the original documents,
    unmodified, and list them all as Invariant Sections of your
    combined work in its license notice.</para>

    <para>The combined work need only contain one copy of this
    License, and multiple identical Invariant Sections may be replaced
    with a single copy.  If there are multiple Invariant Sections with
    the same name but different contents, make the title of each such
    section unique by adding at the end of it, in parentheses, the
    name of the original author or publisher of that section if known,
    or else a unique number.  Make the same adjustment to the section
    titles in the list of Invariant Sections in the license notice of
    the combined work.</para>

    <para>In the combination, you must combine any sections entitled
    "History" in the various original documents, forming one section
    entitled "History"; likewise combine any sections entitled
    "Acknowledgements", and any sections entitled "Dedications".  You
    must delete all sections entitled "Endorsements."</para>

</listitem></varlistentry>
<varlistentry><term>6. COLLECTIONS OF DOCUMENTS</term><listitem>

    <para>You may make a collection consisting of the Document and
    other documents released under this License, and replace the
    individual copies of this License in the various documents with a
    single copy that is included in the collection, provided that you
    follow the rules of this License for verbatim copying of each of
    the documents in all other respects.</para>

    <para>You may extract a single document from such a collection,
    and distribute it individually under this License, provided you
    insert a copy of this License into the extracted document, and
    follow this License in all other respects regarding verbatim
    copying of that document.</para>

</listitem></varlistentry>
<varlistentry><term>7. AGGREGATION WITH INDEPENDENT WORKS</term><listitem>

    <para>A compilation of the Document or its derivatives with other
    separate and independent documents or works, in or on a volume of
    a storage or distribution medium, does not as a whole count as a
    Modified Version of the Document, provided no compilation
    copyright is claimed for the compilation.  Such a compilation is
    called an "aggregate", and this License does not apply to the
    other self-contained works thus compiled with the Document, on
    account of their being thus compiled, if they are not themselves
    derivative works of the Document.</para>

    <para>If the Cover Text requirement of section 3 is applicable to
    these copies of the Document, then if the Document is less than
    one quarter of the entire aggregate, the Document's Cover Texts
    may be placed on covers that surround only the Document within the
    aggregate.  Otherwise they must appear on covers around the whole
    aggregate.</para>

</listitem></varlistentry>
<varlistentry><term>8. TRANSLATION</term><listitem>

    <para>Translation is considered a kind of modification, so you may
    distribute translations of the Document under the terms of section
    4.  Replacing Invariant Sections with translations requires
    special permission from their copyright holders, but you may
    include translations of some or all Invariant Sections in addition
    to the original versions of these Invariant Sections.  You may
    include a translation of this License provided that you also
    include the original English version of this License.  In case of
    a disagreement between the translation and the original English
    version of this License, the original English version will
    prevail.</para>

</listitem></varlistentry>
<varlistentry><term>9. TERMINATION</term><listitem>

    <para>You may not copy, modify, sublicense, or distribute the
    Document except as expressly provided for under this License.  Any
    other attempt to copy, modify, sublicense or distribute the
    Document is void, and will automatically terminate your rights
    under this License.  However, parties who have received copies, or
    rights, from you under this License will not have their licenses
    terminated so long as such parties remain in full
    compliance.</para>

</listitem></varlistentry>
<varlistentry><term>10. FUTURE REVISIONS OF THIS LICENSE</term><listitem>

    <para>The Free Software Foundation may publish new, revised
    versions of the GNU Free Documentation License from time to time.
    Such new versions will be similar in spirit to the present
    version, but may differ in detail to address new problems or
    concerns.  See <ulink
    url="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</ulink>.</para>

    <para>Each version of the License is given a distinguishing
    version number.  If the Document specifies that a particular
    numbered version of this License "or any later version" applies to
    it, you have the option of following the terms and conditions
    either of that specified version or of any later version that has
    been published (not as a draft) by the Free Software Foundation.
    If the Document does not specify a version number of this License,
    you may choose any version ever published (not as a draft) by the
    Free Software Foundation.</para>

</listitem></varlistentry>
<varlistentry><term>How to use this License for your documents</term>
<listitem>

    <para>To use this License in a document you have written, include
    a copy of the License in the document and put the following
    copyright and license notices just after the title page:</para>

<para><literallayout>
      Copyright (c)  YEAR  YOUR NAME.
      Permission is granted to copy, distribute and/or modify this document
      under the terms of the GNU Free Documentation License, Version 1.1
      or any later version published by the Free Software Foundation;
      with the Invariant Sections being LIST THEIR TITLES, with the
      Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
      A copy of the license is included in the section entitled "GNU
      Free Documentation License".
</literallayout></para>

    <para>If you have no Invariant Sections, write "with no Invariant
    Sections" instead of saying which ones are invariant.  If you have
    no Front-Cover Texts, write "no Front-Cover Texts" instead of
    "Front-Cover Texts being LIST"; likewise for Back-Cover
    Texts.</para>

    <para>If your document contains nontrivial examples of program
    code, we recommend releasing these examples in parallel under your
    choice of free software license, such as the GNU General Public
    License, to permit their use in free software.</para>

</listitem></varlistentry>

</variablelist></para>

</appendix>  

</book>
