- 2.3.11 -
TMT Pascal Language Description
Built-in AssemblerAssembler 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:
Symbol | Value | Class | Type |
label | its address | Memory | NEAR |
constant | its value | Immediate | 0 |
type | 0 | Memory | SizeOf(type) |
field | its offset | Memory | SizeOf(type) |
variable | its address | Memory | SizeOf(type) |
procedure | its address | Memory | NEAR |
function | its address | Memory | NEAR |
unit | its address | Immediate | 0 |
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.
|
|
|
Operand Expressions |
Table of Content |
Operators |
- 2.3.11 -