Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #CONVERT THE FILE BOOT.ASM TO BOOT.BIN FIRST
- import binascii
- with open("boot.bin", "rb") as f:
- binary_data = f.read()
- hex_values = ["0x{:02X}".format(byte) for byte in binary_data]
- print(hex_values)
- hex_string = ", ".join(hex_values)
- print(hex_string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement