Previous: 2.3.10. Operand Expressions To the Table of Contents Next: 2.3.12. Operators
2.3.10. Operand Expressions Table of Contents 2.3.12. Operators

- 2.3.11. -
Table of Contents
2. TMT Pascal Language Description
2.3. Built-in Assembler
2.3.11. Operands


2.3.11. 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: 2.3.10. Operand Expressions To the Table of Contents Next: 2.3.12. Operators
2.3.10. Operand Expressions Table of Contents 2.3.12. Operators

- 2.3.11. -