from __future__ import print_function

This commit is contained in:
cclauss 2017-09-02 08:57:41 +02:00 committed by GitHub
parent 878700d78d
commit 62c7d4b2b3
1 changed files with 8 additions and 9 deletions

View File

@ -3,6 +3,7 @@
# originally written 2001, updated 2011
from __future__ import print_function
import BaseHTTPServer
import json
import re
@ -16,9 +17,7 @@ bus = None # socket for bus I/O
def signed(x):
if x > 0x7F:
x = x - 0x100
return x
return x - 0x100 if x > 0x7F else x
class ROM:
@ -718,9 +717,9 @@ class CPU:
op = self.read_pc_byte()
func = self.ops[op]
if func is None:
print "UNKNOWN OP"
print hex(self.program_counter - 1)
print hex(op)
print("UNKNOWN OP")
print(hex(self.program_counter - 1))
print(hex(op))
break
else:
self.ops[op]()
@ -735,9 +734,9 @@ class CPU:
op = self.read_pc_byte()
func = self.ops[op]
if func is None:
print "UNKNOWN OP"
print hex(self.program_counter - 1)
print hex(op)
print("UNKNOWN OP")
print(hex(self.program_counter - 1))
print(hex(op))
break
else:
self.ops[op]()