TOC PREV NEXT INDEX

Put your logo here!


9 Installing HLA Under Linux


HLA is not a stand alone program. It is a compiler that translates HLA source code into either object code or a lower-level assembly language that Gas or FASM must process. Finally, you must link the object code output using a linker program such as the Linux ld linker. Typically you will link the object code produced by one or more HLA source files with the HLA Standard Library (hlalib.a). Most of this activity takes place transparently whenever you ask HLA to compile your HLA source file(s). However, for the whole process to run smoothly, you must have installed HLA and all the support files correctly. This section will discuss how to set up HLA on your system.

First, you will need an HLA distribution for Linux. Please see Webster or the previous section if you're attempting to install HLA on a different OS such as Windows. The latest version of HLA is always available on Webster at http://webster.cs.ucr.edu. You should go there and download the latest version if you do not already possess it.

Under Linux, HLA can operate in one of three modes: it can directly produce object files (.o files) that you can link with ld; it can produce a low-level assembly language output file that you can assemble using the Free Software Foundation's Gas assembler, or it can produce a low-level assembly language output file that you can assemble using FASM. The HLA package contains the HLA compiler, FASM, the HLA Standard Library, and a set of include files for the HLA Standard Library. If you write an HLA program want Gas to process it, you'll need to make sure you have a reasonable version of Gas available (Gas is available on most Linux distributions, so this shouldn't be a problem). Note that the HLA Gas output can only be assembled by Gas v2.10 or later (so you will need the 2.10 or later binutils distribution). Note that (apparently) HLA does not work with 64-bit versions of Gas, so make sure you're using a 32-bit version of Gas with HLA or use the object code output feature or use FASM.

Here's the steps I went through to install HLA on my Linux system:


 
program HelloWorld;
 
#include( "stdlib.hhf" )
 
begin HelloWorld;
 

 
	stdout.put( "Hello, World of Assembly Language", nl );
 

 
end HelloWorld;
 

 

 
HLA (High Level Assembler) Parser
 
Copyright 2001, by Randall Hyde, all rights reserved.
 
Version Version 1.32 build 4895 (prototype)
 
-t active
 
File: t.hla
 

 
Compiling "t.hla" to "t.asm"
 
HLA (High Level Assembler)
 
Copyright 1999, by Randall Hyde, all rights reserved.
 
Version Version 1.32 build 4895 (prototype)
 
ELF output
 
Using GAS assembler
 
GAS output
 
-test active
 

 
Files:
 
1: t.hla
 

 
Compiling 't.hla' to 't.asm'
 
using command line [hlaparse  -v -sg -test "t.hla"]
 

 
Assembling "t.asm" via [as -o t.o  "t.asm"]
 
Linking via [ld   -o "t"  "t.o" "/usr/hla/hlalib/hlalib.a"]
 

Versions of HLA may appear for other Operating Systems (beyond Windows and Linux) as well. Check out Webster to see if any progress has been made in this direction. Note a very unique thing about HLA: Carefully written (console) applications will compile and run on all supported operating systems without change. This is unheard of for assembly language! So if you are using multiple operating systems supported by HLA, you'll probably want to download files for all supported OSes.

For more information, please see the sections on HLA Internal Operation and Customizing HLA.



TOC PREV NEXT INDEX