MIPS Assembler


The MIPS Assembler (cs241.binasm) translates a MIPS assembly language program into a MIPS machine language binary file suitable for use by the mips.twoints and mips.array frontends to the MIPS emulator. The assembler reads the assembly language source text from standard intput, and outputs the machine language binary to standard output. Any error or warning messages are sent to the standard error stream.


To assemble the file inttest.asm and write out the MIPS binary inttest.mips, then run it with mips.twoints:
cs241.binasm < inttest.asm > inttest.mips
mips.twoints inttest.mips

To assemble the file arraytest.asm and write out the MIPS binary arraytest.mips, then run it with mips.array:

cs241.binasm < arraytest.asm > arraytest.mips
mips.array arraytest.mips