Skip to content

Commit

Permalink
Adding 65C832 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeakohn committed Oct 2, 2024
1 parent 3cab090 commit f64cb9d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
22 changes: 18 additions & 4 deletions asm/65816.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,16 @@ int parse_instruction_65816(AsmContext *asm_context, char *instr)
else
if (size == 24)
{
print_error(asm_context,
"Cannot force long value in immediate mode.");
return -1;
if (asm_context->flags == 32)
{
size = 32;
}
else
{
print_error(asm_context,
"Cannot force long value in immediate mode.");
return -1;
}
}
else
{
Expand Down Expand Up @@ -891,7 +898,14 @@ int parse_instruction_65816(AsmContext *asm_context, char *instr)
}
else
{
bytes = op_bytes[op];
if (size == 32)
{
bytes = 4;
}
else
{
bytes = op_bytes[op];
}
}

// write output
Expand Down
24 changes: 24 additions & 0 deletions common/cpu_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,30 @@ struct _cpu_list cpu_list[] =
NO_FLAGS,
},
#endif
#ifdef ENABLE_65816
{
"65832",
CPU_TYPE_65816,
ENDIAN_LITTLE,
1,
ALIGN_1,
1,
0,
1,
0,
0,
0,
0,
SREC_16,
parse_instruction_65816,
NULL,
link_not_supported,
list_output_65816,
disasm_range_65816,
Simulate65816::init,
32,
},
#endif
#ifdef ENABLE_6800
{
"6800",
Expand Down

0 comments on commit f64cb9d

Please sign in to comment.