Category : Assembly Language Source Code
Archive   : SIM85.ZIP
Filename : TASM.DOC

 
Output of file : TASM.DOC contained in archive : SIM85.ZIP













TASM USER'S MANUAL


TASM - A Table Driven Cross Assembler for the MSDOS* Environment









Thomas N. Anderson
Speech Technology Incorporated
16321 176th Avenue NE
Woodinville, WA 98072

March, 1986
Version 2.2

[Speech Technology Incorporated is a manufacturer of electronic
devices to aid the visually impaired, generally employing speech
synthesis technology.]



(C) Copyright 1985, 1986 by Speech Technology Incorporated. All
rights reserved. Permission is granted to copy this document and
related software.



If you are dissatisfied with the product for any reason, return the
original merchandise (disk and manual) within 90 days to seller for
a full refund of any amounts paid.







* MSDOS is a trademark of Microsoft Corporation.




TASM - Table Driven Assembler Page 2


TABLE OF CONTENTS










SECTION PAGE
____________________________________________________
INTRODUCTION....................................3
INVOCATION......................................4
SOURCE FORMAT...................................7
EXPRESSIONS.....................................9
ASSEMBLER DIRECTIVES............................12
OBJECT FILE FORMATS.............................18
LISTING FILE FORMAT.............................20
PROM PROGRAMMING................................21
ERROR MESSAGES..................................23
BUGS AND LIMITATIONS............................25
6502 INSTRUCTIONS AND ADDRESSING MODES..........26
8048 INSTRUCTIONS AND ADDRESSING MODES..........29
8051 INSTRUCTIONS AND ADDRESSING MODES..........33
TASM DISTRIBUTION FILES.........................37
PORTING TASM TO OTHER ENVIRONMENTS..............38
TASM INSTRUCTION SET TABLE DEFINITION...........40
SUMMARY.........................................43

APPENDIX A - SAMPLE LISTING FILE................44
APPENDIX B - SAMPLE INSTRUCTION SET TABLE ......46
APPENDIX C - ORDERING INFORMATION...............51






















TASM - Table Driven Assembler Page 3


INTRODUCTION

TASM is a set of table driven cross assemblers for the MS-DOS
environment. Currently versions for the 6502, 8048, and 8051
microprocessors are supported by STI, but the user so inclined may
build versions for other 8 bit microprocessors (see sections on TASM
DISTRIBUTION FILES and TASM INSTRUCTION SET TABLE DEFINITION for
notes on reconfiguring TASM for other processors).

TASM characteristics include:

1. Powerful expression parsing (17 operators).

2. Supports a subset of the 'C' preprocessor commands.

3. Macro capability (through use of DEFINE directive).

4. Multiple statements per line.

5. Supports three object file formats (Intel Hex, MOS
Technology Hex, and binary).

6. Absolute code generation only.

7. Source code available (in C).

8. Uniform syntax across versions for different target
machines.

9. Features in support of PROM programming (preset all
bytes to specified value, output object code in a
contiguous block).

10. Supports extended instructions of the Rockwell R65C02.

11. Tables can be generated for other microprocessors
without having to modify the TASM executable module.



















TASM - Table Driven Assembler Page 4


INVOCATION

TASM can be invoked as follows (optional fields shown in brackets,
symbolic fields enclosed in <>):

tasm - [-bcfhlmpxdo] source_file [object_file [list_file]]

Where the option flags are defined as follows:

- Specify version ( = part number)
-c object file written as a contiguous block
-f Fill entire memory space with (hex)
-h Produce hex table of the assembled code
-l Produce a label table in the listing
-m Produce object in MOS Technology format
-b Produce object in binary (.COM) format
-p Page the listing file
-q Quite, disable the listing file
-x[] Enable extended instruction set (if any)
-d Define a macro (or just a macro label)
-o Bytes per object record (hex)

TASM has no built in instruction set tables, and so it must read
them at run time. TASM determines which table to use based on the
'-' field shown above. For example, to assemble the code in a
file called 'source.asm' one would enter:

tasm -48 source.asm for an 8048 assembly
tasm -65 source.asm for a 6502 assembly
tasm -51 source.asm for a 8051 assembly.

