#13081 - poslundc - Thu Dec 04, 2003 9:40 pm
I'm picking this subject up from Mike D's comments in the Bullet-Sprite thread in Coding.
Are there any super-functional IDEs out there for coding assembler? Mine pretty much does syntax highlighting and that's about it.
I'm envisioning some kind of system that dynamically keeps track of your register usage in a separate window, lets you assign variable names to registers, and do things like hilight a block of code and click on a free register to automatically plonk in a loop.
C'mon, you've all thought about how neat it would be to have a system like this. I'd be surprised if it exists, but does anyone know of anything that approaches it?
What other kinds of features would you like to see in it?
Dan.
#13083 - torne - Fri Dec 05, 2003 12:20 am
Nothing like this exists, AFAIK. However, I'm writing it. =) Rather than tracking register usage or anything, I am just implementing fully automatic register binding (refer to values using names, registers allocated optimally for you). What I'm currently writing is the high-level assembler itself. (http://whitefang.fitz.cam.ac.uk/proposal/)
In future, I will hopefully be extending it to be an Eclipse plugin. (www.eclipse.org, the most ridiculously powerful IDE for Java and a bunch of other languages that has ever been). This would be able to do far more useful things than just insert loops.. it would have automated refactoring support, code assist (completion of symbol names..etc), true semantic searching (i.e. can search for references to a particular variable, even if two variables have the same name).. generally, most of the functions of Eclipse's Java development toolkit.
Refactoring is the process of changing the design of existing code. A good example is the Extract Method refactoring: take a chunk of code and make it a seperate method (or function, if you prefer). This requires examining all inputs/outputs of that block of code, and is nontrivial (though pretty easy) to do as a human. Eclipse does it instantly and in a verified-correct way, for Java. I will be able to do the same thing with assembly. =)
If all you want is to plonk in loops and stuff, you can probably write emacs code or Vim plugins to do that. I'm after bigger targets; I want my assembly code to be selfdocumenting, trivial to make major changes to, incrementally assembled, and unit tested. At this point, many of the arguments against asm become irrelevant.
#13084 - torne - Fri Dec 05, 2003 12:24 am
Oh, if anyone *does* have feature requests for a high-level/smart assembler then I'll see what I can do about implementing them. Also, as soon as I have enough of my asm to actually use, I'll be releasing it here so you guys can experiment with it. It is currently a preprocessor; i.e. it just converts high-level asm to normal low-level asm that can be assembled with GNU as, but I will eventually implement object code output.
#13085 - tepples - Fri Dec 05, 2003 12:52 am
torne wrote: |
It is currently a preprocessor; i.e. it just converts high-level asm to normal low-level asm that can be assembled with GNU as, but I will eventually implement object code output. |
Even GCC uses GNU 'as' as a backend. All you need to do to get object code output is include a driver program that calls your preprocessor followed by arm-agb-elf-as, just as 'gcc' does.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#13086 - torne - Fri Dec 05, 2003 1:44 am
tepples wrote: |
Even GCC uses GNU 'as' as a backend. All you need to do to get object code output is include a driver program that calls your preprocessor followed by arm-agb-elf-as, just as 'gcc' does. |
1) My code is Java. (no holy war please; write your own damn assembler if you don't like it)
2) I can do cleverer things if I write my own binaries (by storing optimisation information in the object file for reuse..etc)
3) I want to integrate it with Eclipse and have it do incremental builds, which gas can't do. =)
#13087 - torne - Fri Dec 05, 2003 1:48 am
Not to say that it won't call as for now (it will). That's just why I will be implementing my own backend.
#13107 - Touchstone - Fri Dec 05, 2003 5:49 pm
torne wrote: |
2) I can do cleverer things if I write my own binaries (by storing optimisation information in the object file for reuse..etc) |
A wee bit of topic but still, I think it would be sweet to have a standalone exe version of your assembler that produce ELF object file (or whatever they are in GCC) so you could use it with the rest of GCC.
Of couse, that would prefferably be a Mac OS X executable. :)
_________________
You can't beat our meat
#13109 - torne - Fri Dec 05, 2003 6:09 pm
Touchstone wrote: |
A wee bit of topic but still, I think it would be sweet to have a standalone exe version of your assembler that produce ELF object file (or whatever they are in GCC) so you could use it with the rest of GCC. |
Uhm, yes, I will use the ELF format. I already have a java library for manipulating ELF objects. There is plenty of scope in ELF to store whatever extended attributes I like, and they will just be ignored by tools which don't understand them.
#13114 - Miked0801 - Fri Dec 05, 2003 7:30 pm
Hmmm. Sounds like I should go look at Eclipse some day soon instead of having to deal with Visual Studio and all its neat "Features" :)
<Mike dons Asbestos Underwear in preparation for the upcoming flame attack(s)>