Turbo Assembler

The Turbo Assembler ( TASM ) is an assembler for x86 processors to the operating system MS -DOS. It was introduced in 1989 by the company as part of Borland Turbo C 2.0, but was also available as a separate package along with the Turbo linker. To assist the programmer was first available as a separate product, and later bundled with the TASM Turbo Debugger from Borland. The last released version 5 also supported Windows 95 and NT and processors up to Pentium.

The Microsoft Macro Assembler was at time of publishing of the turbo assembler the predominant assembler for MS -DOS. The TASM and MASM covered then together the need for assembler for the IBM PC and IBM PC -like systems almost alone. The TASM promises shortcomings of MASM to fix, better performance, and realized beyond a more flexible and advanced functionality, for example in the use of procedures, icons, and mächtigereren instruction set. To compile assembler programs for the MASM as unchanged as possible, the TASM has several modes that adjust a different degree of compatibility with the MASM. He is in the package in addition to the usual core components assembler (assembler and linker) and various auxiliary and supplementary programs ready.

Today, the TASM is no longer being developed due to lack of demand.

  • 5.1 Rules for token
  • 5.2 Global versus Local

Components of the sales package

The Turbo Assembler was not initially designed by Borland as a standalone product. He was more planned for internal and external support / application for inline programming their time successful products such as Turbo C or Turbo Pascal.

The TASM was delivered not as a program file, but in many independent but coordinated modules. A peculiar text editor is superfluous, as with all assemblers and absent. It therefore contains the following components:

In the core area of ​​the indispensable pair of assemblers ( TASM.EXE ) and linker ( tlink.exe ). In addition, five other utilities:

  • MAKE: A program management for automated assemble and link programs.
  • TLIB: A program for easy management and merging of individual object files (. OBJ).
  • GREP: A Unix / Linux identical program for searching for text strings in files.
  • OBJXREF: A tool to Erzeugunge of cross- Rererenzen for object files.
  • TCREF: The same for source files.

Modes

The different modes of TASM are on the adaptation and owed ​​the improvement of MASM. They guarantee the programmer to work in a familiar structures, and an almost perfect compatibility / assembly of MASM source code. Can be changed as often as desired within the program between the different modes.

MASM mode

In this mode, TASM behaves very similar to MASM, but without obvious errors emulate the MASM. This is the default. Here, in MASM mode (the term is somewhat misleading here ) most of the capabilities of MASM 5.1 already realized.

MASM 5.1

The instruction MASM 5.1 allows in detail some other features of version 5.1 of the MASM almost completely. The following capabilities are available only with the 5.1 explicit instruction MASM:

  • The SUBSTR, CATSTR, SIZESTR, and INSTR instructions.
  • The possibility of line continuation with a backslash.
  • An alternative syntax for the LOCAL statement.

However, the following options are available only with simultaneous activation of MASM 5.1 and quirks mode.

  • Local with @ @ Defined labels on with @ F and @ B can be accessed.
  • The redefinition of variables in PROC blocks (this betriffte also differences in collaboration with the C language in terms of PROC names)

Quirks mode

In this mode, the MASM is completely modeled with its known misconduct. Some properties of the MASM can be problematic under circumstances that they themselves were not implemented in MASM and MASM 5.1 mode. But to programmers as needed to permit the further use of these " quirks " and prepare a complete compatibility, the quirks mode was created. This mode can be either in the source file by the statement quirks, or in assembly with the command line option / quirks are enabled.

Ideal mode

This mode contains TASM - specific extensions and changes to MASM syntax, with the aim to make the assembly code clearer and more consistent. Borland promises with the IDEAL mode, " the corners and edges of the MASM programming to smooth something," and " up to 30 % faster translation (assembly ) ". The possibilities are extensions or modifications of already under the MASM ' existing facilities. There is a stringent review of data types, which enables detection of errors that would found without this mode until runtime. Furthermore, the mode implements a consistent and understandable to denote operators and key words. The program will introduce a few new principles and commands. The TASM use this new syntax, which from the MASM however, does not differ radically. The differences are as follows:

Rules for token

The dot (. ) Must not be used within a symbol name, but only as operator for structural elements or in floating point numbers. Therefore catch MASM symbols that start with a dot, in TASM either the percent sign (%) or without special characters at the beginning, or are renamed. So for example:

% CREF instead. CREF CONST instead. CONST. ERRIF2 instead. ERR2

In IDEAL mode, the use of a decimal point is always mandatory. A floating point number with a value of 1.0e7 for example, would display as: FKZ DT 1.0e7. The possible in MASM and MASM mode simplified representation of the form FKZ DT 1E7 is not allowed. This rigor prevents a possible misinterpretation of the MASM, which could translate this value as a hexadecimal 01E7, according to some commands.

Global versus local

Structural elements are not defined globally in IDEAL mode, and only exist within the respective structure. This allows, in contrast to the use of two MASM mode gleichbenannter elements inside and outside of a structure or in two different structures. So the following code snippet would be with the use of the element item into two structures, even in spite of the addition of different data types (DW - DB ) are permitted.

762522
de