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

HLAHigh 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 패키지에 있다) 를 변환용 필터로 이용할 수도 있을 것이다.