1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-12-30 13:29:18 +00:00

Convert to integer for Python 3

This commit is contained in:
Mike Naberezny 2013-10-26 17:36:52 -07:00
parent 90774cb9b6
commit 7034d8f595

View File

@ -318,7 +318,7 @@ class Monitor(cmd.Cmd):
while True:
prompt = "\r$" + (self.addrFmt % start) + " " + \
(" " * (1 + self.byteWidth / 4) * 3)
(" " * int(1 + self.byteWidth / 4) * 3)
line = console.line_input(prompt,
stdin=self.stdin, stdout=self.stdout)
@ -398,7 +398,7 @@ class Monitor(cmd.Cmd):
cur_address += 1
bytes_remaining -= 1
fieldwidth = 1 + (1 + self.byteWidth / 4) * 3
fieldwidth = 1 + int(1 + self.byteWidth / 4) * 3
fieldfmt = "%%-%ds" % fieldwidth
return "$" + self.addrFmt % address + " " + fieldfmt % dump + disasm
@ -569,7 +569,7 @@ class Monitor(cmd.Cmd):
if len(split) == 2:
if split[1] == "-1":
# load a ROM to top of memory
start = self.addrMask - len(bytes) / (self.byteWidth / 8) + 1
start = self.addrMask - len(bytes) / int(self.byteWidth / 8) + 1
else:
start = self._address_parser.number(split[1])
else: