Chapter Two: Installing HLA


1.1 Introduction


As the name suggests, this chapter is about installing HLA. Why use a whole chapter? HLA has a few options in installation, so you may want to read through this chapter fully before beginning installation.


1.2 HLA, FHLA, KHAL, or HIDE?


For Windows users, one of the first options you have is whether to install standard HLA, FHLA (FreeHLA), KHLA, or HIDE package. The differences are many. HLA and FHLA are products directly from the author, so they’re guaranteed to have the latest material.


The normal HLA package requires you to download a copy of MS MASM, LINK, and RC programs. Fortunately, the MASM32 package downloadable from the download page, contains all these products. The default for the standard HLA package is MASM output. MASM code was the original output, so there may be fewer bugs in it.


The flaw in the FHLA package is the fact that FHLA spits out FASM code to be used in creating the object file. The FASM code output is slightly buggy sometimes, as in was an add-on mostly, but almost all the bugs have been worked out.


(In fact, a recent message from Randall Hyde suggests the FHLA package will soon become the standard HLA package and the currect HLA package will become the MHLA package.)


KHLA and HIDE are being developed by someone else, so they may not have the absolute latest stuff. The advantage of KHLA, however, lies in the fact that it uses a configuration file to set up the environment temporarily for the program. This saves you the trouble of changing the environment variables when installing HLA or FHLA, a big advantage for people who don’t like messing around with environment variables.


HIDE (HLA IDE) is also being developed by the creator of KHLA. If fact, HIDE uses KHLA for assembling HLA programs. For beginners, HIDE seems to be a wise choice, as it’s easy to setup and includes the contents of the FHLA package, so you don’t have to download anything else. To install, simply unzip the files into the directory of your choice.


Linux users don’t have the pleasure of an IDE. They also have only one option: HLA Linux. Read through the beginning of the hard installation on Linux so you know what the environment variables mean. Then jump down to the directions for installation on Linux.


1.3 The Easy Way


The second choice, if you chose HLA or FHLA, is whether or not to install it the hard way or the easy way. The hard way is setting the environment variables manually. Anyone who understands the command line shouldn’t be bothered with setting up HLA this way.


The easy way, on the other hand, is an install program which automatically sets up the environment for the installation. It’s fast, simple, and good for those who don’t have a clue what a command prompt it.


For some reason, I really don’t recommend this, even for those who don’t know what a command prompt is. I can’t really tell why, I just don’t.


1.4 The Hard Way


The hard way involves setting up the environment variables as needed. HLA needs three environment variables: hlainc and hlalib. Hlainc needs to be set to the directory of the hla include files. Hlalib needs to be setup to the path of the hlalib.lib file found in the library directory. The variables as on my computer are:


hlainc=C:\asm\hla\include

hlalib=C:\asm\hla\hlalib\hlalib.lib


I installed HLA into the asm directory, which is why I have the asm\ part in there. Many people have HLA installed into the root of the drive. That’s OK, but you have to change the variables.


How you go about changing environment variables depends on you system.


Users of 95 and 98 have to alter the autoexec.bat file to include these variables. They also have to append this to the PATH variable:


;\asm\hla\


Users of 2000 and XP, however, have to change the variables using the control panel. First, bring up the start menu and goto Settings/Control Panel. In the window that pops up, select System. Goto the Advanced tab and click Environment Variables. Under either system variables or user variables, select new. Using this, create the hlalib and hlainc variables. Next, select the PATH variable (you may have to scroll) and append what I said to place above to the variable’s contents.


Both KHLA and HIDE, however, have the alterations to the environment variables done through their INI files. This keeps you from needing to directly change the environment variables. Open up the HIDE.INI of KHLA.INI files and edit the hlainc and hlalib variables under the Environment section.


1.5 RadAsm


RadAsm is an assembly IDE designed to work with any assembler. Unfortunately, it’s power comes with a hefty price. Setting up RadAsm completely is a mess. The sheer number of options is enough to scare most away.


On the advantage side, however, RadAsm can be used with any assembler currently known and might even be usable with an HLL compiler.


1.6 HLA Installation on Linux


Installing HLA on Linux can be hard or easy. The hard way involves directly changing the environment variables for your shell. The easy way involves creating a small batch file to set the correct variables for the HLA environment and then call HLA. This section discusses the easy method.


After you have downloaded the HLA files, unzip them into you root directory (this document will assume that; you may place the files anywhere, but you’ll have to change some of the variables). Next, move the executables to your bin folder. I used my home bin folder, but you can install it where ever. Create a directory there called hlabin and move the HLA executables to that directory. In the outer directory, create a shell file called HLA and place the following commands in it:


#!/bin/bash

PATH=$PATH:/home/NoDot/bin/hlabin

export hlalib=/home/NoDot/hla/hlalib/hlalib.a

export hlainc=/home/NoDot/hla/include

/home/NoDot/bin/hlabin/hla $@


Depending, you may need to change some of the values if you placed the files somewhere else.


1.7 Conclusion


Not exactly a long chapter, but you have to setup HLA in order to be able to use it, correct? Well, now your ready to learn some of the ore interesting material, but first, I recommend you look at chapter 3 for an intro to number systems. If your already familiar with such things, you can head directly to chapter 4 for such things.