The project is for class CMSC216 Introduction to Computer Systems. This project extends upon Project #3.
Assignment Due Date: Mar 10, 2022
Assignment Score: 82 out of 100
The language used: C
Assignment Purpose: Get a better understanding of low–level hardware and machine–language concepts. Write a simulation of a self-defined CPU, which is able to execute self-defined machine-language programs.
Functions implemented:
- unsigned short disassemble(Nelovo machine, unsigned short max_addr)
- short check_branches(Nelovo *const machine, unsigned short max_addr, unsigned short *const invalid_instr)
- unsigned short load_program(Nelovo *const machine, const Mach_word program[], unsigned short num_instrs)
- unsigned short get_register(Nelovo machine, unsigned short which_register, Mach_word *const result)
- unsigned short get_memory(Nelovo machine, unsigned short which_memory_addr, Mach_word *const result)
- Status run_program(Nelovo *const machine, unsigned int max_instrs, unsigned short *const num_instrs_executed, unsigned short *const invalid_instr, unsigned short trace_flag)
For my implementation, click here. Contact me if you cannot access it.
Click here for the detailed project description