def checkCodeSize(self, program): ignore, ignore, realBytes = asmgenerator.count(program) if realBytes > 0x4000: raise Exception('Internal error: Code size exceeds 0x4000 bytes, would overlap with external data fields')
def printAsmStatistics(self, program): instructions, codeBytes, realBytes = asmgenerator.count(program) print "Program size: %s bytes (%s code bytes, %s instructions)" % (realBytes, codeBytes, instructions)