Asmc Operators Reference

May 8, 2026 ยท View on GitHub

Asmc Macro Assembler Reference

Asmc Operators Reference

In This Section

Arithmetic

* (multiply). (field)
[] (index)+ (add)
/ (divide)- (subtract or negate)
MOD (remainder)

Control Flow

! (runtime logical not)<= (runtime less or equal)
!= (runtime not equal)== (runtime equal)
|| (runtime logical or)> (runtime greater than)
&& (runtime logical and)>= (runtime greater or equal)
< (runtime less than)& (runtime bitwise and)
CARRY? (runtime carry test)OVERFLOW? (runtime overflow test)
PARITY? (runtime parity test)SIGN? (runtime sign test)
ZERO? (runtime zero test)

Logical and Shift

ADD (bitwise add)AND (bitwise and)
BSF (Bit Scan Forward)BSR (Bit Scan Reverse)
DIV (bitwise divide)MUL (bitwise multiply)
NOT (bitwise not)OR (bitwise or)
ROL (Rotate bits left)ROR (Rotate bits right)
SAR (shift bits right)SAL (shift bits left)
SHL (shift bits left)SHR (shift bits right)
SUB (bitwise subtract)XOR (bitwise exclusive or)

Macro

! (character literal)% (treat as text)
;; (treat as comment)< > (treat as one literal)
& & (substitute parameter value)

Miscellaneous

' ' (treat as string)" " (treat as string)
: (local label definition):: (register segment and offset)
:: (global label definition); (treat as comment)
ADDR (address of)DUP (repeat declaration)

Record

Masm specificAsmc
MASK (get record or field bitmask)MASKOF
WIDTH (get record or field width)WIDTHOF

Relational

EQ (equal)GE (greater or equal)
GT (greater than)LE (less or equal)
LT (less than)NE (not equal)

Segment

: (segment override):: (register segment and offset)
IMAGEREL (image relative offset)LROFFSET (loader resolved offset)
OFFSET (segment relative offset)SECTIONREL (section relative offset)
SEG (get segment)

Type

Masm specificAsmc
BCST (embedded broadcast type)BCST
HIGH (high 8 bits of lowest 16 bits)HIGHBYTE
HIGH32 (high 32 bits of 64 bits)HIGH32
---HIGH64 (high 64 bits of 128 bits)
HIGHWORD (high 16 bits of lowest 32 bits)HIGHWORD
LENGTH (number of elements in array)LENGTHOF
LENGTHOF (number of elements in array)LENGTHOF
LOW (low 8 bits)LOWBYTE
LOW32 (low 32 bits)LOW32
---LOW64 (low 64 bits)
LOWWORD (low 16 bits)LOWWORD
OPATTR (get argument type info)OPATTR
PTR (pointer to or as type)PTR
SHORT (mark short label type)SHORT
SIZE (size of type or variable)SIZEOF
SIZEOF (size of type or variable)SIZEOF
THIS (current location)---
TYPE (get expression type)TYPEOF
---TYPEID (get expression id)
.TYPE (get argument type info).TYPE

See Also

Asmc Reference | Directives Reference