Skip to content

This is a basic CPU emulator software. It loads program code from text file.

Notifications You must be signed in to change notification settings

KaanSuner/Java-CPU-Emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Java-CPU-Emulator

This is a basic CPU emulator software. It loads program code from text file.

Run

./java source input.txt

Example

Following example code is an app that can compute the sum of the numbers between 0 and 20.

  1. START
  2. LOAD 20
  3. STORE 200
  4. LOAD 0
  5. STORE 201
  6. STORE 202
  7. CMPM 200
  8. CJMP 15
  9. LOADM 202
  10. ADDM 201
  11. STORE 202
  12. LOADM 201
  13. ADD 1
  14. STORE 201
  15. JMP 6
  16. LOADM 202
  17. DISP
  18. HALT

About

This is a basic CPU emulator software. It loads program code from text file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages