DASM-11(1) Retro Project Manual DASM-11(1) NNAAMMEE dasm-11 - simple dis-assembler for PDP-11 binary code SSYYNNOOPPSSIISS ddaassmm--1111 [_O_P_T_I_O_N]... _F_I_L_E ddaassmm--1111 ----hheellpp DDEESSCCRRIIPPTTIIOONN ddaassmm--1111 is a simple disassembler for PDP-11 binary code. It reads a core dump in llssmm--1111(5) format from _F_I_L_E. If _F_I_L_E is '-' the core dump is read from _s_t_d_i_n. If _F_I_L_E ends on '.gz' it is expanded with gguunn-- zziipp(1) on-the-fly. The disassembled code is written in MACRO-11 format to _s_t_d_o_u_t, followed by a symbol table, a cross-reference table, and a statistics summary. BBaassiicc ooppeerraattiioonn In very simplified terms, ddaassmm--1111 tries to tag each memory word as ei- ther 'code', 'word', 'byte', or 'asciz' and represent it accordingly in MACRO-11 format. Sequences of zero 'word' or 'byte' locations are rep- resented with a _._b_l_k_w or _._b_l_k_b directive, respectively. The MACRO-11 output is always an exact replica of the input and con- tains an equivalent representation of all memory locations defined in the input file. In the most basic operation mode, ddaassmm--1111 is used with the ----ssttaarrtt op- tion to specify one or several start addresses. ddaassmm--1111 tags these ad- dresses as 'code' and follows all possible code execution paths and tags all instructions as 'code'. All memory locations accessed via an absolute or PC relative address mode are tagged 'byte' or 'word' de- pending on the instruction. Without code start address via ----ssttaarrtt, ddaassmm--1111 can't do any code tag- ging, and without any tagging, the output is simply a list of _._w_o_r_d di- rectives, effectively a 1-to-1 dump of the input file. GGuuiiddeedd ooppeerraattiioonn The basic operation with just a few code start addresses has severe functional limitations - code reached indirectly, e.g. via dispatch tables, is not detected - strings are not detected and dumped as _._w_o_r_d lists - parameters following 'jsr r5' and trap instructions aren't handled Beyond that, the output is not very human-friendly, all labels are auto-generated with type letter and a 3-4 digit number, the immediate values are numeric, and the whole output is flat without any annota- tion. All this is addressed in guided operation. Additional information is provided to ddaassmm--1111 with 'diassembler steering' file, specified via the ----ddaass option. The steering file allows - to declare the data type for an address: code, string, but also rad50 or float, pointers to and arrays of any of those types. - to declare argument lists for routines (e.g. called with 'jsr r5') and trap instructions - to declare symbolic names for literal values - to define a telling label name for an address - to add code annotation, full line or after statement comments - to define interrupt vectors OOPPTTIIOONNSS --II _p_a_t_h adds _p_a_t_h to the _d_a_s file include search path. The default search path is '.' plus _$_R_E_T_R_O_B_A_S_E_/_t_o_o_l_s_/_d_a_s_m_-_1_1_/_l_i_b if RREETTRROOBBAASSEE is defined. Each --II adds _p_a_t_h after '.'. --II can be given multiple times und must have a single path name. ----ddaass==_f_n_a_m if specified _f_n_a_m will be read as steering file. If no ----ddaass option is given, ddaassmm--1111 tries to locate and load the default steering file. A '.gz' and a '.dmp' suffix is stripped from _F_I_L_E, a '.das' suffix is added, and if that file exists, it's loaded. ----ddmmooddee==_m_o_d_e default mode of untagged data. Valid values of _m_o_d_e are wwoorrdd represent untagged data with _._w_o_r_d directives (the de- fault) aasscciizz interpret untagged data as zero-terminated ASCII and rep- resent it with _._a_s_c_i_z directives. Useful for finding strings. ccooddee interpret untagged data as code. Can be helpful to detect code sequences. ----ssttaarrtt==_n_n_[_,_._._._] list of code start addresses. _n_n is interpreted as octal number. Either a single value of a comma-separated list of values can be specified. Each address is used as starting point of code tag- ging. When ddaassmm--1111 is used without a steering file and no ----ssttaarrtt option is given, no code tagging will be done and the output is simply a list of _._w_o_r_d directives. --hheellpp print full help text and exit. OOPPTTIIOONNSS FFOORR DDEEBBUUGG ----ddrraaww dump raw data. ----ddttaagg dump tagged data. ----ttccttaagg trace code tagging. ----ttttllcc trace typlabcref calls. SSEEEE AALLSSOO aassmm--1111(1), llssmm--1111(5) AAUUTTHHOORR Walter F.J. Mueller Retro Project 2022-08-25 DASM-11(1)