Previous: Operand Expressions To the Table of Content Next: Operators

- 2.3.11 -
TMT Pascal Language Description
Built-in Assembler

Assembler Operands

TMT Pascal allows the following operands: Numeric Constants, Strings, Registers, Pascal Symbols and Special Assembler Symbols.

Numeric Constants
Numeric constants are 32-bit integers, e.g. integers in the range -2147483648..4294967295. Numeric constants can be entered as decimal numbers binary numbers (using the 'B' suffix), octal numbers (using the 'O' or 'Q' suffix), hexadecimal numbers (using the 'H' suffix or '$' prefix). Note that the hexadecimal numbers must start with a digit.

Strings
Strings are enclosed in either single or double quotes. A repeated quote of the same type as the surrounding quotes is treated as one character. String constants of arbitrary length may occur only in the 'DB' directive. In all other cases, the string must not exceed four characters and its value is converted into an integer number.

Registers
The use of registers was described above.

Pascal Symbols
With built-in assembler you can access the majority of Pascal symbols. These include labels, constants, variables, types, and procedures.
The values, classes and types of Pascal symbols are summarized in the table below:
SymbolValueClassType
labelits addressMemoryNEAR
constantits valueImmediate0
type0MemorySizeOf(type)
fieldits offsetMemorySizeOf(type)
variableits addressMemorySizeOf(type)
procedureits addressMemoryNEAR
functionits addressMemoryNEAR
unitits addressImmediate0
Special Assembler Symbols
Built-in assembler supports five special symbols: @CODE, @DATA, @RESULT, @PARAMS and @LOCALS. The @CODE and @DATA are not really useful in a flat model. They always return 0Ch and 14h, which are the standard segment selectors for the code and data segments. The @RESULT symbol points to the pseudo-variable that contains the function return, @PARAMS and @LOCALS return the size of the parameter and local areas on stack.


Previous: Operand Expressions To the Table of Content Next: Operators
Operand Expressions Table of Content Operators

- 2.3.11 -