This commit changes the behavior of dcc6502, so that it consults the
return value of fread(), and then increments the value of byte_count
by the number returned by fread(), rather than implicitly incrementing
it every time.
Previously, a warning occurred during compilation, because the return value
of fread() was ignored. Instead, the number of bytes in the input file were
counted implicitly by incrementing a byte_count variable after every fread()
call.
Additionally, I created a two-byte test input file consisting of the
bytes #$a9ff, which corresponds to LDA #$FF. When dcc6502 tried to
disassemble this input file, it reported that the file had a size of three
bytes. It reported the first two opcodes correctly, but then incorrectly
displayed a BRK as the third opcode.
After this change, the input file now has a reported size of two bytes,
without the phantom BRK opcode at the end.
* Added rules for branch taken/not taken
* Fixed incorrect adding of cycles for many ALU instructions
* Fixed timing for ASL, DEC, INC, LSR, ROL, and ROR
* Renamed global opcode_table to g_opcode_table
* Normalized all hex output to be capitals
* Fixed all compiler warnings
* Killed union usage
* Started using C99 fixed width types
* Started normalization of whitespace width in listing
* Simplified internal addresses computations