I'm working on a 6809 python processor emulator for educational purposes.
I have a short binary file on the hard drive. The data is raw assembler output for a Motorola MC6809 that has the following contents:
0000300000338cfd4f5f10eec9100012126ec90010adc900186e4c12124cb10255270339121232624f5cf1025527046e4c12126ec4ff00000000
Actual code data:
338cfd4f5f10eec9100012126ec90010adc900186e4c12124cb10255270339121232624f5cf1025527046e4c12126ec4
Using python3.9 how do I get this into a list mem[] as either:
mem[00,00,30,00,00,33,8c,fd,4f,5f,...]
I suspect since ascii characters are involved here quotes would be needed
or
mem[0x00,0x00,0x30,0x00,0x00,0x33,0x8c,0xfd,0x4f,0x5f,...]
all I can seem to do is get the data back as
mem[b'00',b'00',b'30',b'00',b'00',b'33'.b'8c',b'fe',b'4f',b'5f',...]
But I can't seem to typecast these byte values into anything usable.
I've tried a half a dozen methods, with some questionable/unusable results.