Skip to content

updated 6502 support.#1498

Merged
aquynh merged 3 commits intocapstone-engine:nextfrom
ksherlock:next_6502
Jun 3, 2019
Merged

updated 6502 support.#1498
aquynh merged 3 commits intocapstone-engine:nextfrom
ksherlock:next_6502

Conversation

@ksherlock
Copy link
Copy Markdown
Contributor

Includes various improvements for the MOS 6502. Also adds support for WDC 65c02, WDC w65c02, and WDC 65816.

This is a breaking change due to changes in enums so it's against the next branch.

…also adds support for 65c02, w65c02, and 65816.
@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 28, 2019

@s-macke please ack.

@s-macke
Copy link
Copy Markdown
Contributor

s-macke commented May 29, 2019

I am impressed. You left almost no line untouched. Slowly I regret, that I named it MOS65XX. But it sounded reasonable after I read the Wikipedia page.

The patch is acknowledged.

I am a lit bit worried, because this is the second time, that we changed the notation of the disassembly. The first one was the closest to the original notation.

Does capstone support an option to change the disassembly format?

@ksherlock
Copy link
Copy Markdown
Contributor Author

I originally added a CS_OPT_SYNTAX_MOTOROLA option which would control if $ or 0x is used as the hex prefix but took it out for now since I thought that might be more controversial and it should also apply to the M6800 and M68K CPUs.

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 30, 2019

I am impressed. You left almost no line untouched. Slowly I regret, that I named it MOS65XX. But it sounded reasonable after I read the Wikipedia page.

if you think it is best to rename the arch, go for it. then we can just keep MOS65XX as an alias.

The patch is acknowledged.

I am a lit bit worried, because this is the second time, that we changed the notation of the disassembly. The first one was the closest to the original notation.

Does capstone support an option to change the disassembly format?

that is OK. we have some options for that, such as CS_OPT_UNSIGNED.

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 30, 2019

I originally added a CS_OPT_SYNTAX_MOTOROLA option which would control if $ or 0x is used as the hex prefix but took it out for now since I thought that might be more controversial and it should also apply to the M6800 and M68K CPUs.

i dont see any issue having this option removing prefix $/0x.

This will use "$" as a hex prefix instead of "0x"
@ksherlock
Copy link
Copy Markdown
Contributor Author

I've added back the CS_OPT_SYNTAX_MOTOROLA code. Historically, 6502, 68k (and I presume 6800) used $ as a hex prefix instead of 0x. Default is 0x but cs_option(handle, CS_OPT_SYNTAX, CS_OPT_SYNTAX_MOTOROLA); sets it to use $.

Comment thread arch/MOS65XX/MOS65XXDisassembler.c Outdated
break;
}


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove these extra blank lines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra blank lines removed.

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 31, 2019

@s-macke, do you have any comments?

@s-macke
Copy link
Copy Markdown
Contributor

s-macke commented Jun 3, 2019

I am fine with the changes.

@aquynh aquynh merged commit 05b3fbf into capstone-engine:next Jun 3, 2019
@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Jun 3, 2019

merged, thanks!

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Jun 3, 2019

@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants