65c02 assembly language
65c02 assembly language
Is there any software on the internet that can convert hexadecimal coded instruccions of the 65c02 to an assembly langauge of this processor?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
I'm sure there is. That would be a disassembler. The problem is that it won't give meaningful labels (and definitely no comments explaining anything), and it would probably choke where there's data mixed in with instructions. In other words, it is not at all like getting the source code back.
Last edited by GARTHWILSON on Fri Dec 17, 2010 6:10 pm, edited 1 time in total.
Re: 65c02 assembly language
ricard60 wrote:
Is there any software on the internet that can convert hexadecimal coded instruccions of the 65c02 to an assembly langauge of this processor?
Garth already mentioned the problem of distinguishing the data and program. I solved it partly by analysing the program instruction by instruction. The problem is that my program isn't an emulator and can't handle indirect jumps and vectorized parts. I solved this by giving it the possebility to disassemble unknown areas.
I don't mind either to do the disassembling for you. You find my email address on my site.
Code: Select all
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| URL: www.baltissen.org
There are two types of disassemblers. There are a symbolic disassemblers that Ruud and Garth mentioned above.
Here are some examples of the output (with some comments added afterwards, and some labels replaced with more meaningful names afterwards):
http://www.brouhaha.com/~eric/retrocomp ... 1basic.dis (Apple 1 BASIC)
http://www.ittybittycomputers.com/IttyB ... sic/TB.asm (Tiny BASIC)
http://retro.hansotten.nl/uploads/6502docs/FOCALV3D.ZIP (Focal)
The other type might be called a numeric disassembler (which does not generate labels). Here is an example of that type of output.
http://home.comcast.net/~mjmahon/AP1BASIC.txt (also Apple 1 BASIC, which also has a few comments added afterwards)
This type of disassembler can be found in the Monitor of Daryl Rictor's (8BIT) SBC-2 (and, I think SBC-3). He has source code you can download on his website.
The first type of disassembler is helpful when you want to generate assembler source from object code. The second type of disassembler is helpful for debugging when you want to see what instructions are actually in memory.
For disassemblers of the first type, I've tended to use disassembly "scripts" for producing source code, rather than trying to figure it out as you go, like Ruud's approach.
Here are some examples of the output (with some comments added afterwards, and some labels replaced with more meaningful names afterwards):
http://www.brouhaha.com/~eric/retrocomp ... 1basic.dis (Apple 1 BASIC)
http://www.ittybittycomputers.com/IttyB ... sic/TB.asm (Tiny BASIC)
http://retro.hansotten.nl/uploads/6502docs/FOCALV3D.ZIP (Focal)
The other type might be called a numeric disassembler (which does not generate labels). Here is an example of that type of output.
http://home.comcast.net/~mjmahon/AP1BASIC.txt (also Apple 1 BASIC, which also has a few comments added afterwards)
This type of disassembler can be found in the Monitor of Daryl Rictor's (8BIT) SBC-2 (and, I think SBC-3). He has source code you can download on his website.
The first type of disassembler is helpful when you want to generate assembler source from object code. The second type of disassembler is helpful for debugging when you want to see what instructions are actually in memory.
For disassemblers of the first type, I've tended to use disassembly "scripts" for producing source code, rather than trying to figure it out as you go, like Ruud's approach.
Re: 65c02 assembly language
The Apple ][DB and Apple //gs monitors both disassemble 65c02 opcodes as well. You can either download the Apple ][DB (db == debugger) rom and configure various apple emulators to use it. You can select the ][DB rom in JACE from the configuration screen directly (JACE supplies the ][DB rom already). From there you can load the binary into memory and ask the monitor to list it out for you. So for example if you loaded the program at $6000, then from the monitor you would type 6000L
-
White Flame
- Posts: 704
- Joined: 24 Jul 2012
Re: 65c02 assembly language
You could also go the whole hog and try out the free version of IDA. It's a professional quality interactive disassembler.
http://www.hex-rays.com/products/ida/su ... ware.shtml
edit: meh, they took out 6502 (and all non-x86) support for the free version, nevermind.
http://www.hex-rays.com/products/ida/su ... ware.shtml
edit: meh, they took out 6502 (and all non-x86) support for the free version, nevermind.