-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Disassembler option? #30
Comments
This would be incredibly cool, indeed! But with instructions being as free-form as they are now, I imagine it wouldn't be possible to do a reverse mapping so easily in general... Maybe only for a subset of instructions with simple representations? About the parameter type specifications, please see here while I haven't got the proper documentation done! |
i think the most difficult part would be dealing with Tokens. as they are the only things that effect the actual instruction mnemonic. so basically a de-tokenizer.
and it would take that and tear it apart into it's seperate possibilites:
which should make mapping a lot easier. (i assume) another thing that i would see as difficult would be labels, since the assembler itself has no idea what each instruction does it would be impossible to figure out where to put labels... unless the CPU file would somehow allow you to specify what instructions are conditional branches, subroutine calls, and returns. since those 3 are the only ones required to implement such an automatic labeling system. anyways, it seems like a fun "little" challange to reverse this assembler somehow, |
Both issues closed ? Nobody working on this ? I 'm considering to implement this as a part of my custom cpu project ... |
No, this issue isn't closed yet. It's just kind of a difficult-to-implement feature, so not really a priority. 😅 |
One thing i would really like is the ability to disassemble existing Binary files.
it could be done with the Command prompt like assembling but would require more parameters
for example:
customasm -d <bin file to disassemble> <CPU file to describe the Instruction set> <starting address of the Program> <starting address inside the file where it starts to disassemble from (optional)> <end address in the file where it stops disassembling (optional)>
example:
customasm -d test.bin 6502.cpu 0xE000
and the format for the file generated could be similar to other Disassemblers:
<Address> <Data> <some space> <Labels> <Instructions>
example, this 6502 Disassembler:
I know this format already kinda exists for Assembling, but without showing labels (which is kinda a shame) and the formatting sometimes breaks if you have a lot in a single line... plus it doesn't use uppercase only HEX, which is just Heresy.
obviously it would be a lot of work and i'm asking for a lot.
but hey maybe it could be a long term goal.
and one last thing, the current version added some kinb of type specifications for values. it would be awesome if those were explained more in the documentation... i didn't see them there atleast.
The text was updated successfully, but these errors were encountered: