mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 23:29:16 +00:00
Fix little-endian issue with IND output
Also change the ADDR label to emit a hex code, not a decimal code.
This commit is contained in:
parent
1abf0223c8
commit
3c46a41351
@ -106,8 +106,8 @@ mos6502_dis_operand(mos6502 *cpu,
|
|||||||
case IMP:
|
case IMP:
|
||||||
break;
|
break;
|
||||||
case IND:
|
case IND:
|
||||||
ind_address = vm_segment_get(cpu->memory, value) << 8;
|
ind_address = vm_segment_get(cpu->memory, value + 1) << 8;
|
||||||
ind_address |= vm_segment_get(cpu->memory, value + 1);
|
ind_address |= vm_segment_get(cpu->memory, value);
|
||||||
if (jump_table[ind_address]) {
|
if (jump_table[ind_address]) {
|
||||||
mos6502_dis_label(stream, ind_address);
|
mos6502_dis_label(stream, ind_address);
|
||||||
} else {
|
} else {
|
||||||
@ -388,7 +388,7 @@ mos6502_dis_jump_label(mos6502 *cpu,
|
|||||||
inline void
|
inline void
|
||||||
mos6502_dis_label(FILE *stream, int address)
|
mos6502_dis_label(FILE *stream, int address)
|
||||||
{
|
{
|
||||||
fprintf(stream, "ADDR_%d", address);
|
fprintf(stream, "ADDR_%x", address);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user