Uttryck

Uttryck får användas överallt där assemblern förväntar sig ett värde.
Tal, symboler och operatorer kan kombineras fritt.

Exempel:
10 + 20
Label + 4
Buffer + Index
$ + 10
(Value + 1) * 2

Symbolen $ representerar aktuell adress.

Följande operatorer stöds:

+ Addition
- Subtraktion
* Multiplikation
/ Heltalsdivision
** Potens

.AND. Bitvis AND
.OR. Bitvis OR
.XOR. Bitvis XOR
.NOT. Logisk NOT

.SHL. Vänsterskift
.SHR. Högerskift

.MOD. Rest vid division

.EQ. Lika med
.GT. Större än
.LT. Mindre än
.UGT. Unsigned större än
.ULT. Unsigned mindre än

= Lika med
> Större än
< Mindre än

\ Logisk NOT

Operatorn .RES. stöds inte. Inget fel vid overflow.
↑ stöds inte heller.

Jämförelseoperatorer returnerar FFFFh om villkoret är sant, annars 0000h.

Parenteser kan användas för att ändra beräkningsordningen.

MACRO, ENDM, COND och ENDC stöds inte.
Inte heller några assembler-kommandon.

Expressions

Expressions may be used wherever the assembler expects a value.
Numbers, symbols, and operators can be combined freely.

Examples:
10 + 20
Label + 4
Buffer + Index
$ + 10
(Value + 1) * 2

The symbol $ represents the current address.

The following operators are supported:

+ Addition
- Subtraction
* Multiplication
/ Integer division
** Exponentiation

.AND. Bitwise AND
.OR. Bitwise OR
.XOR. Bitwise XOR
.NOT. Logical NOT

.SHL. Shift left
.SHR. Shift right

.MOD. Remainder after division

.EQ. Equal to
.GT. Greater than
.LT. Less than
.UGT. Unsigned greater than
.ULT. Unsigned less than

= Equal to
> Greater than
< Less than

\ Logical NOT

The .RES. operator is not supported. No error is generated on overflow.
The ↑ operator is also not supported.

Comparison operators return FFFFh if the condition is true, otherwise 0000h.

Parentheses may be used to change the order of evaluation.

MACRO, ENDM, COND, and ENDC are not supported.
No assembler commands are supported either.