3.5. ´Ù¸¥ ¾î¼Àºí·¯µé

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

3.5.1. Win32Forth ¾î¼Àºí·¯

Win32Forth ´Â free 32-bit ANS FORTH system ÀÌ´Ù. Win32 ȯ°æ, Áï, À©95, À©NT µî¿¡¼­ ¼º°øÀûÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ´Â ¾î¼Àºí·¯ÀÌ´Ù. ÀÌ ¾î¼Àºí·¯´Â reflective FORTH language ¿¡ Æ÷ÇԵǾî ÀÖ´Â °ø°³ 32ºñÆ® ¾î¼Àºí·¯ÀÌ´Ù. (¹®¹ýÀº prefix ³ª postfix ¸ðµÎ¸¦ Áö¿øÇÑ´Ù) ¸ÅÅ©·Î ÇÁ·Î¼¼½Ìµµ reflective language FORTH ÀÇ ´É·Â ÇÏ¿¡¼­ ¼º°øÀûÀ¸·Î Àß Áö¿øµÈ´Ù. ±×·¯³ª, ´ÜÁ¡ÀÌ ÀÖ´Ù¸é, Áö¿øµÇ´Â ÀÔ.Ãâ·Â ³»¿ëÀÌ Win32Forth ¿¡¼­¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù. (.obj ÆÄÀÏ·ÎÀÇ ´ýÇÁ´Â ¾ø´Ù. ±×·¯³ª ¿©·¯ºÐÀÌ ÇÊ¿äÇÏ´Ù¸é ±×·¯ÇÑ ±â´ÉÀ» Ãß°¡ÇÒ ¼ö ÀÖ´Ù) ÀÌ ¾î¼Àºí·¯¸¦ ãÀ» ¼ö ÀÖ´Â Àå¼Ò´Â ´ÙÀ½°ú °°´Ù : ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/.

Win32Forth is a free 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 .obj file, but you could add that feature yourself, of course). Find it at ftp://ftp.forth.org/pub/Forth/Compilers/native/windows/Win32For/.

3.5.2. TDASM

TDASM (the Table Driven Assembler) Àº ¾î¶² ¾î¼Àºí¸® ¾ð¾î·Îµµ Æ÷ÆÃÀÌ °¡´ÉÇÑ °ø°³ ¾î¼Àºí·¯ÀÌ´Ù. ÀÌ ¾î¼Àºí·¯´Â Ÿ°ÙÀÌ µÇ´Â ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­°¡ ¹«¾ùÀÌµç °£¿¡ ±×¿¡ ÇØ´çÇÏ´Â ÄÄÆÄÀÏ ÀÛ¾÷À» Á¤ÀÇÇÏ´Â Å×À̺íÀ» ÀÌ¿ëÇÏ¿©¼­ ÇØ´ç ¸¶ÀÌÅ©·ÎÇÁ·Î¼¼¼­ÀÇ ÄÄÆÄÀÏ·¯·Î »ç¿ëÀÌ °¡´ÉÇÑ ¾î¼Àºí·¯ÀÌ´Ù.

The Table Driven Assembler (TDASM) is a free 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.

±¸ÇÒ ¼ö ÀÖ´Â Àå¼Ò´Â http://www.penguin.cz/~niki/tdasm/ ÀÌ´Ù.

3.5.3. Terse

Terse ´Â x86 °è¿­À» À§ÇÑ °¡Àå ÄÄÆÑÆ®ÇÑ ¾î¼Àºí·¯ ¹®¹ýÀ» °¡Áö°í ÀÖ´Â ÇÁ·Î±×·¡¹Ö ÅøÀÌ´Ù. ÇÏÁö¸¸, ÀÌ ¾î¼Àºí·¯´Â evil proprietary software ÀÌ´Ù (¿ªÀÚÁÖ:¸¶¶¥ÇÑ ¸»À» ¸øÃ£¾Ò½À´Ï´Ù) ÀÌ ¾î¼Àºí·¯ÀÇ °ø°³ Ŭ·ÐÀ» ¸¸µå´Â ÇÁ·ÎÁ§Æ®°¡ ÀÖ¾ú´Ù°í´Â Çϴµ¥, Áö±ÝÀº ´õÀÌ»ó °³¹ßµÇÁö ¾Ê´Â °ÍÀ¸·Î ÇÊÀÚ´Â ¾Ë°í ÀÖ´Ù. ¸¸¾à ¿©·¯ºÐÀÌ terse ¿Í ºñ½ÁÇÑ ¹®¹ýÀ» °¡Áø ¾î¼Àºí·¯¸¦ ã´Â´Ù¸é, NASM ÀÇ ÇÁ·ÐÆ®¿£µå·Î ±× ¹®¹ýÀ» °³¹ßÇÏ¸é µÉ °ÍÀÌ´Ù. °ü½ÉÀÖ´Ù¸é, comp.compilers ¿¡¼­ ¿ª»çÀûÀÎ ÅäÀǵé(?)À» ÈȾ ¼ö ÀÖÀ» °ÍÀÌ´Ù.

    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"
    

3.5.4. HLA

