Final answer:
This project involves writing a Python program to implement the transfer between assembly code and machine code in hexadecimal format using command line arguments.
Step-by-step explanation:
In this project, you will write a Python program simulator_xxxxxxx.py, where xxxxxxx is your CSU ID, to implement the language transfer between the assembly code and the machine code in hexadecimal format (8 hex characters). You use the command line argument "-a" to specify that the input is an assembly code and "-m" to specify that the input is a machine code.
For example, if your CSU ID is 1234567, the program should be named simulator_1234567.py. To convert assembly code to machine code, you can create a dictionary that maps each assembly instruction to its corresponding machine code instruction. You can then read the assembly code line by line, look up the corresponding machine code instruction in the dictionary, and output the hex value.
To convert machine code to assembly code, you can reverse the process. Read the machine code line by line, look up the corresponding assembly instruction in the dictionary, and output the assembly code instruction.