#!/usr/bin/env python3 with open("allins.bin", "wb") as f: ins=0x0000 # ldi A, 0 f.write(ins.to_bytes(2)) ins=0x00ff # ldi A, 255 f.write(ins.to_bytes(2)) for ins in range(0x8000, 0xffff + 1): # unused bytes, force 1 if (ins & 0x6800) != 0x6800: continue f.write(ins.to_bytes(2))