High Level Assembly
dunric writes "Randall Hyde has developed a programming language called High Level Assembly (HLA). It is a great way for new programmers to develop applications for both Windows and Linux. It works with a variety of assemblers, including Gas, Fasm, Masm and others. The website for Randy's HLA is located at: http://webster.cs.ucr.edu/"
i'm waiting for Microsoft ASM.NET
...is something you should probably read. Link here.
Interesting project, but quite useless for us that prefer portability.
I demand the Cone of Silence!
BTW, PLC's are commonly programmed in "assembler", but the industrial automation worlds idea of Assembler is remarkebly similar to this HLA.
And if you thought that was boring you obviously havn't read my Journal ;-)
Kinda like MIPS/SPim. Assembly: The Anti-Java language. (Haven't decided if that is a comment or compliment...)
Oldbie.
Take a look at the sample programs.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
I'm sure it's a great teaching tool for learning assembler, and if you need to do a bit of assembler for some reason, cool.
However, using it to teach new programmers how to program applications? Why?
It's
a) Harder to learn than a High Level Language.
b) Takes a lot more work to get anything done when compared to High Level Languages.
c) Is much less use in a working envronment than knowledge of a High Level language is.
This is hardly news to anyone. If my memory doesn't fail me, that has been around for at least two years. And if you were ever into assembly or even just curious, you were bound to stumble uppon the Art of Assembly (his book, a must read when learning assembly) and his site. Its not like HLA was any secret of even hidden in some obscure webpage...
I am a speak english. Do you not? - Saroto
Actually, HLA ain't nothing new, and if you've been doing any hanging out on comp.lang.asm then you've seen his name popping up on posts about every single day, several times per day, promoting HLA and helping newbies for years now.
I downloaded his book, "Art of Assembly Language" (avail. at No Starch, http://www.nostarch.com/) a couple of years ago before it had been published by No Starch and it's well written, still available for free either HTML , or PDF.
If you're using Windoze then it's definitely worth checking out the excellent RadASM assembly language IDE for Windows, which is itself written in assembly, and also supports HLA. Randall Hyde devotes a chapter somewhere, either in his book or on his site, I can't remember, to configuring and using RadASM.
One of the posts has questioned the value of teaching assembly to newbies, but I think there's a huge value for serious students. It's hard to appreciate garbage collection, for one, until you've had to pick up your own memory trash. But more importantly, most compilers out there output to some intermediary assembly language, and understanding the inner workings of your processor, your compiler and your own programs is one essential difference between being, well, a hack and being really, really good. There are other differences, to be sure, but that's one.
I haven't been a huge fan of HLA myself for various, and admittedly completely arbitrary reasons. But Randall Hyde has put megatons of work into his stuff, doing some extremely impressive things, and he's always ready and willing to be helpful on the newsgroups, so if you have an interest then I would probably go to his site and to comp.lang.asm before I went anywhere else. Anyone stands to learn a ton.
Chr0m0Dr0m!C
I noticed its standard calling convention is to use the x86 ENTER/LEAVE instructions. From what I've seen of other programs, this convention is certainly ... unique. Every compiler I've seen handles the stack manually and doesn't use these instructions, which do a lot of scoping work for you in the form of a data structure called a display. It looks neat, but HLA has got to be the only compiler I've seen that uses it. My guess is that it doesn't by itself support a jump to a procedure, that it simply creates a nested scope, something that shouldn't even be necessary when you do some basic static analysis. Am I completely wrong here? Does anything else out there actually make good use of displays?
I've finally had it: until slashdot gets article moderation, I am not coming back.
HLA looks like a complex programming environment.
.if (test)
.orif (another test)
.else
.while (yet another test)
.endwhile
.endif
Assuming a common role of assembler, to fine-tune a critical smallish bit of code, I can see the convenience of having a higher level than normal of language constructs. It can make the flow of logic more transparent, (e.g. nestable conditional blocks, loops with readable criteria, repeat-until, do-while, switch/case structure, etc).
On the other hand, providing this kind of pseudo-high level language structure in assembler programs has been around a long time, and can be done more simply. I still have an assembler macro library around that in its original version (circulated on 80s bbs networks) did this for at least some early versions of MASM and TASM.
(Most of the identifiers would probably have to be changed for compatibility with newer assemblers because it used non-standard initial characters to enable constructs looking a bit like (ignore the 1--- 's, they just adjust formatting in the Slashdot editor)
1----
1----
1------ (whatever code)
1----
1--------
1----------- (whatever other code)
1--------
1----
and suchlike constructs).
As I first read it, it was a macro library carrying a by-line from 'Jim Holtman, 1982'. It was not very big, the whole thing (even after some more macros for other logic-extensions were added)came to an include-file size of no more than about 10 kb.
Maybe it's not clear why anything bigger would be needed.
-wb-
If you are looking for a High Level Assmebler that generates Java Byte Code look at Jamaica. It allows Java control structures around the byte code. It is simple to use and has some very good documentation. Jamaica (on the Judoscript site)
... a "way for new programmers to develop applications for both Windows and Linux"!!! Why didn't anyone think of this sooner!
If Chaos Theory has taught us anything, it's that we must kill all the butterflies.
I used to program a computer which only had BASIC (a Sinclair ZX-81 like).
:= DE
:= MEM[HL] .... equivalent to LD A,(HL)
:-)
After some time, I decided hex codes sucked big time. So I decided to code an assembler in BASIC.
Also, I always found assembly syntax awkward... so instead of:
LD HL, DE
I would write:
HL
Pascal-like, but no semicolon at the end. Memory references were like:
A
JMPs were written as GOTO, while conditional branches were written as:
IF A <> 0 THEN GOTO LABEL, meaning JNZ LABEL.
EQUs were CONSTS, DWs were INTEGERS, DBs were CHAR (or BYTE, more probably).
I had a lot of fun.
The first thing I wrote was the assembler itself, just changing the BASIC commands to my above described lingo.
It took the BASIC program one entire hour to "assemble" it. Later, I used the same code thru the newly generated assembler. It was assembled in nearly 60 seconds.
At first, I thought it had failed...
Those were the good times...
Hey! Look everybody! Larry Wall has invented a language called Perl! It's great for extracting reports from text.
Randall put this out like almost 3 years ago. And frankly I find HLA more confusing than as or nasm.
All's true that is mistrusted
Surely the whole point of using assembly is that you can optimize specifically for the platform (otherwise why not just use C?).
But if it has to be "High-Level", then that implies that you cannot get access to or exploit the particulars of the underlying platform. E.g.: Optimal instruction scheduling, pipeline depths are different from platform to platform, so how you accomodate that? If this is just about generating assembler specifically for each platform from a "template", then why not just use a generic macro language?
HLA seems utterly pointless to me.
HAND.
He made this a very long time ago to simplify assembler for beginers. This is OLD. Your not getting the point. This is not something that's supposed to replace C or anything, just help people learn assembler.