Dec 122017
Disassembler for Texas Instruments TMS-7000 MPUs.
File DSM7000.ZIP from The Programmer’s Corner in
Category Assembly Language
Disassembler for Texas Instruments TMS-7000 MPUs.
File Name File Size Zip Size Zip Type
DSM7000.COM 10789 5088 deflated
DSM7000.DOC 16434 5627 deflated
TPCREAD.ME 199 165 deflated

Download File DSM7000.ZIP Here

Contents of the DSM7000.DOC file

TMS-7000 Disassembler
Version 1.22

Version 1.22 History

CHANGES: (1) Version was released to fix a bug present in all earlier
versions of the Disassembler. The bug caused the program
to crash during the middle of disassembly. The bug only
manifested itself when the Command File (*.CMD) had no
CR/LF combination at the end of the last entry, i.e., if
you just ended the text command file without explicitly
placing a carriage return/line feed combo at the end of the
last entry. This has been fixed. The Disassembler can now
find the end of the command file as long as it contains
either a CR/LF combo or an ASCII EOF marker (CTRL Z).

Version 1.21 History

CHANGES: (1) The only change in Version 1.21 was a substitution of the
original Shell Sort routine by a Quick Sort routine. This
sort routine is called twice to sort the Word/Address
XREF table and the Peripheral File/Register XREF table.
Replacing the Shell Sort with a faster Quick Sort algorithm
resulted in a 20.4% decrease in sort times. This improves
overall program execution time (though not by 20.4%). The
exact sort routine numbers were run using a 32K object code
file and were as follows:

Version 1.2 Shell Sort routine - 12.87 seconds
Version 1.21 Quick Sort routine - 10.20 seconds

These numbers were on an 8 MHz IBM PC-XT

Version 1.2 History

CHANGES: (1) Program now produces a full cross reference listing of all
word values, addresses, peripheral file locations, and
registers used by the object code. Word/Address operands
are printed first, sorted in numerical order. Peripheral
file locations and registers are printed next, sorted in
alpha-numerical order. Peripheral file locations are
prefixed with "P" and registers with "R".

(2) A bug was found in all previous versions that caused address
values referenced in "Byte Address" (BA action code) tables
to be ommitted from the cross reference listing. This has
been corrected.

(3) A potentially serious bug was discovered in the sort routine
for the cross reference tables. This bug only manifested
itself when the code for adding registers and PF locations
was added, although it could lead to some strange effects if
if rears its little head. For this reason, it is STRONGLY
SUGGESTED that you discard earlier versions of the program
and use only Version 1.2 or later of the Disassembler.

Version 1.1a History

CHANGES: (1) Program needs 256K minimum RAM to run. Version 1.1a now
checks available free RAM to insure sufficient memory is
available. If not, an error message is printed. Versions
1.0 and 1.1 did not check free RAM and blindly assumed
enough free memory was available.

(2) A small formatting bug present when printing out inter-mixed
DT and DB statement lines has been corrected. This bug only
surfaced when disassembling the VC2PLUS ROM.

(3) Version 1.1a does not put a CR/LF combination before and
after each DT and DM statement line to cause an extra blank
line to be output. This was done to save space and reduce
the size of the listing file a little. In addition, the

number of spaces separating the address field and instruction
field has been reduced, also in an effort to reduce the size
of the listing file.

Version 1.1

CHANGES: (1) Versions 1.0 and 1.1 were the "Beta Test" versions of the

TMS-7000 Disassembler

This effort completes my TMS-7000 programmers' trilogy of useful utilities.
The trilogy includes my ASM7000.COM Assembler program, my SIM7000.COM simulator
program, and finally my DSM7000.COM Disassembler program. All the programs in
the trilogy are written in straight 8088/8086 assembly language for maximum
speed with minimum overhead and runtime garbage such as that generated by most
quote "professional" compilers. This disassembler will disassemble, write to
disk a disassembly listing, generate a cross reference listing, sort it, and
write it to disk, a 32K object code file in 31 seconds. The resulting listing
file was approximately 367K and the cross reference file about 52K in size
This was done on a generic IBM PC-XT clone running at 8 MHz. Compared to the
other TMS-7000 disassemblers I have seen, this one "smokes".

