I've been memorizing opcodes and thought I would try my hand at manual disassembly. Mostly for the heck of it.
Up until now, I've always relied on an assembler to handle everything. However, here's what I find when I do a raw hexdump:
Code: Select all
$ hexdump Pitfall.bin | head
0000000 d878 00a2 00a9 0095 e89a fad0 7520 a2fa
...
opcode is D8, which is the CLD instruction. Here's the dissassembly from what I can gather:
Code: Select all
CLD
SEI
BRK
LDX #00
LDA #00
...
see the memory address $F000 anywhere. What am I missing? Also, if you disassemble further, it seems that some of the bytes
are backwards... for instance, 'fad0'... d0 is 'BNE' and 'FA' is not an opcode. Does this mean that 'FA' is stored little endian or something?
I know that BNE $FA would be "branch backwards 6 bytes". I guess there's more than one question here.
Thanks