Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We already have:

  • Visual Basic
  • Visual C++
  • Visual C#

Why there is no Visual Assembly? Is it worth making it?

share|improve this question

closed as primarily opinion-based by MichaelT, gnat, GlenH7, Ozz, Michael Kohne Oct 1 '13 at 11:53

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Hey, you didn't mention Tenacious C! tenaciousc.com (Disclaimer: I am not affiliated in anyway with TC). You should ask those guys to do Visual for Assembly. –  jv42 May 25 '11 at 11:29
1  
IDA is already a sort of a visual tool (CFGs visualisation, etc.) –  SK-logic May 25 '11 at 12:13
4  
The question is ambiguous. What do you mean by Visual Assembler? Would it just let you write Microsoft MASM code in the Visual Studio environment for translation into native code? Or would it let you hand code ILM for translation into byte code. Either one might have its uses. –  Charles E. Grant May 25 '11 at 18:10
    
Actually if you just want to edit/debug MASM in Visual Studio, you can already to that. See kipirvine.com/asm/gettingStartedVS2010/index.htm –  Charles E. Grant May 25 '11 at 22:47
add comment

7 Answers

up vote 22 down vote accepted

In the big picture, If N is the number of people writing direct assembly code, then 0*N is a good approximation of the number of those folks who care about a visual way of doing it.

You could do it (Auto generated code / debug trace support / Intellisense!) - I doubt you will find users enough to support the system. MS got into the whole Visual * thing to enable easier programming. Assembly and easy don't go well together.

In terms of debugger support etc., these already exist.

share|improve this answer
    
Auto generated code for assembly is... programming in a compiled language ! I think the people who write code in assembly are hacking existing software, like to make crack for video games, and I don't think Microsoft would like to help this kind of programmer. –  Ubiquité May 25 '11 at 23:11
6  
@Ubiquité - If you think the only reason people use assembly is to hack existing software you are mistaken. There are lots of other reasons to use assembly. I suspect at least 2-3% of the code for Windows is coded in assembly. Otherwise the task of say porting it to Power PC would have been to easy to pass up. –  Ramhound Jun 16 '11 at 18:01
add comment

Well, there isn't really any point in it existing. First off, the Visual * family uses the .NET runtime for operation (C++ can be an exception I believe). Assembly is at the lowest level for programming. It is a direct representation of the opcodes of a processor. there isn't a point running assembly using the .NET runtime because the .NET runtime has a slower execution speed than true low-level assembly, and so would assembly run on the .NET runtime.

share|improve this answer
5  
I remember a time when Visual* family didn't use .NET(remember VB original/ visual c++/ visual J++!) - if you have not worked on COM/DCOM/MFC, consider yourself lucky. –  Subu Subramanian May 25 '11 at 13:57
    
The equivalent or writing assembly in .Net is writing IL... and that's no fun at all –  Earlz May 25 '11 at 14:09
    
Technically if somebody uses the term Visual C++ they more/less mean Microsoft's managed C++ CIL –  Ramhound Jun 16 '11 at 18:04
    
@SubuSubramanian: Don't forget Fortran! I remember when we had to buy that as a separate product (in a shrink-wrapped box) just so that we could compile it as a dll and invoke the functions in our (Visual) C++ code. –  ccoakley Dec 15 '11 at 17:33
add comment

The Visual family still has plenty of unmanaged code in it's make up so isn't pure .Net as yet and in that guise an IDE with some of the capabilities of Visual Studio but for x86 assembly language development isn't completely absurd. The thought of it have drag-and-drop development is somewhat challenging. I've not used C++ in VS for some time but I'd expect that it probably still has the asm directive so there is some assembly language development done in VS already.

share|improve this answer
add comment

To be honest, I can't see why anyone would want Visual assembler. Lack of demand would be a good reason not to do it.

However, if someone went and did some market research to discover it was a desirable product, then maybe the idea could be revisited if the demand was worth the effort.

Personally if I was in the mood for writing assembly code, I think I'd do it directly and forget about using a Visual product for it. In fact - I may lack the imagination - I really can't see how you'd do it.

share|improve this answer
add comment

If there was a need for Visual Assembly in the market, someone would have already made a commercial suite, another smart guy would have made an OSS clone and another three or four similar, altough half-baked products would have emerged.

That's why no Visual Assembly.

share|improve this answer
2  
    
Please see my answer if you think this hasn't already been done. –  user54262 May 17 '12 at 8:41
    
@TristonJ.Taylor - Right, but what is the size of the market for this product ? Is it a few hundred, even a few thousand programmers, then you could argue that there is virtually no market for this product, right ? –  Jas May 17 '12 at 11:24
add comment

No point. The .NET JIT will almost certainly compile "hotspots" in your code down to far more efficient assembly than you could possibly write. In fact, I would wager that in 99% of the cases where it matters, the .NET JIT would generate better assembly than the people who wrote the .NET JIT could write.

The reasons for this are that

  • When you're compiling things "on the fly", you can figure out which optimizations would give you the biggest wins (you can go a step further and specialize code that is too general. For example, if a method takes an Object parameter, but it's actually being called with a String parameter 99% of the time, you can generate a specialized version of the method for Strings, which might be faster, since you might be able to make more assumptions about the parameter's properties)
  • You don't have to worry about making the assembly actually readable/maintainable, so ugly hacks are more acceptable than in code that is intended to be read by a human
  • You can optimize code for the specific architecture/machine you're running on, even if the developer wrote it on an entirely different machine
  • JITs can do even funkier things, many of which are being discovered/invented as I write this post.

Since a good JIT will probably out-perform the majority of hand-written assembly while retaining portability for the programmer (as opposed to the JIT writers, who would have to write an implementation for each architecture/os combination), the only reason to still use assembly is in kernel development etc., or if you absolutely need to squeeze the very last bit of performance out of your code and have benchmarked and proven that a JITted high-level language version of the code just won't cut it.

Note that most existing JITs will not quite outperform well-tuned hand-written assembly (they'll get pretty close though), but it's quite likely that in the (near) future, they will.

EDIT: To see exactly what can be accomplished by a good JIT even in a traditionally slow language like JavaScript, check out http://bellard.org/jslinux/ . It's an x86 emulator running Linux written entirely in JavaScript. You'll need Firefox 4.0+ for it to work since it uses the JS typed array specification which is only available in Firefox (it's available in Chrome too, but the latest Chrome seems to have introduced bug(s) that prevent the emulator from working correctly).

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.