Update your bookmarks! This blog is now hosted on http://xoofx.com/blog

Monday, October 19, 2009

Adding asm x86 Syntax Highlighting to Visual Studio 2008

While i use to develop some part of 4k's intro code in x86 assembler, it is quite annoying to switch from Visual Studio to an external editor in order to have a correct syntax highlighting. I like the principle of an Integrated Development Environment, and VS is a great tool for that. Based on my previous experience on NShader, i have decided to implement a syntax highlighter for x86 ASM... and thanks to NShader's work, it was really easy to code it! For anyone looking for a place to start when developing a LanguageService Package for Visual Studio, this project is easy to follow and gives a basic implementation for syntax highlighting.

So, i have just released AsmHighlighter under codeplex. This is an AddIn for Visual Studio 2008 (it won't work for Express Editions, as they don't allow communities addIns) that enables syntax highlighting for x86 ASM language. MASM syntax is mainly supported and NASM syntax is partially supported. I have no more reason to switch to an external editor! Cool!

Apart from that, the nice thing with MASM is that it is possible to debug directly under Visual Studio, making a mixed C-ASM project much easier to develop (VS is adding building rules for ASM files automatically to your project). On the other hand, i was not able to debug with NASM as nasm cannot generate debug information under the win32 platform...

I also found a cool project called JWasm developed by Japheth : JWasm is a MASM v6 compatible assembler (with v8 bug fixes and improvements)  that is able to output win32,win64 as well as linux elf object files. Quite interesting when you still want to develop with a MASM syntax and be able to export your work under linux without moving to another assembler! Japtheth even provides JWasm.rules files for an integration under Visual Studio. It's even possible to debug JWasm output objects files under VS, that's great!

Now, you may have noticed that all of this is not strictly related to 4k-64k intros coding, but well, you can consider AsmHighlighter as a productivity tool for 4k-64k development! ;)

No comments:

Post a Comment

Comments are disabled

Note: Only a member of this blog may post a comment.