Function Mode Syntax Remarks See also Example
%TITLE directive. Make sure that you place the subtitle text between quotes ("").
You may place as many %SUBTIL directives in your program as you wish. Each directive changes the subtitle that will be placed at the top of the next listing page.
SUBTIL
%SUBTTL "Output routines"
Enables symbol table in listing file MASM,Ideal
%SYMS
Placing % SYMS anywhere in your source file causes the symbol table to appear at the end of the listing file. (The symbol table shows all the symbols you defined in your source file.)
This is the default symbol listing mode used by Turbo Assembler when it starts assembling a source file.
%NOSYMS
%SYMS ;symbols now appear in listing file
Sets tab column width in the listing file MASM,Ideal
%TABSIZE width
width is the number of columns between tabs in the listing file. The default tab column width is 8 columns.
%PAGE, %PCNT, %BIN, %TEXT
%TABSIZE 4 ;small tab columns
% TEXT
Function Mode Syntax Remarks
See also Example
.TFCOND
Function Mode Syntax Remarks
See also
TITLE
Function Mode Syntax Remarks
Sets width of source field in listing file MASM,Ideal
%TEXT width
width is the number of columns to use for source lines in the listing file. If the source line is longer than this field, it will either be truncated or wrapped to the following line, depending on whether you've used %TRUNC or
% NOTRUNC.
%BIN, %DEPTH, %NOTRUNC, %PCNT, %TRUNC
%TEXT 80 ishow 80 columns from source file
Toggles conditional block-listing mode MASM
.TFCOND
Normally, conditional blocks are not listed by Turbo Assembler, and the first .TFCOND encountered enables a listing of conditional blocks. If you use the IX command-line option, conditional blocks start off being listed, and the first .TFCOND encountered disables listing them. Each time .TFCOND appears in the source file, the state of false conditional listing is reversed.
%CONDS, .LFCOND, %NOCONDS, .SFCOND
Sets title in listing file MASM
TITLE text
The title text appears at the top of each page, after the name of the source file and before any subtitle set with the SUBTIL directive.
See also Example
% TITLE
Function Mode Syntax Remarks
See also Example
%TRUNC
Function Mode Syntax Remarks
See also Example
You may only use the TITLE directive once in your program.
SUBTTL, % SUBTTL, % TITLE TITLE Sort Utility
Sets title in listing file MASM,Ideal
%TITLE "text"
The title text appears at the top of each page, after the name of the source file and before any subtitle set with the %SUBTTL directive. Make sure that you place the title text between quotes ("").
You may only use the % TITLE directive once in your program.
SUBTTL, % SUB TTL, TITLE
%TITLE "I/O Library"
Truncates listing fields that are too long MASM,Ideal
%TRUNC
%TRUNC reverses the effect of a previous %NO-TRUNC directive. This directive changes the object-code field and the source-line field so that too-wide fields are truncated and excess information is lost.
% NOTRUNC
%TRUNC
DD 1,2,3,4,5 idon't see all fields
UDATASEG
Function Mode See also
Defines the start of an uninitialized data segment MASM,Ideal
.CODE, .CONST, .DATA, DATA?, .FARDATA, .FARDATA?, .MODEL, .STACK
UFARDATA
Function Mode See also
UNION
Function Mode Syntax
Remarks
Defines the start of an uninitialized far data segment MASM,Ideal
.CODE, .DATA, .FARDATA, .FARDATA?, .MODEL, .STACK
Defines a union
MASM, Ideal (disabled by QUIRKS) MASMmode:
NAME UNION fields [name] ENDS
Ideal mode:
UNION NAME fields ENDS [name]
The only difference in how UNION behaves in Ideal and MASM mode is in the order of the directive and the union name on the first line of the definition, and the order of the ENDS directive and the optional union name on the last line of the definition. Turbo Assembler allows you to nest UNION and to combine it with STRUC.
A UNION is just like a STRUC except that all its members have an offset of zero (0) from the start of the union. This results in a set of fields that are overlayed, allowing you to refer to the memory area defined by the
See also Example
union with different names and different data sizes. The length of a union is the length of its largest member, not the sum of the lengths of its members as in a structure.
name identifies the union, so you can use this name later when allocating memory to contain unions with this format.
fields define the fields that comprise the union. Each field uses the normal data allocation directives (DB, DW, etc.) to define its size. The field names are like any other symbols in your program-they must be unique.
You can supply a default value for any field by putting that value after the data allocation directive, exactly as if you were initializing an individual data item. If you don't want to supply a default value, use the? indeter-minate initialization symbol. When you use the union name to actually allocate data storage, any fields that you don't supply a value for will be initialized from the default values in the structure definition. If you don't supply a value and there is no default value, ? will be used.
Be careful when you supply strings as default values;
they will be truncated if they are too long to fit in the specified field. If you specify a string that is too short for the field, it will be padded with spaces to fill out the field.
At any point while declaring the union members, you may include a nested structure or union definition by using the STRUC or UNION directive instead of one of the data-allocation directives. When you nest structures and unions using the STRUC or UNION directive, you still access the members as if the structure only has one level by using a single period (.) structure member operator. When you nest unions by using a previously defined union name, you use multiple period operators to step down through the structures and unions.
ENDS, UNION UNION B
BMEMl DW BMEM2 DB ?
ENDS UNION A
USES
mov al, [AINST.BUNION.BMEM1]
mov al, [AINST.D]
;first field--offset 0
;second field--offset 0
;starts at 0
;at offset 0
;at offset 1
;allocate a union of type A
;multiple levels
;single level
Indicates register usage for procedures MASM,Ideal
USES register [,register] •••
USES appears within a PROC/ENDP pair and indicates which registers you want to have pushed at the begin-ning of the procedure and which ones you want popped just before the procedure returns.
register can be any register that can be legally PUSHed or POPped. There is a limit of 8 registers per procedure.
Notice that you separate register names with commas, not with spaces like you do when specifying the registers as part of the PROC directive. You can also specify these registers on the same line as the PROC directive, but this directive makes your procedure declaration easier to read and also allows you to put the USES directive inside a macro that you can define to set up your procedure entry and exit.
You must use this directive before the first instruction that actually generates code in your procedure.
Note: USES is only available when used with language extensions to a .MODEL statement.
ARG, LOCALS, PROC MyProe PROC
USES ex,si,di mov ex,lO rep movsb
WARN
Function Mode Syntax Remarks
See also Example
ret ;this will pop ex, SI, & 01 registers MyProc ENOP
Enables a warning message MASM, Ideal
WARN [warnc1ass]
If you specify WARN without warnclass, all warnings are enabled. If you follow WARN with a warning identifier, only that warning is enabled. Each warning message has a three-letter identifier:
ALN Segment alignment ASS Assumes segment is 16-bit BRK Brackets needed
ICG Inefficient code generation LCO Location counter overflow OPI Open IF conditional OPP Open procedure OPS Open segment OVF Arithmetic overflow
PDC Pass-dependent construction
PRO Write-to-memory in protected mode needs CS override
PQK Assuming constant for [const] warning RES Reserved word warning
TPI Turbo Pascal illegal warning
These are the same identifiers used by the IW command-line option.
WARN
NOWARN OVF ;disable arithmetic overflow warnings OW lOOOh * l234h ;doesn't warn now
.XALL
Function Mode See also
.XCREF
Function Mode See also
.XLIST
Function Mode See also
Lists only macro expansions that generate code or data MASM
.LALL, %MACS, %NOMACS, .SALL
Disables cross-reference listing (CREF) MASM
%CREF, .CREF, %NOCREF
Disables output to listing file MASM
%LIST, .LIST, %NOLIST
A p p E N D