| |||
| Home > Working with the CLI > Constructing expressions > Operations on symbols and registers | |||
You can perform operations on symbols, on the registers listed in Table 1.5, the internal debugger variables, and board-specific registers. The operations you can perform are listed in Table 1.7.
Table 1.7. Register operations
| Operation | Description | Examples |
|---|---|---|
| Assign a value to the symbol. | @PC = 0x8000 |
| Increment or decrement the value in the symbol. | @R6++ |
| Add a value to, or subtract a value from, the symbol. | @R12 = @R11+2 |
| Multiply or divide the value in the symbol
by a specified .
Dividing by zero gives an error message. | @R7 = @R7*2 |
@ | AND the value
with the contents of the symbol. indicates
the inverse of the mask value. | @FLG &= 3
@FLG &= ~3 |
@ | OR the value
with the contents of the symbol. indicates
the inverse of the mask value. | @FLG |= 3 |
@ | Exclusive OR the value
with the contents of the symbol. indicates
the inverse of the mask value. | @FLG ^= 3 |