Friday, April 10, 2015

NIOSii Assembly language – Syntax highlighting


TLDR version: Download here , instructions included.

Coding without syntax highlighting is a pain in the butt. That is even more true in assembly with non-intuitive instructions and non-elaborate names for registers etc. This semester I had the course Computer Organization (ECE243). When we weren’t playing with lego and drawing CPU diagrams, we were busy coding the Altera DE2 board with assembly. I could just do most of the work in C though. But are you a C-programmer or are you a hacker? :P

Apparently Assembly language for NIOSii processors is not really popular ….well, not popular enough to have syntax in Sublime Text or Notepad++ !
It turns out, making a custom syntax highlight language is pretty easy in Notepad++ *. There is even a GUI for making it! So I made two! – one for light background and another for dark. Here is how you use it:

        - Download the files from here and unzip them
        - Read the ReadMe.txt if you’re bored of this post already
        - Open Notepad++
        - Click Language > Define your language > Create New > Import
        - Select either of the .xml files provided
        - Get out of that user defined language editor
        - You will now see your new language in the language list

You will get something like this instead of one monotonous colour….Capture
 
 
 
 
 
 
 
 
 
 
 
 
 








* I have to take this opportunity to condemn the author of Notepad++ for pushing his opinions about a certain French “newspaper” down our throats in one of the latest revisions of the software. I wonder where his opinions are at when real journalists get killed instead.