added if __name__ == "__main__" test for mainline

This commit is contained in:
James Tauber 2011-08-06 17:46:38 -04:00
parent 55d700fc68
commit a48716a900

View File

@ -636,10 +636,12 @@ class CPU:
# @@@ IRQ
# @@@ NMI
mem = Memory(0x100000)
# available from http://www.easy68k.com/paulrsm/6502/index.html
mem.load("A2ROM.BIN", 0xD000)
cpu = CPU(mem)
curses.wrapper(cpu.run)
if __name__ == "__main__":
mem = Memory(0x100000)
# available from http://www.easy68k.com/paulrsm/6502/index.html
mem.load("A2ROM.BIN", 0xD000)
cpu = CPU(mem)
curses.wrapper(cpu.run)