VS.Net 2003 Intellisense addin for MASM

Started by sluggy, September 06, 2005, 11:40:34 AM

Previous topic - Next topic

sluggy

WinCC has referred to this in the past, and he released a version for VS.Net2002.
Since then, i am happy to say that i have taken his project, chewed it up, spat it out, chopped it into little pieces, and then rewrote it from the beginning (because i screwed it up :green ). I now have the first beta release for download, you can find it here. If you think the licence is strict, it isn't, it is just to protect my ass against any potential morons out there  :8)

What is this package?
It is an addin for VS.Net 2003, it is automatically loaded when you start up the IDE. It integrates into the IDE, and gives you extra power, flexibility and capability when editing asm files. Now you can experience some of the cool benefits of the VS IDE while editing your assembly projects.

What features does it include?
Currently, it only has two features:
- syntax colouring. This gives you a huge increase in productivity because it makes your source a lot easier to read. Currently the colours cannot be changed, but they will be fully configurable in an upcoming release.
- block commenting. You can highlight a block of code, and comment the whole block using the CTRL+K CTRL+C key chord. You can also uncomment a block of highlighted text by using the CTRL+K CTRL+U chord.
This might seem like a limited feature list so far, but they are the two features that i personally appreciate the most. I have also put in place a lot of plumbing code in preparation for future features. And if i waited till all features were complete then it would never get released.

What is the scope of the syntax colouring?
All x86, FPU, MMX, SSE/II/III keywords up to and including the P6, Xeon and Pentium M processors, privileged and non privileged. I went through the latest Intel instruction reference that i have and included all the keywords it had. Including ones i have never seen before and probably will never use. All up there are around 530 keywords. Plus a bunch of MASM directives and native macros. Also included are 1665 Win32 structs (these were originally done by WinCC).

Ok, i'm sold. Where do i get it, how do i install it?
To download it, visit this link. It is packaged as an msi file, which means all you have to do is double click on the file, and you get a nice Windows installer wizard. You lucky lucky people, i am so nice to you. The install automatically detects whether you have VS.Net 2003 installed, where it is, and installs into the appropriate VS folder, and sets up the appropriate registry keys. NOTE: because registry keys need to be installed, you should run the install as Administrator.

What if i have a problem? Where do i report bugs?
What do you mean? There are NO bugs!!! It works perfectly on my machine!!!  :bdg :dance: :cheekygreen: Should you find a bug, report it in this forum. Make sure it has a short but descriptive title. Be concise and correct in your report, that helps me fix the problem a lot faster. Remember: i am a professional developer, i eat testers for breakfast  :bdg

What if i have a feature request?
You can post those in this forum too. I have a list of planned features, but i will not tell you what they are yet, i would rather get a list from you without influencing it.

Did you write this addin in asm?? Did ya? Did ya?
Umm, no..... It is written in a mixture of managed and unmanaged C++. The guts of the VS IDE is still COM based, you don't wanna be doing that in asm..... and i wanted to interface to the framework, so i needed to use a managed language.


Before you finish reading, i want to give a big "thank you" to WinCC - this was something i had wanted to do for a long time, and he got me started down the right path  :U
Okay, that about covers it. Get downloading!!



Jeff

oooh, sounds good.

here's a rather stupid question, how does one go about using the addin?  I downloaded, installed, opened an asm file in VS and not much has changed.  I looked in the addin manager and toolbox and found no references to MASM.

also for critique:
my only gripe about it so far other than the thing not working is that it resets my layout.  as in, all my custom toolbars and positionings were reset back to default after the install.  you might want to find a way to not do that.  :)

manhattan

You should try the VS2005 SDK (http://msdn.microsoft.com/vstudio/extend/SDKDownload/)

I think you can implement a lot of features of the C editor : member completion, tool tip window, "Go to definition...", etc.

GregL

sluggy,

I had about the same experience as Jeff. I don't see any difference, no Intellisense, and it trashed all my customizations, bummer. This would be great, but it seems to have problems. I would be glad to help improve it.

Now to redo all my customizations.

sluggy

Thanks for your reports guys, i will look at that tonight when i get home from work.

As you can probably guess, i didn't experience this in my test installs, but something is always bound to go wrong  :red.

One question: have you guys got VS installed for "all users", or "just me"? Also, what are the extensions on your asm files? The syntax colouring is only set up to operate on files with the extensions .asm, .api and .inc.

Cheers

GregL

sluggy,

I am using Visual C/C++ .NET 2003 Standard Edition, does it require the full Visual Studio package?. Looks like I installed it for 'All Users'. My MASM files have the .asm or .inc extension.


Jeff

as for me, I have Visual Studio .NET 2003 Academic.  IIRC, its the full studio with extras.  it was a full install for all users.  all my source and includes have the .asm and .inc extensions respectively.  i use the ide to code and debug while using external tools to assemble and whatnot.

sluggy

Hi guys,

Greg: I haven't tested this on the "standard" version of VS, but it should still work, "standard" just means that you are missing some of the exotic tools and extras that come with something like the "enterprise" level.

Jeff: yours should also not be a problem. With MS products, "academic" is usually the standard or professional level product, but with the upgrade capability crippled, so that when the next upgrade comes out you have to buy the full version, not use the cheaper upgrade.

It seems the problem is that i missed a couple of registry keys in the install, which means the dlls are installed, they are just not properly hooked up yet. Notice that for one of the registry entries, you will have to replace the value i have there with the path to the folder the masm32.dll is installed in (don't put a slash on the end). Also ensure you use double slashes in the path, when the values are in the registry you will see that they have become single slahes.
Here is the solution that should work for you. Just copy and paste the following text into a text file (use Notepad), rename the file so that it has a .reg extension, then double click on it so that they get entered into the registry.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Services\{AB5D0853-8D94-4F17-80BE-5E4EBC1C0A8F}]
@="{221F0EB7-30F7-45FF-AE73-5968B167CF09}"
"Name"="MASM32"


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AddIns\MASM]
"SatelliteDllName"="Masm32.dll"
"SatelliteDllPath"="<path to folder where dll installed, with no slash on the end> i.e.: C:\\Program Files\\Visual Studio 2003\\Common\\bin"
"FriendlyName"="MASM Addin"
"LoadBehavior"=dword:00000000



Note that i will be uploading a new install about 24 hours from now, so at that point in time this solution will become redundant.



Jeff

Just to let you know, I tried your solution and nothing seemed to happen still.  I think that's because I was missing a whole buch of keys.  No worries tho, i'll just wait for your update.

GregL

sluggy,

I added the registry entries. It then shows up in the Add-in Manager but I get an error when trying to enable it.

Quote from: Microsoft Development Environment
The Add-in 'MASM Addin' failed to load or caused an exception.
Would you like to remove this Add-in?
If you choose yes, you will need to reinstall the Add-in to use it again.

Error message: Class not registered

Error number: 80040154

I chose no. I then registered the MASM32.DLL with regsvr32, that succeeded. I went back into Visual Studio and got the same error. I'll try the new install when you post it.

I appreciate your effort here sluggy.  :thumbu








GregL

sluggy,

I loaded a MASM program into Visual Studio, and it's working. Both the syntax coloring and the commenting.  Despite the error in the Add-in manager.  :U


Jeff

just to let you know, that addin manager error i get too.  i just thought that it was a common error because i also have another addin (that came with the academic) which gives the same error when trying to enable.

GregL

#12
Jeff,

I take it it's still not working for you. Try registering the DLL with regsvr32. Also, the path to MASM32.DLL in the registry ("SatelliteDllPath") must end with a slash.


sluggy,

I see I can change the colors in Tools, Options, Environment, Fonts and Colors. Is there a list of keywords that I can edit? Some words are colored when lowercase but not when uppercase. Some are not colored at all etc.


Jeff

registering the dll works.  but i think i would rather wait for sluggy to finish the fix.

tho it seems the highlighting is very limited and with problems ("sorry parsing could not recover").  but thats probably because it isnt completely fixed yet.  so far only "MOV" and "inc" are blue while numbers and comments are gray.

the commenting worked out good.  would it be possible to adjust it so an undo uncomments everything? (right now i would have to undo each line individually).  i cant say much more on this yet so i'll have to wait a bit.

Citric

Hi Sluggy

Has the install been update?

Cheers Adam