MicroJava Tools

MJTools

Legal

Links

MJAsm - MicroJava Assembler

The MicroJava Assembler (MJAsm) is a simple assembler for the MicroJava Virtual Machine. The instruction set of the assembly language is given in the MicroJava Specification (pdf document) in section B.2. Additionally, the assembler supports jump labels and two assembler directives: .ds and .org. The directive .ds specifies the size of the data memory while .org specifies the first instruction to run (mainPC).

MJAsm is implemented in Java and requires Java Runtime Environment to run. It works on Windows, Linux, Solaris, Mac and other Java enabled platforms.

Usage

File mjasm.jar is an executable Java archive that does not depend on other Java libraries. Double click should start the application (shown in Figure 1).

Figure 1: MicroJava Assembler

Examples

Examples are provided within the application in the Help/Examples menu. There are four examples: HelloWorld.mjb, ByteEcho.mjb, IntEcho.mjb and JumpLabels.mjb. The JumpLabels example, in debuging mode, is shown in Figure 2.

Figure 2: MicroJava Assembler Debug