SET, SETH, SETMH, SETML, and SETL

Name:

SETH $X,YZ
SETMH $X,YZ
SETML $X,YZ
SETL $X,YZ

Specification:
SETH: u($X) ← YZ × 248
SETMH: u($X) ← YZ × 232
SETML: u($X) ← YZ × 216
SETL: u($X) ← YZ

Timing:

Description:

This instruction are used to load 16-bit constants. Either the two highest(High), the second highest (Medium High), the second lowest (Medium Low), or the lowest(Low) two byte can be loaded. All other bytes of the result are set to zero.

(Consider: Using two or more of these instructions doesn't work because it sets the two set bytes of the previous instruction to 0. Instead use the instruction that can be found in the description at ORH)

The instruction SET $X,YZ is assembled as SETL $X,YZ.

The instruction SET $X,$Y is assembled as OR $X,$Y,0.

See also:

Bitwise Operations with 16-Bit Immediate Operands and INCH .