Programming a Disassembler
This isn't really a C question, but there is no general programming board for this king of stuff so I decided this was as good of a place as any. Anyway, I've been wondering a few thing about how dissassemblers work. First, you start parsing a file looking for opcodes, and run into something that looks like an opcode but actually is data. Is there any way to discern between the two? Second, if during the parsing the end of a chunk of data, and the beggining of an opcode when put together looked like an opcode in and of themselves, how would you catch this? Last, when you're dealing with a fixed lengnth opcode processor, will opcodes only be stored at addresses that are multiples of the opcode lenth, or can they be anywhere?