Skip to content

University project for assembly language programming lab

Notifications You must be signed in to change notification settings

vorabrijesh/Mips-Assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mips Assembler

An assembler for a subset of the MIPS instruction set.

How to use

The assembler will take a file written in assembly language as input on the command line and will produce an output file containing the MIPS machine code. Each line in the input assembly file contains either a mnemonic, a section header (such as .data or .text) or a label (jump or branch target.

The assembler supports the following 46 instruction set:

  • "lw"
  • "lb"
  • "sw"
  • "sb"
  • "add"
  • "addu"
  • "sub"
  • "subu"
  • "slt"
  • "sltu"
  • "and"
  • "or"
  • "xor"
  • "nor"
  • "sll"
  • "srl",
  • "sra"
  • "mult"
  • "multu"
  • "div"
  • "divu"
  • "addi"
  • "addiu"
  • "andi"
  • "ori"
  • "xori"
  • "lui"
  • "slti"
  • "beq"
  • "bne"
  • "blez"
  • "bgtz"
  • "bltz"
  • "bgez"
  • "j"
  • "jal"
  • "jalr"
  • "jr"
  • "mfhi"
  • "mflo"
  • "syscall",
  • "la"
  • "move"
  • "li"
  • "nop"
  • "sltiu"

Compile and Run

Complile :
$ g++ assembler.cpp -o assembler

After compiling, run:
$ ./assembler test.asm test.o log.txt

About

University project for assembly language programming lab

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published