Hi all,
I've just posted HLA v1.47 to Webster.
This is another experimental/interim version (meaning Windows only, no Linux code).
I've corrected several pressing problems that appeared in HLA v1.46 as a result of the
rewrite that is currently in progress.

I've also updated the Iczelion tutorials that I'd converted to HLA so that they once
again compile properly. They are now included as part of the "Examples" package
on the HLA download page (placing them here means that I can automatically recompile
them every time I build a new version of HLA so, hopefully, they won't get too out of
date in the future). I've also placed several Windows programs in the "WPA" subdirectory
of the "Examples" code containing several Windows/Assembly programs I'm writing for
"Windows Programming in Assembly Language". Those who want a few more examples
that employ the "HLA way of doing things" might want to take a look at these source files.
Sorry I've only got a few written to date, but I've been spending a lot of time writing
English rather than assembly lately...
Cheers,
Randy Hyde

Find it all at http://webster.cs.ucr.edu
Posted on 2003-04-25 20:49:13 by rhyde
Currently I am in the process of rewriting the code generator for HLA.
You'll be seeing a whole series of HLA releases before this process is
complete; the bottom line is that it will be easier to create code generators
for other assemblers (e.g., NASM) once I'm done. This is also a big step
forward towards the HLA v2.0 release.

Most of the changes to the code generator are internal to HLA and should
(hopefully) produce no noticeable changes to the average HLA user.
However, during the development, I'm also sticking in new features
as I go along (which is why I'm releasing interim/experimental versions).

HLA v1.47 contains several big changes to the HLA language and a couple
of minor changes. Let's look at the minor changes first:

HLA has several new reserved words: endconst, endlabel, endvalue,
and endtype to complement the existing endstatic, endreadonly, and
endstorage reserved words. Although HLA does not allow you to place
these declarations at arbitrary points in the program (as you can with
static, readonly, and storage), HLA does allow you to optionally place
endlabel at the end of a label section, endconst at the end of a const
section, endvalue at the end of a value section, and endtype at the end
of a type section. HLA also allows you to optionally place endstatic, endstorage,
and endreadonly at the end of their respective sections in the declaration
section of a program, procedure, iterator, method, class, or namespace.
E.g.,

program xxxx
const
pi := 3.14159;
cnt := 10;
endconst;

var
j:int32;
k:uns32;
endvar;

static
s:string;
t:tbyte;
endstatic;

begin xxxx;
.
.
.
end xxxx;


I've done this mainly to give external tools like RadASM better hints as to where certain sections begin and end in the program.

Now for some major changes:

One big change is that HLA now provides the ability to disable (and reenable) reserved words using the #ID and #RW compile-time statements. E.g.,

#ID( mov )

tells HLA to treat "mov" as an identifier rather than as a reserved word from that point forward in the source file.

#RW( mov )

tells HLA to start treating mov as a reserved word again.
Note that you can only enable and disable existing reserved words. You cannot tell HLA to treat an arbitrary identifier as a reserved word.

Once you disable a reserved word, it becomes an identifier and you have to define it in order to use it. If you need to access the original token represented by the reserved word, you can do so by prefacing the original reserved word with a tilde ("~"). E.g.,

#ID( mov )

var
mov:uns32;
.
.
.
~mov( 0, mov ); // copies zero to the "mov" variable.

#RW( mov ) //After this point, you no longer have access to the mov variable,
// "mov" becomes a reserved word once more.

The purpose for this feature is two-fold. First of all, if you're creating a
domain-specific embedded language within HLA and you need to use one
of HLA's reserved words in your language, this provides that capability.

Second, if you really hate HLA's (src, dest) operand order, you can now
do something about it. Consider:

#id( mov )

#macro mov( dest, src );
~mov( src, dest );
#endmacro


now you can write "mov( eax, 0 );" to your heart's content.


Another major change is the addition of "open-ended" arrays.
Now you can declare tables and other objects like this:

xyz : byte [] := [1,2,3,4,5,6,7,8];

And HLA will automatically supply the element count for you.
You can obtain the number of elements in an array using
the @elements( xyz ) compile-time function.
Note that open-ended arrays are legal in the const, value,
static, and readonly sections.

Another big change, though it's not yet complete, is support
for the SSE/SSE2 instructions. I've actually implemented most
of the instructions (along with a REAL128 data type). However,
I've got to track down the SSE/SSE2 syntax for several different
assemblers before I can finish this feature off.

There were several other minor additions, but they probably
won't have as big an impact as the changes above.
Cheers,
Randy Hyde
Posted on 2003-04-25 21:35:22 by rhyde
Hello Randy,

Download doesn't seem to be working for 1.47.

Paul
Posted on 2003-05-01 12:06:28 by Paul Panks
Looks like Randy has used caps again, just replace the filename with a lowercase version and it should work fine:

"http://webster.cs.ucr.edu/Page_hla/1_47Release/hlasetup.exe"
Posted on 2003-05-01 12:14:09 by donkey
Thanks. :)

Arrays are working me right now. I can't seem to get a multi-dimensional array of 42 x 6 to work (42 rows by 6 columns).

How do I assign a portion of it to a value, i.e.:

m[1,1]:=2;
m[1,2]:=6;
m[1,3]:=4
m[2,1]:=7;
m[2,2]:=9
m[2,3]:=11;
m[3,1]:=19

etc

First number in m is the room number. Second number in m is the direction. 1 for north, 2 for south, 3 for east, 4 for west, 5 for down, and 6 for up. [42,6] means there are 42 rooms and 6 possible directions to go in for each room.

Regards,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-01 12:19:32 by Paul Panks

Thanks. :)

Arrays are working me right now. I can't seem to get a multi-dimensional array of 42 x 6 to work (42 rows by 6 columns).

How do I assign a portion of it to a value, i.e.:

m[1,1]:=2;
m[1,2]:=6;
m[1,3]:=4
m[2,1]:=7;
m[2,2]:=9
m[2,3]:=11;
m[3,1]:=19

etc

First number in m is the room number. Second number in m is the direction. 1 for north, 2 for south, 3 for east, 4 for west, 5 for down, and 6 for up. [42,6] means there are 42 rooms and 6 possible directions to go in for each room.

Regards,

Paul Panks
dunric@yahoo.com



There are *two* languages supported by HLA: the compile-time language and the run-time language. The compile-time language uses syntax similar to the statements above.
However, this is only suitable for initializing constants at compile-time.

To manipulate two-dimensional arrays at run-time you have to compute the index
into the array using, for example, row-major (or column-major) ordering.
Another solution is to check out the "arrays.hhf" module in the HLA Standard Library.
It provides an index function that makes accessing elements of multi-dimensional
arrays relatively painless.
Cheers,
Randy Hyde
Posted on 2003-05-02 22:51:36 by rhyde