MIPS Assembler and IDE
This is my project for Computer Organization, Shi Qingsong, Zhejiang University.
The MIPS assembler is based on the MIPS 32 specification, with some custom extensions.
The MIPS IDE is built upon SWT, packaged with launch4j for Windows executable.
This MIPS assembler mainly complies with the specifications from "MIPS Assembly Language Programmer’s Guide" and "MIPS32 Architecture For Programmers Volume II: The MIPS32 Instruction Set".
Numerous error checks are done during the process of assembly, including illegal operand, immediate overflow, missing or duplicate label, text and data section overlap, etc.
Available output formats include binary, COE and a debug mode.
Disassembling can be done by opening a binary or COE file. All the instructions listed above and labels are supported, and multiple bytes of zero can be compressed into a
Graphical user interface
Native GUI on Linux, Windows and Mac OSX.
Drag-and-drop to open a file.
Line number and syntax highlighting.
Command line interface
usage: mipsasm [OPTION]... -g,--graphical Launch graphical user interface -h,--help Display this help and exit -i,--input <FILE> Read input from FILE -o,--output <FILE> Write output to FILE -t,--terminal Launch in terminal mode -w,--writer <TYPE> Use writer of TYPE. TYPE can be 'binary', 'coe', 'debug' (the default), or 'hexdebug'
# "Hello World" in MIPS assembly # From: http://labs.cs.upt.ro/labs/so2/html/resources/nachos-doc/mipsf.html # All program code is placed after the # .text assembler directive .text 0x0 # The label 'main' represents the starting point main: # Run the print_string syscall which has code 4 li $v0, 4 # Code for syscall: print_string la $a0, msg # Pointer to string (load the address of msg) syscall li $v0, 10 # Code for syscall: exit syscall # All memory structures are placed after the # .data assembler directive .data 0x20 # The .asciiz assembler directive creates # an ASCII string in memory terminated by # the null character. Note that strings are # surrounded by double-quotes msg: .asciiz "Hello World!\n"