Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Processor definitions to set which hexadecimal prefix or suffix to use. #7079

Open
hippietrail opened this issue Oct 23, 2024 · 0 comments

Comments

@hippietrail
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Not a real "problem" as such. Just a "nice-to-have".

Most assembly languages I've used (off the top of my head) use a $ prefix for hexadecimal integers and addresses. Ghidra currently uses a 0x prefix for some and a h suffix for others. I think the former for operands and the latter for data? At least one microprocessor used a > prefix (Texas Instruments TMS-9900). I mostly know the 0x prefix from C.

Describe the solution you'd like
One of the processor/language definition XML files would have at least four settings:

  • hex operand affix
  • hex operand is prefix or suffix
  • hex data affix
  • hex data is prefix or suffix

(Could be extended later to cover binary or octal later if the need arises.)

Additional context
This is very low priority. It may help a little for people who want to use Ghidra listings in various assemblers, but it's mostly cosmetic.

I'd like to work on it myself. I've looked into it already and there are some places I would have to ask for guidance.

See also
I started a discussion topic about this a few weeks ago when I thought Ghidra might already have such a setting: In a new processor/language definition, is it possible to change the hex sigil from $?

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

No branches or pull requests

1 participant