Expressions¶
The debugger allows usage of basic expressions. Apart from calculations, it allows variable assignment using a C-like syntax. You can play around with expressions by typing them in the command bar, or using the calculator (Help -> Calculator menu).
Input¶
The basic input (numbers/variables) can be used as constants in expressions, see Input for more information.
Operators¶
You can use the following operators in your expression. They are processed in the following order:
- parentheses/brackets:
(1+2)
,[1+6]
have priority over other operations. - unary minus/binary not/logical not:
-1
(negative 1),~1
(binary not of 1),!0
(logical not of 0). - multiplication/division:
2*3
(regular multiplication),2`3
(gets high part of the multiplication),6/3
(regular division),5%3
(modulo/remainder of the division). - addition/subtraction:
1+3
(addition),5-2
(subtraction). - left/right shift/rotate:
1<<2
(shift left, shl for unsigned, sal for signed),10>>1
(shift right, shl for unsigned, sal for signed),1<<<2
(rotate left),1>>>2
(rotate right). - smaller (equal)/bigger (equal):
4<10
,3>6
,1<=2
,6>=7
(resolves to 1 if true, 0 if false). - equal/not equal:
1==1
,2!=6
(resolves to 1 if true, 0 if false). - binary and:
12&2
(regular binary and). - binary xor:
2^1
(regular binary xor). - binary or:
2|8
(regular binary or). - logical and:
0&&3
(resolves to 1 if true, 0 if false). - logical or:
0||3
(resolves to 1 if true, 0 if false). - logical implication:
0->1
(resolved to 1 if true, 0 if false).
Quick-Assigning¶
Changing memory, a variable, register or flag can be easily done using a C-like syntax:
a?=b
where?
can be any non-logical operator.a
can be any register, flag, variable or memory location.b
can be anything that is recognized as an expression.a++/a--
wherea
can be any register, flag, variable or memory location.
Functions¶
You can use functions in expressions. See Expression Functions for the documentation of these functions.