High Level Assembly 53
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'll pass (Score:5, Funny)
Re:I'll pass (Score:1)
http://www.viksoe.dk/code/asmil.htm [viksoe.dk]
High Level Assembly (HLA) (Score:5, Funny)
Re:High Level Assembly (HLA) (Score:4, Insightful)
With modern C compiles in place its all but impossible to write an entire project with faster code then the same program in C.
ASM is good to optimize some sections, but even that is questionable nowadays because its probably less expensive to get a faster computer then having a coder with great insight into ASM optimize a section of the code for a week.
Also C code can run on a cluster or super computer if required.
Re:High Level Assembly (HLA) (Score:2)
Re:High Level Assembly (HLA) (Score:1)
This is exactly the problem these days. People think so way without really considering the consequences.
If you have a moderate or a large project in corporate environment, or a project that is delivered to larger audience, it's not uncommon to have 10,000+ users.
Now think if you have to get a new PC for each and every user because you don't want to
Re:High Level Assembly (HLA) (Score:1)
I just can't come up with a type of software which would trigger such a behaviour.
Honestly there are two types of applications which still hit computers hard: Math problem solving tools and computer games.
Games are a whole topic in themselves. Well optimized code is a feature which can cause more sells, so optimized asm code will have a home here for a long time. Math is usually so complex that you need infrastructur
Re:High Level Assembly (HLA) (Score:3, Interesting)
dsp and rendering are two areas I have experience
Re:High Level Assembly (HLA) (Score:1)
that was just my exp in it.
Re:High Level Assembly (HLA) (Score:3, Informative)
For example SmartEiffel [loria.fr] compiles Eiffel-code to assembly-like C-code and then compiles the C-code to executable code using an ANSI-C compiler. Smart and efficient way to make a new compiler produce extremly fast code and be crossplatform without an extra effort.
Re:High Level Assembly (HLA) (Score:2)
Except that the Eiffel->C translation effectively obliterates any chance of using the (presumably) much stronger semantics of Eiffel for optimizations which are not possible in C, due to the fact that a C compiler doesn't know about the semantics of Eiffel, and consequently cannot know of any "non-C" properties of the intermediate C program.
FAQ (Score:4, Informative)
...is something you should probably read. Link here [ucr.edu].
Interesting project, but quite useless for us that prefer portability.
Re:FAQ (Score:2, Insightful)
Re:FAQ (Score:3, Interesting)
to optimize critical sections on sensitive platforms
or to access memory-mapped hardware registers
is the sine qua non for the very option of
writing portable code. Absent this ability, we'd
have to write entire systems in low-level asm.
....meanwhile in other news...... (Score:3, Interesting)
BTW, PLC's are commonly programmed in "assembler", but the industrial automation worlds idea of Assembler is remarkebly similar to this HLA.
Relax, it's a teaching tool... (Score:3, Informative)
Kinda like MIPS/SPim. Assembly: The Anti-Java language. (Haven't decided if that is a comment or compliment...)
Oldbie.
Re:Relax, it's a teaching tool... (Score:3, Interesting)
We (Goodman [wisc.edu], et al) designed SAL back in 1990 when the CS354 Computer Organization and Programming was moved from VAX. I was a TA at the time and added the SAL code onto Spim.
Re:Relax, it's a teaching tool... (Score:1)
Re:Relax, it's a teaching tool... (Score:2, Interesting)
Google tells me the kids use java to simulate [highpoint.edu] it now.
Re:Relax, it's a teaching tool... (Score:1)
Our latest project is PacMan in assembly. It's already at 1000 lines of code and the ghosts don't even have an AI moving routine yet.
Re:Relax, it's a teaching tool... (Score:1)
Wow that's gross (Score:5, Informative)
Teaching? Yes. Applications? Er.. why? (Score:5, Insightful)
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.
Re:Teaching? Yes. Applications? Er.. why? (Score:4, Interesting)
Nobody can answer the question -- why do you need a language that has none of the advantadges of assembley, AND none of the advantadges of a higher level language?
Re:Teaching? Yes. Applications? Er.. why? (Score:2)
I have to say, I could really groove on this.
Re:Teaching? Yes. Applications? Er.. why? (Score:4, Insightful)
However, using it to teach new programmers how to program applications? Why?
For the same reason it's valuable for programmers to know any language other than the one their company uses. Because teaching someone to write applications isn't the same as teaching them to program.
This language is basically like C but more so: nobody in their right minds would consider using it for a major project, but it's very useful to have some idea of how this stuff really works.
I assure you, the moment I discovered what a 'for' loop compiled to, that was like a lightbulb going on in my head: suddenly programming made sense instead of just being about typing mystical formulae. Since then, sure, I've never touched ASM again, and these days I work almost entirely in functional languages that end up being a million miles away from the hardware, but I don't think I wasted my time when I did learn ASM.
Re:Teaching? Yes. Applications? Er.. why? (Score:2)
Tell that to the Linux Kernel developers.
Structured assembly language not new (Score:4, Interesting)
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-
HLA and Art of Assembly (Score:4, Informative)
Randall Hyde's long-term project ... (Score:5, Informative)
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 [ucr.edu] , or PDF [ucr.edu].
If you're using Windoze then it's definitely worth checking out the excellent RadASM [visualassembler.com] 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.
Re:Randall Hyde's long-term project ... (Score:1)
But our coverage of assembler was limited (not a full course). Just implementing some functions, called by C. And analysing the output of various compilers and flags. The focus was just on the performance tricks.
wow, displays (Score:2)
Re:wow, displays (Score:2, Interesting)
Re:wow, displays (Score:2)
I admit it, it's from looking at C. Anything I've looked at that's allowed nested functions has tended to be high enough level that they're implemented on a virtual machine of some sort, so they do walk either their own stack of activations or the C stack. Thanks fo
High Level Assembler for JVM use (Score:3, Informative)
Finally! (Score:2)
I did this independently 20 years ago. (Score:2, Interesting)
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
Re:I did this independently 20 years ago. (Score:1)
You must have had the patience of a saint to do such programming on such a machine and good enough humour to be able to live with the cassette interface. :-)
Time machine? (Score:2)
Hey! Look everybody! Larry Wall has invented a language called Perl [perl.org]! 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.
Pointless. (Score:2)
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 generi