Previous: Operands To the Table of Content Next: Differences between 16- and 32-bit code

- 2.3.12 -
TMT Pascal Language Description
Built-in Assembler

Assembler Operators

TMT Pascal built-in assembler syntax allows the a number of operators, listed below:

 Operator  Description 
&Identifier override operator. The following identifier is considered to be a user defined symbol, even if its spelling is identical to an assembler reserved word.
(...)Parenthesis. Expressions within parenthesis are evaluated first.
[...]Memory reference. The expression within brackets is evaluated first. This expression should be a valid 386 address. The resulting expression is always treated as a memory reference.
HIGH, LOWHigh and Low byte selection. These operators return the high and low 8 bits of the word-size expression that follows.
+, -Unary plus and minus operators. The expression should be an absolute immediate.
SMALL, LARGEForces the built-in assembler to treat the following operands as a 16- or 32- bit quantity.
OFFSETReturns the 32-bit offset of the expression that follows.
SEGReturns the segment part of the operand.
TYPEReturns the type of the operand. The type of a NEAR symbol is -1, of a FAR symbol is -2. The type of a memory operand is its size. The type of an immediate symbol is 0.
PTRTypecasts the following expression into the type symbol that precedes the PTR operator. Valid typecasts are BYTE PTR, WORD PTR, DWORD PTR, FWORD PTR, TBYTE PTR, QWORD PTR, NEAR PTR, and FAR PTR.
*Multiplication. Both arguments must be absolute immediate quantities, or one of the arguments should be an index register and the other a scale factor (1,2,4, or 8).
/Division. Both arguments must be absolute immediate quantities.
MODInteger remainder after division. Both arguments must be absolute immediate quantities.
SHL, SHRLeft and right shifts. Both arguments must be absolute immediate quantities.
+, -Addition and Subtraction. At most one arguments can be a relocatable value and it cannot be the argument that is being subtracted. The other argument must be an absolute immediate quantity.
NOTBinary complement. The argument must be an absolute immediate quantity.
ANDBitwise AND. The arguments must be absolute immediate quantities.
ORBitwise OR. The arguments must be absolute immediate quantities.
XORBitwise exclusive OR. The arguments must be absolute immediate quantities.



Previous: Operands To the Table of Content Next: Differences between 16- and 32-bit code
Operands Table of Content Differences between 16- and 32-bit code

- 2.3.12 -