From b9923e600058348f1272bd99bc9b93350509c6aa Mon Sep 17 00:00:00 2001 From: uvok Date: Wed, 14 Jan 2026 17:57:37 +0100 Subject: cb: lint1 --- nandgame/assembler/createbin.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'nandgame') diff --git a/nandgame/assembler/createbin.py b/nandgame/assembler/createbin.py index 9f1105d..e2497cd 100755 --- a/nandgame/assembler/createbin.py +++ b/nandgame/assembler/createbin.py @@ -7,25 +7,25 @@ nandgame instructions, skip reserved bits. """ # ENDIANNESS = 'big' -ENDIANNESS = "little" +endianness = "little" def main(): with open("allins.bin", "wb") as f: ins = 0x0000 # ldi A, 0 - f.write(ins.to_bytes(2, byteorder=ENDIANNESS)) + _ = f.write(ins.to_bytes(2, byteorder=endianness)) ins = 0x00FF # ldi A, 255 - f.write(ins.to_bytes(2, byteorder=ENDIANNESS)) + _ = f.write(ins.to_bytes(2, byteorder=endianness)) for ins in range(0x8000, 0xFFFF + 1): # unused bytes, force 1 if (ins & 0x6800) != 0x6800: continue - f.write(ins.to_bytes(2, byteorder=ENDIANNESS)) + f.write(ins.to_bytes(2, byteorder=endianness)) import sys @@ -33,8 +33,8 @@ import sys if __name__ == "__main__": if len(sys.argv) == 2: if sys.argv[1] in ["little", "le"]: - ENDIANNESS = "little" + endianness = "little" elif sys.argv[1] in ["big", "be"]: - ENDIANNESS = "big" - print(f"Use Endianness: {ENDIANNESS}") + endianness = "big" + print(f"Use Endianness: {endianness}") main() -- cgit v1.2.3