Programs in the address syntax language are a series of instructions and optional data. Each instruction is exactly 32 bits long and has from zero to three subsequent 32-bit operands; the number of operands is determined by the opcode stored in the lower 24 bits of the instruction. The two most significant bits, A1 and A2, specify whether the first two operands are addresses or MAPI property tags. If A1 is 1, then the first operand is an address. If A1 is 0, then the first operand is a MAPI property tag. Similarly, the value of A2 indicates the contents of the second operand. If the third operand exists, it is always an address. The remainder of the most significant byte of the instruction is reserved, and should be all zeroes. The following figure shows the structure of address syntax language instruction.
Address syntax language instruction format
The last instruction in the program must be HALT or ERROR. Any data for the program must be outside of the execution flow; you can place it after the last instruction or use the JUMP instruction to transfer execution over the data. An instruction has the format:
opcode [op1 [op2 [program-address]]]
where op1 and op2 are property tags associated with edit controls from the address template file or addresses of data strings within the address syntax program. The program-address operand is the address of an executable instruction in the address syntax program. Each instruction must have an operation code, but op1, op2, and program address are optional.
The following table describes all the instructions in the address syntax language.
Address Syntax Language Instructions
Symbolic name and operands | Binary Instruction Value | Number of operands | Description |
---|---|---|---|
HALT | 0x00000000 | 0 | End of program. Indicates successful completion. |
ERROR | 0x00000001 | 0 | End of program. An error was detected in data supplied by the user. |
EMIT property tag | 0x00000002 | 1 | Emits the data referenced by the property tag. Emitting data means copying what the user entered in the text field and appending it to the proxy address. |
EMIT data address | 0x80000002 | 1 | Emits the data in a string referenced by the data address. There must be data included after the HALT command in the address syntax program; the address is a hexadecimal offset in bytes from the beginning of the program, but may also be specified with a label. |
EMITUPPER data address | 0x00000006 | 1 | Same as the EMIT instruction, but converts the string to uppercase before appending it to the proxy address. |
JUMP program address | 0x00000003 | 1 | Program execution transfers to the designated address. The operand is the address where the Microsoft Exchange Server address book will execute the next instruction. |
JNX property tag, program address | 0x00000004 | 2 | Program execution transfers to the designated address if there is no data in the edit control associated with the property tag. This instruction allows the address syntax code to emit default data if the user fails to enter data in an optional field. The program may use this instruction to jump to an ERROR instruction that is handled by the Microsoft Exchange Server address book. |
JE property tag1, property tag2, program address |
0x00000005 | 3 | Program execution transfers to the given program address if the data in edit controls associated with the two property tags are equal. |
JE property tag, data address, program address |
0x40000005 | 3 | Program execution transfers to the given program address if data in the edit control associated with the property tag equals data referred to by the data address. |
JE data1 address, data2 address, program address | 0xC0000005 | 3 | Program execution transfers to the given program address if data referred to by the two data addresses are equal. |