Darkwolf2

Differences between revisions 12 and 13
Revision 12 as of 2007-07-15 21:37:12
Size: 3178
Editor: balt-209-150-116-248
Comment:
Revision 13 as of 2007-07-15 21:45:11
Size: 368
Editor: balt-209-150-116-248
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
LinuxAssemblyUsingHLA * [wiki:LinuxAssemblyUsingHLA LinuxAssemblyUsingHLA]
* [wiki:LinuxAssemblyUsingHLA/Sources LinuxAssemblyUsingHLA/Sources]
Line 11: Line 12:

= Linux Assembly Using HLA =

Latest version of HLA is 1.97 and now includes FASM written into the HLA executable.
HLA will now compile executables itself. Linux version can use either FASM or GAS.

HLA 2.0 is close to completion, it is being written in HLA and for multiple platfroms.
Current cross-platform is a kludge ( Linux version is the C files compiled and FreeBSD is a port of that ).
It will be more organized and designed with more efficiency in mind.

Though personally I think the current version is pretty efficient, it's Assembler! :-?

Setup
----
Download and extract HLA package (links at bottom of page).
There is no installation and to remove you only have to delete the extracted files.
You can install anywhere just be sure to add the path to the library and includes to your .bashrc file. ( See Below )

 (./) Be sure to add the following to your .bashrc file. Link HLA to /bin to avoid having to update your path.

{{{
export hlalib=/path/to/HLA/hlalib/hlalib.a
export hlainc=/path/to/HLA/include
}}}

( I think the proper link command is {{{ sudo ln -s ./hla /bin }}} but I need to research this more.... )

 (!) KHLA from Sevag is also useful because of the ability to control some link options, link that to /bin too.

To test your setup copy the Hello World program into a file called {{{ hello.hla }}} and compile with the following command.

{{{
hla hello.hla
}}}

You should then have an executable called {{{ hello }}} , run it from the terminal and you should see the following output.

{{{
Hello, World of Assembly Language
}}}

Now you are on your way to writing programs in assembly on Linux.

 {OK} HLA will run on any Win32, Linux and FreeBSD platform.

Sample Coding
----
Sample HLA source code ( Your Standard Hello World ):

{{{
program HelloWorld;

#include( "stdlib.hhf" )

begin HelloWorld;
    stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;
}}}

Sample Makefile and Source:
Makefile:
{{{
test: test.o
 hla -x:test test.o

test.o: test.hla
 hla -c test.hla

clean:
 rm *.o
 rm *.asm
}}}

Source Code:
{{{
program testLinux;
#include( "stdlib.hhf" )
begin testLinux;
    stdout.put( "Hello, World of Assembly Language", nl );
end testLinux;
}}}

{{{ -x:name }}} will specifiy the name of the executable. {{{ -c }}} will compile to obj code only. Both must be followed by the filename of the file to be compiled. Check HLA docs and {{{ -? }}} switch for more info.


== HLA Software ==
 *Randall Hyde's HLA for Linux/Windows ( High Level Assembler )
[http://webster.cs.ucr.edu/]
 *Sourceforge Project for the HLA Standard Library ( the forthcoming community supported HLA 2.0 )
[http://sourceforge.net/projects/hla-stdlib]
 *Sevag's HLA utilities ( Linux / Windows )
[http://www.geocities.com/kahlinor/HLA.html]
 *Hutch's Forum; MASM32 platform, HLA and others ( beta software can be found here too )
[http://www.masm32.com/board/]
== External Homepages ==
[http://www.angelfire.lycos.com/oz/darkwolf/index.html]

DarkWolf

Email: MailTo(lycanos AT hotmail DOT com)


Pages that I am working on

* [wiki:LinuxAssemblyUsingHLA LinuxAssemblyUsingHLA] * [wiki:LinuxAssemblyUsingHLA/Sources LinuxAssemblyUsingHLA/Sources]

External Homepages

[http://www.angelfire.lycos.com/oz/darkwolf/index.html]


CategoryHomepage

Darkwolf2 (last edited 2010-03-29 21:20:51 by balt-209-150-116-212)