Schauble@mit-multics.arpa (Paul Schauble) (01/15/86)
Does anyone have any experience with an MSDOS disassembler called Dis-n-Data? This package purports to trace the object program flow of control to identify instructions and data areas. I am very curious how well it works. Thanks for any comments, Paul .
glen@intelca.UUCP (Glen Shires) (01/16/86)
> Does anyone have any experience with an MSDOS disassembler called > Dis-n-Data? This package purports to trace the object program flow of > control to identify instructions and data areas. I am very curious how > well it works. > > Thanks for any comments, > Paul > . It sounds like a disassembler I wrote once in which you simply tell the disassembler where the code starts, and the dissassembler traverses the code. A map is kept to keep track of which instructions have been traversed. The disassembler simply follows the code, and takes the unconditional jumps and continues until either it runs into a halt instruction, or an instruction already traversed. Every time a subroutine or conditional branch is found, the address is placed on a stack. When a traversal stops because it runs into a halt or already traversed instruction, the disassembler grabs an address off this stack and traverses it until a halt or marked instruction. In this way all the code can be traversed and marked, leaving the unmarked bytes assumed to be data. Such an algorithm is good, but not perfect because of such things as indexed (table) jumps and self-modifying code. A tricky disassembler may even try to traverse these types of demons, but then things get complicated real fast. Even the simple algorithm above can be quite useful when indexed jumps are used, as long as they are marked and the user can manually tell the disassember how big the jump table is. -- ^ ^ Glen Shires, Intel, Santa Clara, Ca. O O Usenet: {ucbvax!amd,pur-ee,hplabs}!intelca!glen > ARPA: "amd!intelca!glen"@BERKELEY \-/ --- stay mellow