Programming Language Interpreter Design MIPS
Objective:
The goal of this assignment is to apply your understanding of MIPS assembly language to implement a program that simulates a simple esoteric language interpreter, specifically for a language called “Brainfry.” This task will test your ability to work with memory manipulation, loops, and conditional branches in MIPS.
Description:
Brainfry is an esoteric programming language that operates on a virtual “tape” consisting of memory cells, where each cell can hold a single byte. The tape is manipulated by moving a “tape head” (a pointer to the current memory cell) left or right, and by incrementing or decrementing the value at the current memory cell.
You will implement a MIPS program that reads a series of Brainfry commands and executes them on a simulated tape of 5,000 memory cells. The following Brainfry commands must be supported in your MIPS implementation:
All other characters should be ignored by your MIPS program. The end of the program is signified by a ~ character, after which the input to the Brainfry program follows.
Constraints:
Example Input:
>++[–<]~
Expected Output:
Task:
1. Implement the MIPS program: Write a MIPS assembly program that correctly interprets and executes a Brainfry program as described above.
2. Test your program: Make sure your MIPS program works correctly with different Brainfry inputs.
