6502-sim/input-convert.py
2023-06-15 17:08:20 +00:00

18 lines
211 B
Python

from itertools import chain
input = """
1721
979
366
299
675
1456
"""
l = map(int, input.split())
f = lambda n: ((n & 0xff), ((n >> 8) & 0xff))
for n in chain.from_iterable(map(f, l)):
print(f"{n:02x}")