HLA
High Level Assembly, a teaching-oriented x86 assembly language created by Randall Hyde that blends low-level instructions with high-level control structures, data types, and an extensive standard library.
Created by Randall Hyde
HLA (High Level Assembly) is an x86 assembly language designed by Randall Hyde that combines the raw instruction-level control of traditional assembly with high-level control structures, a rich type system, and an extensive standard library. Unlike conventional assemblers, HLA provides constructs such as if/elseif/else, while, for, repeat..until, and switch/case statements as built-in language features, along with records, unions, classes, and a powerful compile-time macro system. The language was created primarily as a pedagogical tool to teach assembly language programming at the university level, and serves as the companion language for Hyde’s textbook The Art of Assembly Language.
History & Origins
Background: The Art of Assembly Language
Randall Hyde, a longtime assembly language instructor at the University of California, Riverside, originally wrote a set of teaching materials titled The Art of Assembly Language in the late 1980s and early 1990s. The original work targeted 16-bit 8086 assembly under DOS and was widely circulated online as one of the first comprehensive free assembly language textbooks. As the computing world shifted toward 32-bit protected-mode programming on Windows and Linux, Hyde began to consider how to update the curriculum.
Creation of HLA
Hyde started designing HLA at UC Riverside around 1996. His observation was that students new to assembly often struggled less with the actual machine instructions than with the surrounding overhead of writing assembly programs in MASM or TASM: declaring data segments, structuring control flow with conditional jumps, and managing the call/return conventions of the underlying assembler. HLA was designed to flatten that learning curve by introducing high-level syntactic conveniences on top of standard x86 instructions, while still requiring the student to think in terms of registers, memory, and machine-level operations.
The first public prototype of HLA, Version 1.0, was released in 1999 for Windows and DOS. A Linux port followed in 2002, and the language eventually grew to reportedly support FreeBSD and macOS as well. In 2003, No Starch Press published the second edition of The Art of Assembly Language, which used HLA throughout and brought the language to a much wider audience.
Design Philosophy
HLA is built on a deliberate tension: it is unambiguously an assembly language – programmers write mov, add, cmp, and jmp instructions, manage the stack themselves, and work with x86 registers directly – but it borrows syntactic conventions from high-level languages to reduce the friction of writing real programs.
The core design principles are:
- Familiar high-level syntax: Variable declarations, procedure definitions, and control structures resemble Pascal, Ada, and Modula-2 rather than traditional assembler directives. A student already familiar with a high-level language can read an HLA program and understand the overall structure without first mastering MASM’s directive syntax.
- Real assembly underneath: Every high-level control structure compiles down to ordinary x86 instructions.
if @c then ... endifbecomes a conditional jump; awhileloop becomes acmp/jcc/jmppattern. The student sees the high-level form and can also inspect the generated assembly. - A real standard library: HLA ships with a large standard library of routines for I/O, strings, math, conversions, and data structures, similar in spirit to the C standard library. This makes it practical to write substantial programs in HLA without having to reinvent every primitive.
- A powerful macro system: HLA includes compile-time language features for writing context-sensitive macros, allowing extensions like nested
switch/case/default/endswitchconstructs.
Key Features
High-Level Control Structures
HLA provides structured control flow that compiles to standard x86 branches:
if( eax > 0 ) then
mov( 1, ebx );
elseif( eax < 0 ) then
mov( -1, ebx );
else
mov( 0, ebx );
endif;
for( mov( 0, ecx ); ecx < 10; inc( ecx )) do
stdout.put( "i = ", (type int32 ecx), nl );
endfor;
Boolean tests can use either explicit comparisons (eax > 0) that the compiler translates into the appropriate cmp/jcc sequence, or flag-based tests (@c, @z, @s, etc.) that read the CPU flags directly after an instruction.
Data Types and Declarations
HLA provides typed variable declarations more akin to Pascal than to MASM:
static
counter: int32 := 0;
name: string;
table: int32[10];
The type system includes signed and unsigned integer types of multiple widths, characters and strings, records (analogous to C structs), unions, pointers, and array types. HLA also supports class declarations with inheritance and virtual methods, an unusual feature for an assembly language.
Procedure Declarations
Procedures are declared with named parameters and explicit calling conventions, rather than as bare labels:
procedure greet( name: string ); @nodisplay; @noframe;
begin greet;
stdout.put( "Hello, ", name, nl );
ret();
end greet;
Behind the scenes, the compiler still emits the underlying push/call/ret sequence and stack frame management; the syntax simply makes calling conventions explicit.
The HLA Standard Library
HLA ships with an extensive standard library covering console and file I/O (stdout, stdin, fileio), strings (str), conversions, mathematical routines, memory allocation, command-line parsing, and data structures such as lists and tables. The library is itself written in HLA and serves as a substantial example of non-trivial HLA programs.
Compiler Architecture
HLA v1.x: Front End for External Assemblers
The original HLA v1.x line operated as a front-end compiler that translated HLA source code into the source syntax of an external x86 assembler. By default it emitted MASM-compatible source, but it could also target TASM, FASM, NASM, and the GNU Assembler. This architecture allowed HLA to leverage the code generation, linking, and tooling already provided by mature assemblers, at the cost of requiring users to install one of those assemblers alongside HLA.
HLA v2.x: The HLA Back Engine (HLABE)
Starting with the v2.x line, HLA gained its own back end, the HLA Back Engine (HLABE), which emits object files directly in PE (Windows), COFF, ELF (Linux/FreeBSD), or Mach-O (macOS) formats. With HLABE, HLA became self-contained: the developer no longer needs MASM, NASM, or GAS to produce an executable. The v1.x front-end behavior was retained for users who preferred to emit source for an external assembler.
Platform Support
According to the Wikipedia article on the language, HLA supports Windows, Linux, FreeBSD, and macOS. In all cases the target is 32-bit x86 (IA-32); HLA does not natively target ARM, RISC-V, or other non-x86 architectures, and its support for x86-64 is limited compared with mainstream assemblers like NASM and GAS.
Current Relevance
HLA’s most active development appears to have occurred from its initial 1999 release through the early 2010s, with version 2.16 (July 2011) being the most recent stable release listed on Wikipedia. The language remains downloadable from Randall Hyde’s website and continues to serve as the companion language for The Art of Assembly Language (2nd edition, 2003), which is still in print and widely recommended as an introduction to x86 assembly programming.
HLA occupies an unusual niche in the assembly language ecosystem. It is more approachable than raw MASM, NASM, or GAS for newcomers, particularly those coming from Pascal, Ada, or C/C++ backgrounds. At the same time, it remains a genuine assembly language: programmers still write machine instructions and manage registers and memory directly. For professional assembly work – operating system kernels, performance-critical SIMD code, security research – mainstream assemblers like NASM, MASM, and GAS dominate, but HLA continues to find use as an educational on-ramp.
Why It Matters
HLA represents a thoughtful experiment in answering a long-standing question: what would assembly language look like if it were designed from scratch as a teaching tool, rather than evolving organically alongside specific hardware platforms? Most x86 assemblers in widespread use today – MASM, NASM, GAS – inherit conventions from the 1980s, when terseness and minimal compiler complexity were design priorities. HLA inverts those priorities, asking instead what conveniences a modern assembler could offer without obscuring the underlying machine.
The result is a language that demonstrates how much of an assembly programmer’s friction comes from accidental complexity (verbose directive syntax, manual control-flow scaffolding) rather than from the essential complexity of programming at the machine level. By stripping away the former while preserving the latter, HLA makes it possible to teach – and learn – assembly language programming with substantially less initial overhead, while still producing programs that compile to real x86 machine code that the student can disassemble, debug, and reason about at the instruction level.
Timeline
Notable Uses & Legacy
The Art of Assembly Language (book)
HLA is the language used throughout the second edition of Randall Hyde's The Art of Assembly Language (No Starch Press, 2003), one of the most widely recommended introductory assembly language textbooks.
University-Level Assembly Courses
HLA was created specifically to teach assembly language at the college and university level, originally for Hyde's own courses at the University of California, Riverside, and has been adopted as a teaching tool in other introductory assembly courses.
HLA Standard Library
HLA ships with an extensive standard library of routines for string handling, console and file I/O, math, and data structures, demonstrating that assembly programs can be written using high-level library abstractions similar to those found in C or Pascal.
Self-Study and Hobbyist Assembly Programming
HLA is used by self-taught assembly programmers who want a gentler on-ramp to x86 instruction-level programming than raw MASM, NASM, or GAS, leveraging familiar if/while/for syntax while still emitting real machine code.