Skip to content

SearParsley/mips_assembler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom MIPS Assembler

A MIPS assembler that translates .asm files into .hex machine code for a custom processor.

Demonstrates parsing, instruction encoding, symbol resolution, and output generation; hardware access is not required.

Technical Focus

  • Parsing, lexing, and tokenization of MIPS assembly
  • Symbol table management and label resolution
  • Instruction encoding into .hex format
  • Input validation and error handling
  • Modular design for future instruction set extensions

Constraints & Limitations

  • Targets a custom processor; physical hardware not required
  • Only a subset of instructions is supported, scoped specifically for this project
  • Testing is done via provided .asm files and expected .hex output
  • Design prioritizes correctness and clarity, with future extensibility considered

Example Usage

  1. Clone repository:
git clone https://github.com/SearParsley/mips-assembler.git
cd mips-assembler
  1. Assemble a file:
python assembler.py tests/task1_test1.asm
  1. Output:

output.hex:

v3.0 hex words addressed
00: 5040 508a 3282 5241 4002

Reviewers can inspect output.hex and data.hex to verify the assembler logic without needing the processor.

About

MIPS assembler converting `.asm` to `.hex` for a custom processor; demonstrates parsing, encoding, and symbol resolution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors