I am completely new to Assembly Language, and just can't seem to get anything going. I downloaded "HLA", since this seemed like a good place to start. I installed HLA, and everything seemed to be going just fine, until I tried to run a sample program from the intro to Randall Hyde's "Art of Assembly Language". I just keep getting the same message: "could not open hw.hla". What does this mean? How can I fix this problem? I have attached a screenshot of the DOS Window.

I also downloaded The RadASM IDE, and tried to run this sample program with it, but I keep getting error messages, and it doesn't seem to do anything. Should I select "Build", "Run", "Go", or what do I do to produce any output?

This is really frustrating. I've spent about 12 hours all up trying to get something happening, but nothing I do seems to work. Have I chosen the right place to start? Can anybody recommend a good resource for complete beginners?

Thanks.
Posted on 2003-05-29 06:11:01 by Bustaroms
In my experience the major problem that most people have with HLA the first time through is the environment variables. Check my RadASM help file to see how to set them up.
Posted on 2003-05-29 06:18:51 by donkey
PS:

You should select build to assemble your project. hw.hla is the source code you are sending to your compiler. It should be found, check the path options in the Option menu to make sure that everything is OK there as well. You need to install MASM32 to have HLA work properly.
Posted on 2003-05-29 06:24:36 by donkey
Also in Project Options try setting the Assemble command to 5,O,$A\HLA.EXE -v,11
Posted on 2003-05-29 06:27:24 by donkey
Donkey,

Thanks for your help.

Firstly, where is your RadASM Helpfile located? Secondly, I have already installed MASM32.

Do you have any idea why DOS returns the message "Could not open hw.hla"? This really concerns me.
Posted on 2003-05-29 06:36:32 by Bustaroms
My RadASM help file can be downloaded from the RadASM web site. The file hw.hla is the source file for the hello world program. Why it is not appearing is a mystery to me, maybe you deleted it. I just tried an HLA compile using hw.hla here and found that hla has a problem finding ml.exe and link.exe if you leave them in the masm32\bin folder,copy the contents of that folder to c:\hla. The environment variables appear to be very important. When I had done this everything went fine. note that if your on 2K or XP you dont need the %lib% stuff that 9x needs in the env vars
Posted on 2003-05-29 06:45:18 by donkey
Actually don't bother with the copying of the bin stuff, just stick this on the end of the path env var :

;c:\masm32\bin
Posted on 2003-05-29 07:04:44 by donkey
Donkey,

How do I do this? Could you kindly explain in layman (newbie) terms.
Posted on 2003-05-29 08:19:44 by Bustaroms
Sorry for the delay Bustaroms,

Have to actually go to work from time to time. B*st*rds require that you actually show up occasionally in order to get paid - facsist pigs ;)

The environment variables depend on your OS, are you Win2K/XP or Win9x/ME ?

The setting of environment variables is covered in the RadASM help file under Assembler specific/HLA but give me your OS version and I'll put something here for you.

The rest is pretty much completely covered in the RadASM help as well, setting paths etc.. are all in there.
Posted on 2003-05-29 11:34:51 by donkey
Donkey,

I'm using Windows XP.

Cheers.
Posted on 2003-05-29 18:41:04 by Bustaroms
OK, here's what you have to do :

Right-click on My Computer and select the Advanced Tab, Press Environment Variables.

The bottom pane of the PropSheet is System Variables, press NEW and add the following

Variable name :hlalib
Variable value :c:\hla\hlalib\hlalib.lib

press NEW again

Variable name :hlainc
Variable value :c:\hla\include

press NEW again


Variable name :lib
Variable value :c:\hla\hlalib;C:MASM32\LIB

find path in the environment variable, double click it and add the following to the end of the Variable value line:
;c:\masm32\bin

You may have to unzip the hla projects again because I think you have deleted hw.hla which is the source file. Are you able to view the source in RadASM?

It is also a good idea to change the default assembler in RadASM to HLA, to do this change the following line in RadASM.ini:


Assembler=masm,fasm,tasm,nasm,hla,GoAsm

to


Assembler=hla,masm,fasm,tasm,nasm,GoAsm
Posted on 2003-05-29 19:03:52 by donkey
Donkey,

I just opened the project file "hw" for the first time. I found it in the folder: "c:\RadASM\Hla\Projects\hw". I ran it and it worked. Prior to that I was trying to open a text file called "hw.hla" which I had created using the instructions in Randall Hyde's "Art of Assembly Language". This did not work. Do you know the reason why?
The one I found in "c:\RadASM\Hla\Projects\hw" seems to have an ".exe" extension, not ".hla". Why is this? Am I supposed to convert the text document before I run it?
Posted on 2003-05-29 19:38:51 by Bustaroms
Ah, I see. The compiler options are set by RadASM in the RAP file. I was beginning to suspect that maybe you had opened the hla file directly. There is a default option set for no project compiles, it may not have been the one to use for you hla file. I asked NaN to move this thread to the HLA forum, you will get alot clearer answers here. I like HLA but I'm afraid that I don't actually use it :( so in this forum you can get help from real life HLA users and Randall Hyde himself :)
Posted on 2003-05-29 19:45:43 by donkey
Donkey,

Thanks for all your help. I feel like I can at least get started now.

What assembler do you usually use? Do you think HLA is a good place for a beginner to start?
Posted on 2003-05-29 20:33:47 by Bustaroms
HLA is an excellent place to start. It takes care of alot of the more complex tasks for you and you can get programs up and running quickly. I find that more than all of the features and bells and whistles, for beginners it is important to produce running code quickly or they tend to get disenchanted or frustrated. I use mainly MASM and GoAsm. Actually I am changing slowly to GoAsm because it is a very stripped down assembler that doesn't have alot of the things I don't use but has a few interesting features. I also use the RadASM IDE as you probably guessed since I wrote the help file and a few addins ;)
Posted on 2003-05-29 20:40:29 by donkey
BTW, I'm just a few days away from getting started on the RadASM chapter in "Windows Programming in Assembly" (a new e-text I'm working on). I've actually started it already, but I had to make a side trip to work on a chapter on "Advanced HLA Programming" to cover some prerequisite material the book needed.

In any case, I've got a pair of radasm and hla ".ini" files that work pretty good if you've got a version of make installed somewhere (my hla.ini file uses make rather than a batch file to run HLA because this lets me specify additional options; also, the build options are the same for both IDE and command line compilations when using a make file). The drawback to this approach, alas, is that you must have a copy of make.exe (easy to find, but...).

In any case, I'm hoping to finish the current chapter (Advanced HLA...) within the week and get started on the RadASM chapter immediately after that. Hopefully, I'll finish that chapter sometime in June. Don't wait for it to get started, but do look forward to it.
Cheers,
Randy Hyde
Posted on 2003-05-30 12:41:42 by rhyde