commenting disassembled code

Dale Klein daklein at netzero.net
Fri Mar 9 03:52:28 GMT 2001


	A while back, I asked about any little programs to help with commenting 
disassemblies.  There were a couple of suggestions, thanks, but none of 
them panned out for me.  I ended up making a little thing for myself, to 
keep comments that have already been worked out, and add them into output 
from rerunning the disassembler.
	In case anyone's interested, there's a comment.zip file on incoming, with 
the qb source and command line executable for this little 'utility'.
	It works with 3 parameters, like this.....
comment 
input_uncommented_disassembly.xyz   comment_file.xyz 
output_commented_disassembly.xyz
	
	the comment_file.xyz has look like the example below, and have
A:  addresses that match the input disassembly
B:  addresses in order
C:  two semicolons in front of a comment line that you want to go after an 
address
D:  one semicolon in front of a comment that you want to go on an address 
line.  only the	
text after the semicolon will be pasted in.

	After running the disassembler, edit the output and add comments.  As you 
do sections of code, copy the commented parts into the comment_file.

	3BEA	39              	ret	
;;jump table called from 3C13
;;3BEB	                	db	$08, $02, $08, $75, $3B, $F7, $3B, $F7, $3B, $F7
;;3BF5	                	db	$3C, $62, $39

3BF8	FE 06 FE        L3BF8:	ldX	L06FE
3BFB	8C 55 AA        	cmpX	#$55AA
3BFE	26 26           	bne	@2
3C00	BD 3C 27        	call	L3C27		;subr to clr Carry if m0600=255
3C03	25 13           	bcs	@1		;branch if carry set (if C=1)
3C05	F6 06 02        	ldaB	L0602		; contents of m->B
3C08	C1 05           	cmpB	#$05		;compare B & 5
3C0A	22 09           	bhi	@0		;branch if higher


Dale

PS..
if anybody wants to look, here's where I'm at with disassembling the 94-95 
LT1 program, just for my own personal insanity I guess, using Peter 
Gargano's 
DHC11.       http://www.geocities.com/daawagon/9495_lt1_pcm_disassembly.htm
haven't really gotten that far, was trying to find stuff to keep tcc from 
unlocking during shifts.  very interesting though, some of the subs are 
EXAcTLY the same
as the anht_hac.  the lag filter, and 2d lookup subs, and probably a couple 
others.  Those two right there can help link up a lot of unknown memory 
variables with known ones.  I'm almost to the point of mapping the known 
addresses from the t-side to the e-side via the SPI interface code.


Shop online without a credit card
http://www.rocketcash.com
RocketCash, a NetZero subsidiary
----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo at lists.diy-efi.org




More information about the Gmecm mailing list