Commit 624cfefa authored by Christina Yu's avatar Christina Yu
Browse files

lab7 done

parent b0ec8f67
......@@ -163,6 +163,12 @@ for t in itertools.count():
if val & 0b1 == 0b1:
# exit
print(f"{t:20d}:", display())
status = "TEST PASS" if RF.read(10) == 0 else "TEST FAIL"
print(status)
if status == "TEST FAIL":
exit(1)
if status == "TEST PASS":
exit(0)
RF.display()
print (f"SYSCALL: exit ({val>>1})")
sys.exit(val>>1)
......@@ -222,11 +228,11 @@ for t in itertools.count():
# break
if imem[PC.out()] == 0:
status = "TEST PASS" if RF.read(10) == 0 else "TEST FAIL"
print(status)
if status == "TEST FAIL":
exit(1)
if status == "TEST PASS":
exit(0)
print(status)
#print("Done -- end of program.")
print("------------------------------< Final reg values >------------------------------")
RF.display()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment