Looking for a disassembler and suitable assembler

Programming the 6502 microprocessor and its relatives in assembly and other languages.
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: Looking for a disassembler and suitable assembler

Post by White Flame »

BigEd wrote:
If a disassembler can pass the round trip test, then its output is useful for making changes to the code.
That is only true when the edits do not change the size of anything.

Literal absolute addresses, alignment requirements, vector tables, graphics data at magic locations, etc, all get skewed otherwise. If you want to add entries to data tables, the code is usually littered with immediate values having baked-in prior lengths of those tables. The more the disassembler can "understand" what the code is doing, and the constraints it assumes in order to work, the more robustly it can generate editable output.

Generally, such reverse engineering involves taking a raw disassembly, and hunting down all the relative constraints between all these magic numbers and magic locations, deciding which should be labels, which addresses should be fixed & where padding applies, which immediate values are computed from deltas between labels, which items are required to be on the same page, etc. Only then does the code become as editable as any normal asm project. That's also a reason why there's less focus on 100% round-trip capabilities, because you need to go through everything anyway to enable making non-trivial edits.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Looking for a disassembler and suitable assembler

Post by BigEd »

White Flame wrote:
That is only true when the edits do not change the size of anything.
An extremely good point!
Dennis
Posts: 6
Joined: 05 Mar 2017

Re: Looking for a disassembler and suitable assembler

Post by Dennis »

fyi: as i couldn't find a windows port of the xa/dxa package, I've first tried that under freebsd (worked great!) - now I've created a win32 port:

https://github.com/Dennis1000/xa65-win32
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: Looking for a disassembler and suitable assembler

Post by sjgray »

I just released CBM-Transfer 1.00 and it includes an interactive disassembler, plus it supports most commodore machines. I did a lot of work on the disassembler part. Give it a try!
http://www.6502.org/users/sjgray/softwa ... mxfer.html

As for assemblers I use ACME. My disassembler will output ACME compatible code but also more generic code as well.

Steve
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: Looking for a disassembler and suitable assembler

Post by White Flame »

I spent a lot of time trying to get the VB6 dependencies running on Win 7 64-bit, to no avail. Since it's such an old & afaik unsupported dependency, could you provide some instructions of how to bolt that into modern machines?
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: Looking for a disassembler and suitable assembler

Post by sjgray »

White Flame wrote:
I spent a lot of time trying to get the VB6 dependencies running on Win 7 64-bit, to no avail. Since it's such an old & afaik unsupported dependency, could you provide some instructions of how to bolt that into modern machines?
Did you try the "complete package with installer"? I have been able to get the VB IDE running on every windows upto and including Windows 10, and most versions of windows include the runtimes. In any case the above should install and include all files you need... unzip it and run setup.exe . You should install OpenCBM first, then install CBM-Transfer into the same folder.

Steve
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: Looking for a disassembler and suitable assembler

Post by White Flame »

Yes, I tried the complete package installer, as well as both VB6 dependencies, and lots of googling for VB6. Is OpenCBM a requirement or optional? I just wanted to check out the disassembler, not perform actual transfers.
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: Looking for a disassembler and suitable assembler

Post by sjgray »

It should run without opencbm as long as you do not enable "check EXE's" in the options. Did you run the setup with administrator privileges? Are you getting error messages?
Although I extensively tested, I made a lot of changes for CBM-Transfer 1.00 and it's possible there are bugs..

We should probably take this offlist. Email me if you are still having problems and I'm sure we can sort it out.

Steve

Addendum:
http://blog.danbrust.net/2015/09/14/ins ... OKNOfnyuUk
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: Looking for a disassembler and suitable assembler

Post by White Flame »

I installed opencbm, and it does run now.

The options window did not come up before; it only displayed errors about missing components (I didn't record the exact error before installing opencbm).

So I would personally reword the site to list opencbm as a requirement, as the option to not require it isn't available until opencbm is installed. ;)
sjgray
Posts: 29
Joined: 15 Aug 2009

Re: Looking for a disassembler and suitable assembler

Post by sjgray »

White Flame wrote:
I installed opencbm, and it does run now.

The options window did not come up before; it only displayed errors about missing components (I didn't record the exact error before installing opencbm).

So I would personally reword the site to list opencbm as a requirement, as the option to not require it isn't available until opencbm is installed. ;)
Glad it's working.

I will have to do some more testing on some other machines. I think it should run without opencbm, so if that's not the case I'd like to fix that. My other idea is to break out the disassembler/viewer to it's own program. Hardly anyone knew the disassembler was part of the program...

Last night I downloaded Visual Studio 2017 and am playing with that to see if it's worth the effort to port the code. Also, in case you missed it, CBM-Transfer is open source so you can look at the code yourself.

Steve
Post Reply