This program produces a pure ASCII text file of TMS-7000 instruction
mnemonics from an object code input file. The program disassembles the
entire instruction set of the TMS-7000 series, and in addition has several
useful psuedo-ops to enhance the usefullness and functionality of the
disassembled listing. This is the initial public release of the software.
I have corrected all bugs to the best of my knowledge, but nothing substitutes
for a little use by others to fully debug a package. Since my software is
offered for free, my guilt complex is low about asking users to assist in fully
debugging a package. Please E-Mail me on this BBS about any problems you find
or have using the disassembler.

The disassembler will take object code files of up to 64K in size. It
does, however, require a Command File to be generated by the user to govern
the disassembly process. This Command File (normally given the extension
CMD) is a pure ASCII text file with a tight syntax which tells the disassembler
where to expect data and where to expect instructions. The Command File is
required for the disassembler to operate. Sample Command Files are included
in this package for the stock U30 chips of software revision 3.0 and 3.1.

The disassembler produces two output files, both ASCII text. The files
are given the same pathname/filename as that given for the input Object Code
file except the extension is changed to .LST for the disassembled listing
file, and to .XRF for the cross reference listing. If no extension was given
for the object code file, the stated default extensions are still added to

The disassembly listing file is suitable for direct input to a TMS-7000
assembler. The cross reference file is basically an index showing each WORD
operand (either address or data) and where in the object code it was used.
The disassembler fully cross references both word and address operands as
before, and now does peripheral file and register cross references as well.
The peripheral file and register cross reference is separated from the word
and address one with a different header line, although both are still contained
in the same file with the extension .XRF.

First, let's discuss the disassembly command file.

This file tells the disassembler where to look for instructions and where
to look for data. This file is required, and this file has a fairly rigid and
unforgiving syntax requirement. The format consists of two hex addresses and
an 'action code' for each line in the command file. The first line in the
command file MUST be a (L)ocate action code giving the origin of the object
code. As an example, for a stock U30 in a VC2 the first line in the command
file must be:

C000 C000 L

where C000 is the starting address and the 'L'is the (L)ocate action code.

The valid action codes for the disassembler are as follows:

L = Locate ORG of object code. This command is required as first line.

DB = Define address range as hex byte values (i.e., data bytes)

DW = Define address range as hex word values (i.e., data words)

WA = Define address range as hex 16-bit addresses and flag as symbol name

DA = Define address range as ASCII text and output as such

DP = Define address range as VC2 U6 packed message string and output as

DS = Define address range as empty space (causes new ORG statement in file)

BA = Define address range 1 as MSB of a 16-bit address to be flagged as a
symbol name, and address range 2 as the LSB of the same address
(causes generation of xxxx/256 and xxxx MOD 256 DB psuedo-ops)

Note: All addresses not covered by one of the above action code ranges will
be treated as an instruction location and disassembly will be
attempted. Proper care in generating the command file will minimize
errors in the disassembly process.

Examples of each of the action codes follow:

(1) C000 C019 DB

This statement causes the addresses from C000 thru C019 inclusive to be
regarded as single byte values to be output to the listing file as --

DB >xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx

Where the xx values would be the ASCII hex representations of the values
at the covered addresses. The disassembler will output 16 values per
line and will automatically wrap and start a new line if the address
range is greater than 16 bytes. The ">" is used to denote hex values.

(2) C000 C019 DW

This statement causes the addresses from C000 thru C019 inclusive to be
regarded as 16-bit word values to be output to the listing file as --

DW xxxx
DW xxxx

Where the xxxx values would be the ASCII hex representations of the
values at the covered addresses.


This statement causes the values at addresses FDF0 to FFFF inclusive to
be treated as 16-bit addresses that are to be treated as symbol names
and output as follows --

DW axxxx

Where the 'a' denotes a symbol name and xxxx is the ASCII hex value
of the address stored at the location.

(4) C000 C017 DA

This statement causes the values at the covered addresses to be treated
as ASCII character values to be output as the character they represent.
The psuedo-op 'DT' is output to indicate a 'TEXT' operand follows.

DT "This is a sample string"

