`Hello my friends.
In order to learn more about Computer Architecture, my task is to build a simple Java CPU Emulator program.
The goal is to read the processor instructions from a file into RAM memory, then move them into cache memory and process them in the processor. For that goal, I have created several classes:
Memory.java
Cache.java
Processor.java
InstructionLoader.java
Emulator.java
You can find the full code at this link:
pastebin.com/At3KUU8s
OK, now my question is why does my fetch-decode-execute cycle not work as it should? All I’m getting is 0 (zeros).
I tried to debug the main method in Emulator.java, but when the program reaches the last code line, all I get is a blank screen.
Any ideas on what might be wrong?
What to fix and run/debug my program the right way?`