3 ms·
So I'm working on an AVR emulator in pure C when I have time. 'tptacek gave me some hints on getting started: https://news.ycombinator.com/item?id=5787373 https
by euroclydon 13y ago
So I'm working on an AVR emulator in pure C when I have time. 'tptacek gave me some hints on getting started: https://news.ycombinator.com/item?id=5787373 https://news.ycombinator.com/item?id=5787373
He suggested to take HEX as the input and I never looked back. I see this emulator just reads the bytes from the binary.
Does anyone know if the GCC AVR toolchain spits out a file I could do the same thing with?
- haldean 13y agoOh that's an interesting idea. I actually considered writing my own assembler to some format that I could read, but then I realized: * It's way cooler if you can use other peoples' assemblers and still have your bytecode interpreter work * Using other peoples' assemblers is a good way to sanity check any assumptions you made (this bit me with branches, for example; I was branching from the location of the current instruction when the spec is to branch from the location of the next instruction) * It's easier to read binary than to read hex strings and transform them to binary. Plus, transforming binaries to readable hex is as easy as "hexdump -c". :)