HLA ´Â High Level Assembly language ÀÇ ¾àÀÚÀÌ´Ù. ÀÌ ¾î¼Àºí·¯´Â º¯¼ö ¼±¾ðÀ̳ª ÇÔ¼ö ¼±¾ð, ÇÔ¼ö È£Ãâ°ú °°Àº ºÎºÐ¿¡¼­ ÆÄ½ºÄ®À̳ª C/C++ °ú °°Àº °í±Þ¾ð¾î¿Í ¸Å¿ì ºñ½ÁÇÑ ¹®¹ýÀ» »ç¿ëÇÑ´Ù. ±×¸®°í ÀÌ ¾î¼Àºí·¯´Â Ç¥ÁØ ¸Ó½Å ÀνºÆ®·°¼ÇÀ» À§ÇÑ ¼öÁ¤µÈ ¾î¼Àºí¸® ¾ð¾î ¹®¹ýÀ» »ç¿ëÇÑ´Ù. ¶ÇÇÑ if, while, repeat, until µî°ú °°Àº °í±Þ¾ð¾î¿¡¼­ Á¦°øÇÏ´Â Á¦¾î ±¸Á¶¸¦ °¡Áø´Ù.

HLA ´Â free ÀÌÁö¸¸, Win32 ȯ°æ¿¡¼­¸¸ µ¿ÀÛÇÑ´Ù. HLA ´Â MASM ¿ëÀÇ Äڵ带 »ý»êÇϱ⠶§¹®¿¡ ¸ñÀûÆÄÀÏÀ» »ý¼ºÇϱâ À§ÇÑ ÃÖÁ¾ ¾î¼Àºí¸µ°ú ¸µÅ·À» À§ÇØ ¿©·¯ºÐÀº MASM °ú MS-link ÀÇ 32ºñÆ® ¹öÁ¯ÀÌ ÇÊ¿äÇÏ´Ù. ±×·¯³ª, HLA ÀÇ MASM ¹öÁ¯ÀÇ Ãâ·ÂÀ» TASM ¿¡¼­ ÄÄÆÄÀÏ µÉ ¼ö ÀÖµµ·Ï º¯È¯ÇØÁÖ´Â m2t Æ÷½ºÆ® ÇÁ·Î¼¼¼­ ÇÁ·Î±×·¥µµ µû¶ó¿Â´Ù. ºÒÇàÈ÷µµ, NASM Àº Áö¿øµÇÁö ¾Ê´Â´Ù.

3.5.5. TALC

TALC ´Â ¶Ç´Ù¸¥ MASM/Win32 ±â¹ÝÀÇ °ø°³ ÄÄÆÄÀÏ·¯ÀÌ´Ù. (±×·³¿¡µµ ºÒ±¸Çϰí, ELF Çü½ÄÀÇ Ãâ·Âµµ Áö¿øÇÏ´Â °Í °°´Ù)

TAL Àº Typed Assembly Language ÀÇ ¾àÀÚÀÌ´Ù. (¿ªÀÚÁÖ:Á¤¸».. ¾Æ·¡ÀÇ ¹®ÀåµéÀº Àü¹®ÀûÀÎ ¿ë¾î¶ó.. ¹ø¿ªÀÌ Èûµé±º¿ä.. ´©±º°¡ ¹ø¿ªÇØÁÖ½Ç ºÐÀº... ªÀ¸´Ï±î Àú¿¡°Ô ¸ÞÀÏ ÁֽʽÿÀ. ¹Ý¿µÇϰڽÀ´Ï´Ù) 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.

3.5.6. x86 ¿ëÀÇ ÇÁ¸®°¡ ¾Æ´Ï°Å³ª 32ºñÆ®°¡ ¾Æ´Ñ ¾î¼Àºí·¯µé

¿©·¯ºÐÀº Raymond Moon's x86 assembly FAQ ¿¡¼­ x86 ¾î¼Àºí¸® ÇÁ·Î±×·¡¹ÖÀÇ ±âÃÊÀûÀÎ Áö½Ä°ú ÇÔ²² ±×·¯ÇÑ ¾î¼Àºí¸®¿¡ ´ëÇØ º¸´Ù ¸¹Àº ÀÚ·áµéÀ» ãÀ» ¼ö ÀÖ´Ù.

Note : ¸ðµç µµ½º ±â¹ÝÀÇ ¾î¼Àºí·¯µéÀº ¸®´ª½ºÀÇ DOS ¿¡¹Ä·¹ÀÌÅ͸¦ ÅëÇØ¼­ »ç¿ëµÇ¾î¾ß ÇÑ´Ù. ÃÖ±ÙÀÇ µµ½º ±â¹ÝÀÇ ¾î¼Àºí·¯µéÀº GNU BFD ¶óÀ̺귯¸®¿¡¼­ Áö¿øÇÏ´Â COFF ³ª ´Ù¸¥ ¸ñÀû ÆÄÀÏ Æ÷¸ËµéÀ» Áö¿øÇϱ⠶§¹®¿¡ ¿©·¯ºÐÀº ±×·¯ÇÑ ¾î¼Àºí·¯µéÀ» ´Ù¸¥ °ø°³ÀÇ 32ºñÆ® Åøµé°ú ÇÔ²² »ç¿ëÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù. ¾Æ¸¶µµ GNU objcopy(binutils ÆÐŰÁö¿¡ ÀÖ´Ù) ¸¦ º¯È¯¿ë ÇÊÅÍ·Î ÀÌ¿ëÇÒ ¼öµµ ÀÖÀ» °ÍÀÌ´Ù.