Programming Project: Encoding/Decoding Names



Project Goals:

This project has two objectives — to give you additional experience with C programming, and to complete several utility functions that will be useful for two future projects, a Disassembler and an Assembler.

The utility functions in this program work with three tables that associate names (strings) with integer codes. For example, one of the tables (the MIPS Registers Table) associates a set of register names ("$zero", "$at", "$t0", etc.) with code numbers (0, 1, 8, etc.). The other two tables associate two different sets of instruction names with their own sets of codes. (One set of instructions is known as the "IJ" instructions; the other is known as the "R" instructions.) For now, we don't care what the names or numbers mean, we just want to develop functions that will return either the right code for a given name, or the right name for a given code. In other words, we want to look up a name in a table and return the associated code, or look up a code in the same table and return the name.

You may work on this project individually or in groups of two.


Steps: