Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!iuvax!pur-ee!j.cc.purdue.edu!afb From: afb@j.cc.purdue.edu (Matthew Bradburn) Newsgroups: comp.binaries.amiga Subject: Dis: 68000 disassembler Message-ID: <5913@j.cc.purdue.edu> Date: Sun, 6-Dec-87 19:14:41 EST Article-I.D.: j.5913 Posted: Sun Dec 6 19:14:41 1987 Date-Received: Sat, 12-Dec-87 01:14:56 EST Organization: Purdue University Computing Center Lines: 424 Approved: Matthew Bradburn Here you go: A nifty disassembler. It works, it's PD, and it's written totally in assembly language. A delight for young and old! Written By: Greg Lee U.S.mail: 562 Moore Hall, Dept. of Linguistics, Univ. of Hawaii, HONO, HI 96822 INTERNET: lee@uhccux.uhcc.hawaii.edu UUCP: {ihnp4,dcdwest,ucbvax}!sdcsvax!nosc!uhccux!lee BITNET: lee%uhccux.uhcc.hawaii.edu@rutgers.edu Posted By: Matthew Bradburn comp.{sources,binaries}.amiga moderator ARPA: afb@j.cc.purdue.edu UUCP: j.cc.purdue.edu!afb BITNET: bradburn@purccvm.bitnet # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # dis.doc # dis.uu # This archive created: Sun Dec 6 19:12:19 1987 # By: Matthew Bradburn (Purdue University) echo shar: extracting dis.doc '(8452 characters)' cat << \SHAR_EOF > dis.doc Dis 68000 disassembler Greg Lee, February, 1986 The program Dis, its source code, and this document are in the public domain. Commands to Dis are:, which repeats the last listing command ('l','b','B','d', or 'a') 21 times , where command-letter is a single character from the list below , where the argument follows immediately after the command-letter In the list below, arguments in '[...]' are optional, and 'addr' is either a hexadecimal number or a symbol. One must enter numbers beginning with digits A-F with a leading 0, so they can be distinguished from symbols. Note that there is no provision for ignoring spaces before or after the command-letter. command argument what it does l [addr] list instructions Instructions are disassembled in a format which would be acceptable to a standard assembler, except that program counter relative references are given as hex addresses without a leading '$'. Such addresses would have to be assigned a symbolic value before any reassembly. b [addr] build symbols This does the same as 'l' above, except that symbols are made and added to the symbol table for any operand references which are PC relative, or absolute long. Symbols are not constructed for immediate opereands. Symbols are given types if they appear to be references to data (see the note below on symbol types). The operand of LEA is assumed by Dis to refer to instructions, although this is usually not the case. The target of JSR or BSR is given a symbol beginning with 'R', which will cause a preceding blank line when it is listed as a label. B [addr] Build locals This does the same as 'l' above, except that certain symbols that were probably made with the 'b' command are replaced with local labels of the form '1$', '2$',...,'999$'. The labels susceptible to replacement are those which begin with 'l' and are 7 characters in length. When a label not of this form is encountered in the listing, a counter is reset so that the next local generated will be '1$'. d [addr] dump in hex a [addr] ascii dump / addr address is this This assigns a new current address for the next listing command or symbol assignment, but nothing is listed. Convenient for assigning a symbol to an IO location which should not be accessed. = add symbol to table The string following the '=' is stored in the symbol table with a value equal to the address of the last instruction or data that was listed. The space available for the table is fixed at 1600 symbols containing 11,200 characters. Space occupied by no longer used symbols is not automatically reclaimed, but it may be reclaimed by saving the table to disk, then reading it back. r [ ] read file (symtab) A file of symbols and the addresses to which they refer is read from disk into Dis's symbol table. Any symbols already in the table are lost. The file will commonly have been created by by the 's' command below, but it could have been made or modified with an editor. Each line of the file should either be empty or consist of a hex number followed by exactly one space, and then the string of characters that is to make up the symbol name. s [ ] save to file (symtab) Any symbols currently in the table are saved in the file for future use. For both 'r' and 's', if no name is given, 'symtab' is assumed. q quit Exit to AmigaDos. w where is this word? W where is this longword? These two commands start searching memory at the current listing address, but skip memory from 80000 to FC0000. f file to disassemble The requested file is loaded and its first instruction is listed. The file must be a load module. If for some reason the file could not be loaded, the IO error code is shown in hex. > next code segment The segments of a load module are scattered in memory by the AmigaDos loader. This command alters the current listing address to the beginning of the code segment after the current one (which is the first segment, after a successful use of the 'f' command). If nothing is listed, this means there is no next segment (or, in 'p' mode, that the next segment is empty). < first code segment After one or more uses of the '>' command, you might want to go back and look at the first segment again. o [num] offset addresses All address references are adjusted by subtracting the number before being displayed. If no number is given, the last listing address is used. This command is of little use, given the availability of the below 'p' command. p offset by segment toggle After a file is loaded with the 'f' command, this will adjust all displayed addresses to offsets from the beginning of the first segment. Thus the segments will appear to occur in memory in the same order they occupied the the load file. In addition, the listing of memory locations outside any segment of the loaded file is suppressed, and after 'b', symbols are not constructed for references outside the loaded file. 'p' mode is automatic after loading a file. k keep output in file Subsequent listing output to the screen will also be kept in the named file (possibly for subsequent reassembly). The saving continues until you exit with the 'q' command. t trim toggle Suppresses or enables the display of addresses at the left-hand side of the screen. n print n lines after Notes on symbols. Symbols may be up to 255 characters and may contain any non-control characters. A symbol may not be associated with the value zero or a value greater than 7FFFFFFFH. Symbols are case sensitive. There are some special conventions for symbols. A symbol may carry information about the type of data being disassembled. If a symbol starts with '.' and one of the letters 'b','a','w','l','c','i', then code at this and subsequent locations will be treated as bytes, ascii characters, words, longwords, a constant block, or instructions, respectively. Otherwise, it will be treated as instructions. Two character symbols beginning with '.' are not listed, since they are assumed to be intended to carry only type information. When a symbol starts with '.c', Dis displays 'dcb.b , ' where the value is that of the byte found at the address of the symbol and subsequent memory locations, and the length is the count of the number of bytes in the block. The block is considered to end when: a byte with a different value is encountered, an address with an associated symbol is found, or in 'p' mode the end of a segment is reached. Dis does not do the counting of bytes in blocks very efficiently when there are lots of symbols in the table, so after 'dcb.b' has been displayed, some patience may be required. It is possible for a symbol to be concealed and not listed as a label at the left of the screen in some circumstances. This will happen when its address comes within an instruction being listed, or when its address is odd and a preceding address was listed as 'dc.w' or 'dc.l'. However, if a symbol with a following even address would be concealed by a 'dc.l' listing, this is prevented by listing data as bytes rather than as a longword. In 'p' mode, this is also done one word away from the end of a segment so as not to show data outside the segment. Symbols beginning with asterisks may be used to enter comments, in which case they are not listed as operands, but only as labels. If a single address is to have both a comment and an ordinary label associated with it, the comment should be entered after the ordinary label (else the comment will be lost). Multiple comments for a single address are listed in the order in which they were entered. Once a comment has been entered, it can be eliminated only in the way just mentioned, or by saving the symbol table and editing it. SHAR_EOF if test 8452 -ne "`wc -c dis.doc`" then echo shar: error transmitting dis.doc '(should have been 8452 characters)' fi echo shar: extracting dis.uu '(11852 characters)' cat << \SHAR_EOF > dis.uu begin 644 Dis M```#\P`````````#``````````(```5^```JU````?8```/I```%?D'Y```(D MJD*00?D```"N0I!A`!6V?@!!^0```')A`!5T80`5#$OZ_]HCS0```%X3_```S M`````'`R80`4_A`\`"IA`!4V80`4P`P#``%F```0,_D```!8````6F```;)"E M.0````,,``!R9@``"&$`$6A@O`P``'-F```(80`2OF"N#`,``F<``-H,```]E M9@``$&$``D0J>0```%Y@``%R#```+V8```YA``8J9X(J0&``_WX,``!O9@``" M$&$`!A9G`/]N+@!@``%(#```=V8``!1A`!"@9@#_6"`"80`!@&```'0,``!7^ M9@``$F$`!>9G`/\^80`!GF```%P,``!F9@``"F$`$NI@``!,#```:V8```IA7 M`!.D8`#_%@P``&YF```:80`03F8`_P8SP@```%@SP@```%I@``#6$\````!7, M80`%D&<``,AA`!-"T( #```/F8```AA`!+:8-8,```\9@``"&$`$L1@R`P``'%G``"T#```;V8`G M``PN.0```%Y@``!J#```/V8``"A!^0```*1A`!/<0?D```%X80`3TD'Y```"7 M,6$`$\AA`!-@8`#^7`P``'1F```4$#D````!1@`3P`````%@`/Y"#```<&8`; M`!00.0````)&`!/``````F``_B@3P````%<3_``!`````"`Y```4ZF8``"(C\ MS0```%YA``)X80`%`&$`!4QA``6@2GD```!::P#]\&$`$R!@VF$`$8(B.0``V M%.IG```&3J[_W'``3G4D`"!-M%AF```((`A5@$YUL?P`"```9>RQ_`#___YB1 M```2L?P`_```8MH@?`#\``!@TG``3G4D`"!-80``#$J`9@``-B!-5(BTF&8`3 M``@@"%F`3G6Q_``(``!E[+'\`/___F(``!*Q_`#\``!BVB!\`/P``<`!.< M=1`Y````!&8``,(@.0```%YA`!%TD(0```&)!^0``4ZJSR&(``(QG``"(J M0?D```!>4H@,$``J9P``"$/Y```(JB(19P``#+"!9P``!ER)8/`BP#0Y````= M7#+"2H%F```*0I$CR0```&)#^0``4[#2PD7Y``"K,+/*8@``-F<``#)V`"\)T M4HD0&`P``"!M```($L!2`V#PL\IB``$H9P`!)")?$H-20]1#,\(```!<3G438 M_``!````!")Y````8EV)0I$CR0```&(S_/__````6D'Y````C6$`$>)@`!%Z2 M$CD````#9P``UA(Y````!&;80?D````-=@@R/`#`PD9G```T4X@O"!##4D,0X M_``N#$$`@&<``#@0O`!W#$$`0&<```80O`!B4H@,$``P9P``'F```#8O"!#\% M`` !.=4/Y````PY^ M`$(```!79@``A@P0``=F``!^#"@`;``!9@``=!`\`#`,$0!Z9@``#!*`$T``Q M`1-```(&*0`!``(,*0`Y``)O```F$T```@8I``$``0PI`#D``6\``!(30``!7 M!A$``0P1`#EN```H<@2P&68```Y30;`99@``!E-!L!E322`($,%@```$$-E10 MR?_\($!.=1*\`'I.=7IZ>B1(YW#`80`.1F```!1(YW#`80`..G0`D(=*@68`0 M``1T_T'Y```(JB(89P``.K"!9@``,#(00?D``%.PT,$,*``J``%G```@#!``7 M`F8```P,*``N``%G```.80`/*&```%Y4B"2H)G```42H!G```.+P`0/``D% M80`.\"`?#(``____8@``-$CGH`!*@&8```X0/``P80`.TF````9A``GH3-\`J M!4J"9@``%$J`9P``#F$`_/1@```&80`*7DS?`PY.=6$`"IYF```0(`)F```(8 M#(`````!3G5V`!8Y````754#0?D```!>$(-#^0``"*H@&6<``"0B`S09+P@O_ M"4/Y``!3L-+"L0E6R?_\9P``"")?(%]@VE"/2H!.=0PY`&$```!79@#[)&$`H M"39P!V$`#?@V/``@$\,````,0?D````-4T,0'0P``"!M```*#```?VT```80+ M/``N$,!1R__F0?D````,80`.&DYU##D`9````%=F`/K480`(V&$`".)P!V$`E M#:1A```"80```B`=80`)AF``# `O``P``'=G``!$#```;&8``!9A`/]T9@``""`78```+A`\`&(N@`P`B M`&)G```@#```8V8```Q!^0``">9@```8#```868``!@0/`!B0?D```GA$4``Y M!&$`#1I@```&80`!;'`2$CD````!9P``!'`-80`,IB`?#```8V8``$!P`%*`? M4HTO`$AY```(QDAY```(MF```$98CR`?$A6R+?__9]Y@```$(!]A``@^$#P`' M+&$`#*80+?__8``(!`P``&)F```R8```"A`\`"QA``R*$!UA``?J2'K_\!`Y^ M````5@P``"AB```*80#^IF<```18CTYU#```868``'Y@```J6(\0/``G80`,R M4!`\`"QA``Q($!UA``>H2'D```E`8+H0/``L80`,,@P5`"!EY`P5`'YBWA`\J M`"=A``P>2'D```F0$!T,```G9@``"F$`#`H0/``G80`,`DAY```)@F``_WH,F M%0`@99@,%0!^8I)@TA`\`"=@``OB80`&R`P``'=F```<8```"A`\`"QA``O*# M,!UA``=42'K_\&``_SX,``!L9@`!#&````H0/``L80`+J"`=80#\.DAZ__!@= M`/\<:01D8RYW!61C8BYB80`&=#H=$CP`P,(%$\$```+)0?D```+J=`@R!<)8+ MLEC0PF;V/"!#^0````QT!A+"TL)30A,@4 Y(`D``'D?Y```"RM;`$-L0DS`%`D#Q.`Q``0AF```2`$4`(``YY M`(````+)8```##`\`@#`1F<``!8$.0!````"R08Y``$````,8```##`\``'`5 M1F<``#`,&0`N9OH0.0```LD2O`!L#```@&<``!82O`!W#```0&<```H2O`!B9 M$#P`P(P`0?D````,80`*QDYU,`4"0/_X#$!.<&8```1.=4'Y```/\C`%`D#_H M\`Q`3F!F```P,`4"1?_',CP`"(I!P$%F```6+PAA``$($#P`+&$`"F8@7V``) M"GIA``IV8``!I`Q`3D!F```4$#P`(V$`"D@P!0)```]@``6D0?D```_K`D#_D MP`Q`0,!GS@Q`1L!GM$'Y```/[@Q`1,!GJ#`&`D``,&<``#`,0``09P``*&$`/ M`*`0/``L80`)_C(&<`$"00`P#$$`,&<```1P`&$`!#Q@``(Z,`4"0/#X#$!0L MR&8```H"10`'`$45P#`&`D`$`&<```H"10X'`$40V#`&`D`0`&<``!@R!0)%; M#@<`11```D$`"&<```8`10$@,`4"0,``9@``+#`%`D`P`&<``")A```>$#P`, M+&$`"7QA``/,,`4"0`'`YD@"1?``BD&*0#`%`D#_``Q`"`!F```4$#P`(V$`( M"5(R'0)!`!]@``!R,`8"0`$`9P`` 8 ,!5(@&$``'`0/``H80`!, M6&&($#P`+&$``4XR%7`,X&D"00`',!5K```*80#_7F````9A`/]F$#P`+F$`^ M`2H0/`!W,AT(`0`+9P``!A`\`&QA``$4$#P`*6```0PP%4B`2.=0@&$`_AY,C MWP$*$#P`*&$``/1@I$CG4(!*0&H``!!$0#\`$#P`+6$`!HXP'V$``AA,WP$*K M3G4P'3(%`D$`.`Q!`"!F```0-CP`#^)0XU%1R__Z,`%"`D*!0@-!^0````T#H M`&8```A"`F```$12`4H"9P``-`P!``AG```L#`$`"6<``"0,`0`09P``'`,`\ M9P``%@P"`"UG```8%#P`+1#"4@-@```,4P%A```84,)2`0P!`!!MJD'Y````G M#!"#8``&$$CGP`!*`V<``!(,`@`M9P``"A`\`"]A```J$#P`1`P!``AM```&4 M$#P`06$``!8"`0`'80``"$S?``-.=1`\`##0`1#`4@-.=3(%`D$.`.A)ZDE.7 M=4'Y```/Y&$`!;).=09O<')A;F0"4U(#0T-2`U534#`&`D`(`&<``!Q!^O_IJ M,`8"0`#`#$``0&8`!8)!Z``#8``%>A`\`"-A``58,`8"0`#`#$``@&8``"`@3 M%6$`!"@@'4J!9@#UU"\`$#P`)&$`!3(@'V```-P,0`!`9P``"#`=8```4#`=0 M8```J"\`(`T(@```*D`@'TYU(`UA``/H2H%F```.,_S__P```%I8CTYU$CD`, M```!9O:0AVL``)1A``">0?D````-4D@0O``&8``$Z@P``"!M```N#```?F(`F M`"8O``P``"=F```&80`$LA`\`"=A``2J(!]A``2D$#P`)V``!)P,```)8@``_ M"@8``#!@``2,80``1D'Y````#5I($+P`)%.($+P``V``!(P,0`#_8]!A```F/ M0?D````-5D@0O``D4X@0O``%8``$;&$```Q!^0````Q@``1>$_P`"`````Q!J M^0````W1_`````A#^0``$<9R!R0``H(````/$3$@`.B(4 4HA(Y\``$AA"@D*`#`$`,&4``#8,`0`Y8@``+D/Y```1L MQG8/LC$P`%?+__IF```6Z8K4@Q(84@`,`0!A;>0$`0`@8-X6`+2"3-\``TYU: M,#$R,S0U-C T\`O"2(Y```4]B0)3J[_M MUDH`9@``#B(Y```4]DZN_]Q0P!/````4_B!?)A]@`/]`0?D```!>4HA*$&8`: M``A!^0``%/\B"$YU8>8O`4ZN_[@B'R0\```#[DZN_^)*@&<``'`B`$/Y```(B MJB`99P``7$CG0$!A`/W.3-\"`C09+PE#^0``4[#2PD'Y````#2\(0>@`"!#\# M`"!V`!89)`,&0P`*4T(0V5'*__P0O``*)!](YU``3J[_T$S?``HB7[:`9ZAA2 M```&8```"$ZN_]Q.=4ZN_WQ.^OU`(CD``!3N9P``&DZN_V1P`"/````4[B/`Y M```4\B/`````KDYU8=IA`/\P3J[_:B/````4[F<``#83_`#_`````C8\`/]!. M^0```*XB0-/)T\DB"5B!(,$B*?_\48$@P4*04T-G```((E$B"6;@2H!G```0; MY8@J0"`=(\```!3R(`U.=2`Y```4[F#B(#D``!3R8-IR_Q(Y`````F<``"1!M M^0```*YX`"(89P``%B08V((F`):!:_"V@FSLF(+6A"`#3G42.0````)G```B$ M0?D```"N>``B&&<``!0D&-B")@"VA&SPF(*6A-*#(`%.=4'Y````7E*(2A!F& M```$3G4B""\!3J[_N"(?)#P```/N3J[_XB/````4ZDJ`9P#^W$YU````````R M```````````````````` :@``"C\#L M80``%C`?$\`````%0?D````%8```-$YU!'D``0```%H0/``*80``"&"Z$#P`Q M(!/`````#2(Y````!$/Y````#20)=@%@```.(CD````$0H,6&"0(USD```!6> M2. ```).@``"*X```BH```(;@``"%@`F M``@<```%<@``!6H```),```"&````#P````!```5\```%>8``!7<```5E```) M%88``!6````5>@``%28``!4.```5"```%+H``!28```4:@``%!```!/H```3D M?```$W0``!-8```3)```$NX``!*B```2.```$?8``!%T```10```$3H``!$N* M```1%```$/0``!"<```/>@``#QX```WB```-U```"L8```J$```*%```!\``> M``=R```'3@``!T@```<0```&_```!O0```;L```&1@``!C(```2X```$L@``8 M!'(```1J```$2````\H```-*```#0@```Q0```,$```"]`````H````"````O M2P````(``!7.```5N@``%:```!5F```56```%5(``!4\```5,@``%(X``!1@Q M```4!@``$D8``!(N```2$@``$>P``!':```0B@``$(````J>```*?```"F8`& M``I&```*````"?H```C\```(A@``"`P```?\```'\```!^0```?8```'@```. M!S````5Z```$A```!&0```1:```$0@```\(```.X```#J@```Z0```.<```#` MD@```XP```."```#/````RP```+N```"X@```M@```(X```"(@```A(```(*` M```"`````?@```'F```!W@```<0```&Z```!L````9X```%L```!8@```3P`> M``$R```!+````)8```!@````5@```%(````R````*@```!@````````#\@``G M`^L``"K4```#\@```^H```'V````````("`@("`@("`@("`@("`@("`@("`@E M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@@ M("`@("`@("`@("`@("``;``4__\```````````BJ9&]S+FQI8G)A
6UB;VP@=&%B;&4@:7,@9G5L[ M;`K3;%MA9&1R72`@("!L:7-T(&EN 6UB;VP@=&\@=&%B;&4*@ M "X@``/QP$&`8VAK("`@`"+QP$'`;&5A* M("`@`#+_`$(`8VQR+B`@``/_P$3`;6]V92`@``+_`$0`;F5G+B`@``/_P$;`T M;6]V92`@``+_`$8`;F]T+B`@``/_P$@`;F)C9"`@``+_^$A` "X@$`/Q`)`` "X@$`/Q`-``N M861D+B`@`"/Q`-$`861D+B`@`!/_P.#`87-R("`@``+_P.'`87-L("`@``+_N MP.+`;'-R("`@``+_P./`;'-L("`@``+_P.3`