From ef427a9944e805103ed8c82d3944918b3d46d53f Mon Sep 17 00:00:00 2001 From: Loic GUEGAN Date: Sun, 2 Sep 2018 20:02:27 +0200 Subject: Clean code --- MicSim/micsim.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'MicSim/micsim.py') diff --git a/MicSim/micsim.py b/MicSim/micsim.py index a45311f..c4cb6c3 100755 --- a/MicSim/micsim.py +++ b/MicSim/micsim.py @@ -4,15 +4,8 @@ from components.microprogram import Microprogram from components.ram import Ram from components.caretaker import Caretaker -c=Caretaker() # Init components -RAM=Ram(c,5000) # Init ram -RAM.loadRamFile("./ram.txt") # Load Ram from file -c["RAM"]=RAM # Add ram to components - +c=Caretaker(5000) # Init components (stackLocation) +c["RAM"].loadRamFile("./ram.txt") # Load Ram from file mic=Microprogram(c) # Create micro program -mic.run() # Run the micro program - -mic.rd() -print(bin(c["MDR"])) -print(RAM.dump()) +mic.run(800, 1024) # Run the micro program with run(constantPoolLocation,stackLocation) -- cgit v1.2.3