@Cpu                    Return CPU Information              Predefined equate

The predefined numeric equate @Cpu returns information about the
currently selected (i.e. at assembly time) processor. It evaluates to
a number with the following bits set:

Bit number Means
────────── ─────
0 8086 instructions enabled
1 80186 instructions enabled
2 80286 instructions enabled
3 386 instructions enabled
4 486 instructions enabled
5 Pentium instructions enabled
7 Privileged instructions (≥ 80286) enabled
8 8087 instructions enabled
10 80287 instructions enabled
11 387 instructions enabled

Several of the above bits may be set. For example, a processor like
the 80286 supports 8086 instructions as well as 80186 instructions,
so bits 0, 1 and 2 would be set if the CPU is an 80286. Similarly, if
a 387 was selected, bits 8, 10, and 11 would be set.


Example: macro ipushw imm16
if @Cpu and 2 ;; 80186+
push imm16
else
mov ax,imm16
push ax
endif
endm