6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 8:41 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: 65c02 assembly language
PostPosted: Fri Dec 17, 2010 12:04 am 
Offline

Joined: Mon Dec 28, 2009 1:46 am
Posts: 23
Is there any software on the internet that can convert hexadecimal coded instruccions of the 65c02 to an assembly langauge of this processor?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 17, 2010 2:10 am 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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.

Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 17, 2010 4:53 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
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?
I programmed my own one:http://www.baltissen.org/newhtm/auto_dis.htm. I'm happy to give you the latest EXE that still runs under DOS or in a DOS-box.

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:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 18, 2010 8:58 pm 
Offline
User avatar

Joined: Thu Mar 11, 2004 7:42 am
Posts: 362
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/retrocomputing/apple/apple1/basic/a1basic.dis (Apple 1 BASIC)
http://www.ittybittycomputers.com/IttyBitty/TinyBasic/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.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 14, 2012 3:33 pm 
Offline

Joined: Fri Sep 14, 2012 4:30 am
Posts: 3
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 21, 2012 12:10 am 
Offline

Joined: Tue Jul 24, 2012 2:27 am
Posts: 679
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.

_________________
WFDis Interactive 6502 Disassembler
AcheronVM: A Reconfigurable 16-bit Virtual CPU for the 6502 Microprocessor


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: