High-level assembler
|
High-level assemblers are assembly language translators that incorporate features found in modern high-level languages into an assembler (compiler for an assembly language).
Examples of high-level assemblers include Microsoft's MASM, Borland's TASM, and the High Level Assembler (HLA).
HLA is a public-domain, open-source system for processing high-level assembly language for the x86 processor. It currently runs under Windows and Linux. It includes a massive library of subroutines (The HLA "Standard Library") and programs written in HLA are immediately portable between Windows and Linux with nothing more than a recompile.
HLA has the most powerful macro and compile-time language facilities of any x86 assembler currently available.
High level assemblers typically provide all the usual low-level machine instructions, plus statements like IF, WHILE, REPEAT..UNTIL, and FOR, in their base language. This allows assembly programmers to use high-level control statement abstractions wherever maximal speed or minimal space is not absolutely required and drop down to low-level machine code when fast or short code is desirable. The end result is assembly source code that is far more readable than standard assembly code while preserving the efficiency inherent with using assembly language.
High-level assemblers generally provide information hiding facilities (though their capabilities vary by assembler) and the ability to call functions and procedures using a high-level-like syntax (i.e., the assembler automatically emits code to push parameters on the stack rather than the programmer having to manually write the code to do this).
In addition to high level control structures, high-level assemblers also provide data abstractions normally found in high level languages. Examples include structures, unions, classes, and sets. Some high level assemblers (e.g., TASM and HLA) even support object oriented programming.
David Salomon's book Assemblers and Loaders presents definitions and examples of older high-level assemblers. Those wanting to program in a high-level assembly language on the x86 PC should check out the HLA and MASM32 packages (See webster.cs.ucr.edu below) as well as Randall Hyde's "The Art of Assembly Language".
External links
- Information on HLA and assembler (http://webster.cs.ucr.edu)
- Publisher of "The Art of Assembly Language" (http://www.nostarch.com)
- "Terse: Algebraic Assembly Language for x86" (http://terse.com/)