Skip to content

lakshans/cpu-simulator-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run instructions

  • build project with Gradle
  • run main class: simulator.CpuSimulator with 1 argument: instruction filename
  • example: simulator.CpuSimulator instructions.txt
  • add instruction files you want to run to 'input' directory
  • you can reference just the filename when running project, and it will look for file in 'input' directory
  • output of cache values (numbers greater than 0), register A and B values output in log form

Assumptions

  • input format will always be "INSTRUCTION VALUE,VALUE"
  • for any invalid instructions (doesn't match the list of instructions to support), they will be ignored
  • when there is overflow, modulo of the value by 256 is taken

Improvements/questions for future iteration

  • input file validation and handling (is it the correct format, is the instruction supported?)
  • should we reject an instruction file if invalid instructions or skip over them?
  • support arbitrarily more for-use registers (ex. C, D, E, etc)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages