Previous: Opcode Mnemonics To the Table of Content Next: Operands

- 2.3.10 -
TMT Pascal Language Description
Built-in Assembler

Assembler Operand Expressions

Operand expressions are built from operands and operators. Operands are constants, registers, labels, and memory locations. Operators combine operands and alter their attributes. Each instruction allows only certain combinations of operands.

Operand expressions can be classified into three classes: Immediate operands
  PUSH  10
  MOV   AX, 10
  MOV   AX, offset Start
Here 10, and Start are immediate operands. The values of AX and 10 can be determined immediately; the value of offset Start is determined during linking.

Registers
TMT Pascal built-in assembler allows use of any 8, 16, or 32-bit 80386 registers.
  XOR  AH, AL
  LSL  EAX,EAX
  MOV  AX, FX
Memory and label operands
Memory operands refer to the data stored in memory locations. Usually, one uses the square brackets [..] or the type ptr operator to ensure that the argument is treated as a memory location. Label operands refer to locations in code.
  MOV      EBX,[0]
  POP      Word Ptr [88]
  POP      Word Ptr 88  // same as above
  JMP      @exit
  LOOP16   @loop
Memory and immediate operands can be either absolute or relocatable. An operand is absolute if its value or offset is entirely known during compilation. An operand is relocatable if its offset will become known only during linking.


Previous: Opcode Mnemonics To the Table of Content Next: Operands
Opcode Mnemonics Table of Content Operands

- 2.3.10 -