views:

366

answers:

10

I've been looking at L.in.oleum and am intrigued by it's mix of higher-level constructs (loops, dynamic variables) with low-level assembler power (registers).

Are there other languages like Lino out there, which blend the speed of assembler with productivity enhancing features?

EDIT: I realized this kind of sounds like an ad. I'm genuinely interested in other assembler-like languages, Lino is just the only one I happen to know of.

+1  A: 

Most C compilers that accept inline assembly. Of course, the assembly-optimized parts aren't cross-architecure, but I can't really imagine a cross-architecture assembly language that would be that effective anyway. I'll look into linoleum, but with optimizing compilers and vastly different platforms, with anywhere from 4 to hundreds of registers, I really can't see this working very well.

Another option is C#/Java and their bytecode. But I'd still question the usefulness of hand-optimizing in those.

jfclavette
I assume that with a good inline assembly you can get better results compared to pure assembly, as the compiler will do some optimizations.
Liran Orevi
Usually the optimizer stays out of inline assembly segments on the assumption that if you went to the effort to write it, that you really meant it. This can be critical in embedded system firmware where you might want to use a specific instruction to get an effect, or deliberately waste a pipeline delay slot to get a loop timed correctly. You mileage will vary, check your manual, and certainly it is solidly an implementation defined feature and not very portable.
RBerteig
C# bytecode is MSIL, if I'm not mistaken, the language of CLR. You can do some tweaks to it, but I think the C# interpretter does a pretty decent job of it already.Lino is interesting in an experimental-sort-of way. If nothing else, it gets a fair bit of practical use by it's creator. Once nice thing is that it is theoretically portable to any system.
CodexArcanum
+4  A: 

You might want to look at LLVM. It's pseudo-assmbler might be similar to what you've got in mind

TokenMacGuy
+1  A: 

You could try directly using LLVM.

Since there are many tools already available that create/transform it you stand a good chance of being able to make something useul with it (albeit with no ide support).

If you are stuck just write what you want in C++ then compile it with Clang keeping the intermediate form.

For a quick indication of whether you might like it try their online compiler

ShuggyCoUk
+1 for online toys
TokenMacGuy
A: 

High Level Assembly might also be interesting.

Zifre
+1  A: 

Win32 in assembler: basically the windows headers for assembler with some nice high-level macros:

http://www.masm32.com/

Mark
+6  A: 

C-- is an intermediate language designed to be generated mainly by compilers, is somewhere between C and assembler

hiena
A: 

The System z has HLASM which we use for quite a bit of development. It adds all sorts of higher-level-language constructs. As well as HLASM bringing assembly up a bit towards a high-level language, I believe IBM have an internal product based on PL/I which brings C down a bit towards assembly :-)

paxdiablo
A: 

I once used PL/M and it seemed to me to be just one level above assembly. It was more like a macro language but with some higher level constructs like loops and such. It was an interesting experience.

sybreon
+2  A: 

FORTH - not quite assembler but it is used heavily and is very low level.

James Brooks
A: 

LLVM is a good answer.

Some other interesting languages are the JVM bytecode and MSIL (the .Net platform bytecode). Both provide stackbased systems, which is a large difference from x86 assembly.

Daniel Goldberg