The file name that the tables are read from is formed by taking the
digits specified after the '-' and appending it to 'TASM' then
appending the '.TAB' extension. Thus, the '-48' flag would cause
the tables to be read from the file 'TASM48.TAB' (See section on
TASM INSTRUCTION SET DEFINITION).

The source file must be specified. If not, some usage information
is displayed. If the object file is not specified then the object
filename is formed by taking the source filename and changing the
extension to '.OBJ'. Similarly, if the list filename is not
specified it is formed by changing the source filename extension to
'.LST'.

Each option flag must be preceded by a dash. Options need not
precede the filenames, however. The various options are described
below:

c - Contiguous Block Output. If this option is specified, then all
bytes in the range from the lowest used byte to the highest will be
defined in the object file. Normally, with the default Intel Hex
object format enabled, if the Program Counter (PC) jumps forward
because of an .ORG directive, the bytes skipped over will not have
any value assigned them in the object file. With this option
enabled, no output to the object file occurs until the end of the
assembly at which time the whole block is written. This is useful
TASM - Table Driven Assembler Page 5

when using TASM to generate code that will be put into a PROM so
that all locations will have a known value. This option is often
used in conjunction with the -f option to ensure all unused bytes
will have a known value.

f - Fill Memory. This option causes the memory image that TASM
maintains to be initialized to the value specified by the two hex
characters immediately following the 'f'. TASM maintains a memory
image that is a full 64K bytes in size (even if the target processor
cannot utilize that memory space). Invocation of this option
introduces a 2 second delay at start up (time required to initialize
all 64K bytes). See Appendix A for an example.

h - Hex Table. This option causes a hex table of the produced object
code to appear in the listing file. Each line of the table shows
sixteen bytes of code. The format is shown in the sample listing in
Appendix A.

l - Label Table. This option causes a label table to appear in the
listing file. Each label is shown with its corresponding value.
Macro labels (as established via the DEFINE directives) do not
appear. The format is shown in the sample listing in Appendix A.

m - MOS Technology Object Format. This option causes the object file
to be written in MOS Technology hex format rather than the default
Intel hex format. See section on OBJECT FILE FORMATS for a
description of the format.

b - Binary Object Format. This option causes the object file to be
written in binary - one byte for each byte of code/data. Note that
no address information is included in the object file in this
format. The contiguous block (-c) output mode is forced when this
option is invoked.

p - Page Listing File. This option causes the listing file to have
top of page headers and form feeds inserted at appropriate intervals
(every sixty lines of output).

q - Disable Listing File. This option causes all output to the
listing file to be suppressed, unless a .LIST directive is
encountered in the source file (see LIST/NOLIST directives).

x - Enable Extended Instruction Set. If a processor family has
instructions that are valid for only certain members, this option
can be used to enable those beyond the basic standard instruction
set. Presently, this option only has significance for the 6502
version (TASM -65) which has extended instructions for the Rockwell
R65C02 and the R65C00/21. A hex digit may follow the 'x' to
indicate a mask value used in selecting the appropriate instruction
set. Bit 0 of the mask selects the basic instruction set, thus a
'-x1' would have no effect. A '-x3' would enable the basic set plus
whatever instructions have bit 1 set in their class mask. A '-x'
without a digit following is equivalent to a '-xf' which sets all
four of the mask bits. (See section on 6502 INSTRUCTIONS AND
ADDRESSING MODES for details on its extended instructions).


TASM - Table Driven Assembler Page 6

d - Define a Macro. Macros are be defined on the command line
generally to control the assembly of various IFDEF's that are in the
source file. This is a convenient way to generate various versions
of object code from a single source file.

o - Set Number of Bytes per Object Record. When generating object
code in either the MOS Technology format or the Intel hex format, a
default of 24 (decimal) bytes of object are defined on each record.
This can be altered by invoking the '-o' option immediately followed
by two hex digits defining the number of bytes per record desired.
For example, if 32 bytes per record are desired, one might invoke
TASM as:

TASM -48 -o20 source.asm











































TASM - Table Driven Assembler Page 7


SOURCE FORMAT

Statements in the source file must conform to a format as follows
(except for assembler directive statements which are described in a
subsequent section):

  3 Responses to “Category : Assembly Language Source Code
Archive   : SIM85.ZIP
Filename : TASM.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/