Where the quotation marks serve to delimit the string. Note that the
current release (3.2) of my TMS-7000 Assembler ASM7000.COM does not
support this psuedo-op, although a new release (3.3) will.

(5) C000 C00F DP

This statement causes the byte values to be treated as packed (4 characters
per 3 bytes) U6 message strings. The byte values are automatically
unpacked to their ASCII equivalents and placed in quotation marks with the
'DM' psuedo-op. Note that this psuedo-op is recognized by my TMS-7000


(6) F010 FFCF DS

This statement causes the addresses between F010 and FFCF inclusive to be
skipped over and a new ORG statement written to the listing file at the
ending address specified plus 1. For example, the output from the above
would be:


(7) C000 C003 BA C004 C007

This statement causes the values at the addresses in the first range to
be treated as the Most Significant Byte of a 16-bit address to be treated
as a symbol. The values at the second given address range are treated as
the Least Significant Byte of the address and are also treated as a symbol.

This technique is often used to provide tables of addresses for ROM
routines. For example, assume the values at C000 - C007 are as follows:

C000 C6 C6 C7 C8
C004 BA C2 17 02

The disassembler will output the following sequence to the listing file:

DB aC6BA/256
DB aC6C2/256
DB aC717/256
DB aC802/256

DB aC6BA MOD 256
DB aC6C2 MOD 256
DB aC717 MOD 256
DB aC802 MOD 256

The one REQUIREMENT for this statement is that the address ranges must be
consecutive. For example the MSBs could not be at C004-C007 and the LSBs
be at E090-E093. In addition, the disassembler treats the first address
range given to be the MSB of the pair.

Because this disassembler is written to be used by programmers familiar
with the TMS-7000 CPU, and because I am assuming that the programmer is
fluent in understanding tables, hexadecimal notations, and rigid syntax, I
fudged on the error detection and handling capability of the disassember to
gain speed. This philosophy leaves the program subject to GIGO (Garbage In
Garbage Out). A poorly written or mistake-packed command file will result in
a garbage disassembly or even a "hang" condition. If this proves to be a
major problem I will incorporate additional error handling features, but this
will slow down this currently "lightning" fast program.

Generating a command file is most easily done by using my SIM7000 simulator
program and a piece of paper. Load the object code into the simulator and
use the LIST function of the simulator to disassemble lines of the object code,
looking for LDA @n instructions to help you find tables of addresses or other
values. Data areas are also readily apparent if you "disassemble" into them
and start getting "BAD OPCODE" messages. While this may seem an awful time
consuming process, it actually takes only a few minutes to find the major data
and table areas of a program and try a trial disassembly. Looking at the
listing file using the DOS 'TYPE' command can help you improve your command

Study the enclosed CMD files for the stock U30s and you will quickly see
how to write the proper command file. Note that the individual lines of the
command file do not have to be in numerical order as a sort is done by the
program prior to storing the file in memory. However, the first command must
be the starting address of the object code and be followed with an 'L' action

Invoking the disassembler can be done by typing DSM7000 at the DOS prompt.
The program will then prompt you for the OBJECT CODE filename and then for
the COMMAND FILE filename. These files are assumed to be in the current
directory or in a path given in the DOS 3.3 APPEND command. The listing file
( ?.LST ) and the cross reference file ( ?.XRF ) are written to the same
directory where the object code file was located. If you desire, you may
specify the filenames on the command invocation line by typing --

DSM7000 [object filename] [command filename]

The disassembler will always ask you if you wish the address field to be
printed. If you plan to re-assemble the resulting listing file using my
ASM7000 assembler, you must answer (n)o to this prompt. If you are going to
use the listing primarily to examine code, you probably will want to answer
(y)es to this prompt. A sample of each type of listing is shown below:

C000 dC000: DB >82 71
C002 aC002: MOVD %>6107,R47
C006 BR @aC106

This is the listing file format if you answered (y)es to the address
field prompt. Below is the format if you answered (n)o to the prompt:

dC000: DB >82 71
aC002: MOVD %>6107,R47
BR @aC106

Happy Hacking,

Bill Meeks

 December 12, 2017  Add comments

Leave a Reply