This post is not a class on assembly. It is about a tool I use and hope others will find useful. An understanding of x86 assembly will help.
What is the RAVM, and why create it?
Learning how programs work at the assembly level is crucial towards gaining a holistic understanding of modern day computing. While studying Computer Science at the United States Military Academy, I was introduced to a fantastic piece of in-house developed software: the MARC and MARASM (available publicly here). The MARC is a virtual 16-bit CPU programmed in ADA. When paired with the MARASM, an assembler for the MARC, cadets can write, assemble, and run assembly programs with a simplistic toolchain.
The MARC is a perfect example of using simple applications geared towards education to teach concepts, not features. Students trying to learn new concepts need tools that just work. I wanted to borrow the concepts of the MARC and create a piece of software which could be used as a stepping stone towards x86 assembly. More specifically, I wanted:
- A more comprehensive, but not complicated, instruction set which more closely mimicked an x86 instruction set.
- 32-bit, little endian words.
- A way to help students visualize what was happening in memory while their programs were running.
- A code base programmed in C, making it more accessible for expansion and hacking by others.
With these goals in mind, I created the RAVM, the Rainbowsandpwnies Assembler and Virtual Machine. The RAVM comes with three parts: assembler, disassembler, and virtual machine. Here’s how you can grab a copy of the RAVM in Ubuntu:
sudo apt-get install git build-essential libncurses5-dev git clone git://github.com/endeav0r/ravm.git cd ravm make