3
The other characters in the identifier can be any of the characters listed above or a
decimal digit (0–9).
Predefined Symbols : The assembler includes a number of predefined symbols (also called
predefined equates). These symbols can be used at any point in the code to represent the equate
value. For example, the predefined equate @ FileName represents the base name of the current
file. If the current source file is TASK.ASM , the value of @File Name is TASK.
Integer Constants and Constant Expressions : An integer constant is a series of one or more
numerals followed by an optional radix specifier. For example, in the following statements
mov ax, 25
mov bx, 0B3h
the numbers 25 and 0B3h are integer constants.
Operators : Operators are used in expressions. The assembler evaluates expressions that contain
more than one operator according to the following rules.
Operations in parentheses are performed before adjacent operations.
Binary operations of highest precedence are performed first.
Operations of equal precedence are performed from left to right.
Unary operations of equal precedence are performed right to left.
Examples of the operators are : + ,– (unary) , &, *, /, MOD, SHL, SHR , +, – (binary) , EQ,
NE, LT, LE, GT, GE NOT , AND , OR, XOR , OPATTR, SHORT, .TYPE
Data Types : A “data type” describes a set of values.For example ,BYTE, SBYTE, WORD,
SWORD, DWORD, SDWORD, FWORD, QWORD, and TBYTE.
Registers : The 8086 family of processors have a set of 16-bit registers. They are AX,
BX,CX,DX (General purpose registers) segment registers like ,SS.CS.DS.ES and pointer
registers like SP,BP and Index registers like DI and SI etc…
Statements : Statements are the line-by-line components of source files. Each MASM statement
specifies an instruction or directive for the assembler. Statements have up to four fields,
[[name:]] [[operation]] [[operands]] [[;comment]]