Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!usc!rpi!batcomputer!llenroc!cornell!uw-beaver!ubc-cs!alberta!ami-cg!cg From: cg@ami-cg.UUCP (Chris Gray) Newsgroups: comp.sys.amiga.emulations Subject: Re: Emulator Mechanics (sorry long post) Message-ID: Date: 9 Mar 91 08:11:28 GMT References: <4992@mindlink.UUCP> <1991Mar6.212548.9641@mentorg.com> <1312@macuni.mqcc.mq.oz> Organization: Not an Organization Lines: 23 In article <1312@macuni.mqcc.mq.oz> ifarqhar@sunb.mqcc.mq.oz.au (Ian Farquhar) writes: [Discussion of using a recursive approach to run through all branches and calls to tag bytes as being code/data.] >However, on the 68K, this approach is probably quite profitable. Why? >Because there is enough correspondence between the 6502 and 68K >instructions sets (both having the same ancestor, the 6800) to mean that >the compilation process is reasonably simple. My Amiga disassembler, Dis (which is available somewhere or other; I believe I sent it out last year some time) does this. The thing it has troubles with are things like function variables. In writing disk-resident libraries, a lot of that is done, so it doesn't work too well on such things. It has special code to handle case/switch statements generated by several compilers, but an assembler program doing a branch table will usually mess it up. I don't think there is much hope of an automated translater. Perhaps some kind of interactive one, so that the user can aid in identifying what is code and what is data. -- Chris Gray alberta!ami-cg!cg or cg%ami-cg@scapa.cs.UAlberta.CA