D. A. S. S. I.
ATARI 800/130 (Cross-) Disassembler



contents:



At the beginning:

D.A.S.S.I. and other disassemblers

At the beginning some short infos about the working methods of disassemblers. There are principal two groups, the first and the second generation. Disassembler of the first generation, so called 'Line by Line'-Disassembler translating the machinecode line by line, references and programcodebranches are not detected. This kind of disassembler surely is known all atari freaks from some atari memory monitors/debuggers like SUBMON (Burkhard Rau) and others. Disassembler of the second generation 'analysing' the machinecode first, then they can disassembling like the way the processor goes in the program. Therefore datafields in machinecode can be detected. Also a nice effect are the referencelists. A short overview:

Line by Line Disassembler (1. Generation): Following Disassembler (2. Generation) - DASSI:
  • very fast
  • less memory needed
  • runs on ATARI (6502)
  • no detection of datafields
  • no automatic abort of disassembling
  • must helped by hand
  • slower, more than one passes required
  • more memory needed
  • a solid solution runs only on PC
  • 80% detection of datafields
  • aborts disassembling on runtime branches
  • must helped by hand

Through this advantages and disadvantages it is not very good possible to implement such a disassembler on the ATARI. Who want / can make this, please e-mail me, i have some ideas how to do this!


Special assemblerfeatures of the ATARI (65C02-CPU)

The 6502 CPU has some features, that make a disassembling much harder:

All these items make it hard to disassemble a program 100% automaticly. You must do this step by step. If you want a good result you must use the debugger and the disassembler alternately.




The program:

DASSI pages

In the DASSI mainscreen are the following pages::

The pages are changed automaticly to do a faster job, after some actions, the correspondending page will automaticly be displayed.

Each of these pages has its own textfile on your harddisc. You can use these files by other programs. Extern modificated (added comments) can also be linked if they had the following format:

0000: Menemonic                 ; comment
xxxx............................                 adress hexadezimal: 0000-FFFF
....x...........................                 ':' strictly needed !!!
.....x..........................                 the space is recommended
......xxxxxxxxxxxxxxxxxxxxxxxxxx                 dont care about this


Disassembling a program

Some hints - (FAQ):

Switch the DASSI window in full display mode, some infos are hard readable under 800x600. I dont make this program again for 640x480 cause in one year the standard is 1024 x768 or more ...

The same with the CPU speed, if you have a flickering window (right down) when the realtime disassembler is started (after each keypress), take a faster PC !

The creation of the referencelist should be switched off during normal work.

The creation of reference infos in the sourcelist should be switched off if you dont want to use this file in other programs.

A disassemblerstart it the addresses $100-$3ff (system) and $c000-$ffff (os) stops the disassembler if the correspondending option is switched off. Set it on if you want disassemble programs that use the ram under the os.

A menu is not installed, cause all available functions are reachable over the toolbar.

The used disassembler opcodes are reachable through a standard textfile (ass65xx.tab). You can add some illegal instructions if you know it! Please send me this changed file back, ill make it available to all!

open a file for disassembling:

You can disassemble an ATARI-COM File (header $ffff), or the bootsectors of an ATR-disc (hedaer $9602). On opening the file it will be loaded into mermory and will be analysed, the jump in points are detected. A protocol of the loading procedure is showed in the page filestructure. DASSI can also be started from tools like (ATARI Filelister, shows the atr contents in realtime) per commandline. Overgive the disassembling file name in the commandline.

starting the disassembler:

Pressing 'disassemblerstart' will start the disassembler (what other???). This will only work if a correct file is loaded! The process can take some seconds and goes over more than one passes. A gauge shows the progress. After disassembling a sourcelist and a logfile are available. Detected errors must followed and analyzed by hand! The disassembler cant follow anymore if there are errors! Mostly there are errors on wich the disassembler runs into an datafield, these (not detected) datafields must be set by hand. There are some circumstances under the automatic datafiled detection fails:

A second problem is the aborting of the disassembler if it cant follow any branches that are only known at program runtime:

Use the debugger to calculate the jump adresses or set it by hand. Start the disassembler once more.

starting the debugger:

The actual state of the emulated 6502 processor is showed in the headline of the sourcelist window. Use the following buttons to start

The debugger hangs, for instance, if the programcode waits for changes in register $14 (in the atari it is incremented in cycle by the OS). This is NOT emulated by the debugger (it has no OS). Also the debugger hangs in keyboard routines (theres no emulated pokey / keyboard!). You see an 'hanging' if the pc is changed a little bit, periodicly and jumps back. Press STOP button.

Use the debugger single step to browse through the sourcelist, jumps are executed, also JSR, the return address is stacked, an RTS will jump back.

Most ATARI COM files loading in addresses at that the program cant start. Use the debugger under this circumstances. Such programs have a little transfer routine at the beginning. Start this with the debugger. Start the disassembler one more, now it will do a greater job:

The debugger now transfers the programmcode at hte right place. This is also useful for crypted or 'zipped' parts of machinecode.

working with DASSI:

It is necessary to analyse the program yourself. Use the disassembler as a tool. It cant do your work (this time). Save your projects, you can start it at these points the next day. Also you can send the projectfiles to others. If somebody has the program it can be disassembled correct in one pass if you have the correct project files. Let's make a bibliothek with a projectfile for every atari program !

I have tested around 20 programs. Only one of them was disassembled perfect and complete after the first start. (try 'behind jaggi lines')


Additional infos:

sorry, not available in english this time, look again tomorrow!




To all atari freaks, adverts from the author:

This program is FREEWARE ! This program should only give away together with all parts and no changes!

I only wanted to see how a sourcefollowing disassembler with automatic datafield detection can be programmed. I think the program is ok, but i had to see that i need a debugger to have a program wich is able to work. I dont wanted to write a debugger (a complete debugger with all features can be a hole selfexistend program). I know that the parts of the DASSI projects are not complete.

If theres some feedback from interested people, i will see what i can do to make this program more perfect. (includes a better help). I have enough ideas for the future like this:

If theres no feedback i will see DASSI as a little, nice, completed experiment!

MacFalkner@aol.com (André Bertram)        HCRBurk@t-online.de (Burkhard Rau)


00000000