mrfearless / RadASM2

RadASM v2
355 stars 70 forks source link

RadASM doesn't build and run HLA project. #9

Open KulaGGin opened 5 years ago

KulaGGin commented 5 years ago

When I try to build created project with code from the HLA book, it shows me this error: image

I created HLA project with default settings. It doesn't even want to build HelloWorld template, it throws same error. I do have HLA installed on my PC: explorer_ghltgkynz7

Here a video with demonstration: https://youtu.be/ZoruP5Zo_0Y

Project itself: intInput.zip

intInput.hla compiles from command line with hla intInput.hla just fine. It works, too.

How do I compile and run this program with RadASM?

mrfearless commented 5 years ago

Ok, so i installed hlasetup to a m:\hla folder. (My masm32 installation is already in m:\masm32)

I had to change environment settings in RadASM. (Options Menu->Environment Variables) to modify the following: path, lib and halinc to correctly point to the hla and masm folders.

I also rebooted my machine after hlasetup finshed so that the global path environment var included hla (just to make sure it was all correct etc)

The old style templates for hla dont take into account any evolution of hla and the new command line options for compiling etc.

I modified project options for link and assemble. (Project Menu-Project Options) like so:

3,O,$B\HLA.EXE -win32 -mslink -lib:"$I",11

This takes the input file .hla (which is the 11 part - found from main files dialog), using the library path ( "$I"), outputting as a win32 obj format (the -win32 part) and passing compiled file to the microsoft linker (-mslink). Using the build or build all option to run that.

The numbers used in the main files can be used in the RadASM project options to pass the filenames etc.

The finished compiled output:

Additionally i adjusted my radasm.ini file to include hla at the end of assemblers section:

[Assembler]
Assembler=masm,UASM32,UASM64,JWasm,HJWasm32,HJWasm64,GoAsm,fasm,html,hla

As the hla templates used in radasm are older, a few modifications might be needed for additional categories of apps. hla -? shows those command line switches:

 -w        Compile as windows app (default is console app).

so adding a -w to a project options assemble/link text field would be required to build windows gui apps.

Might have to experiment and play around with additional options.

A rework of the hla templates is probably required as compiling resources or creating dll's or static lib's needs additional work to include those basic flexible capabilities/options.