101
Bit test
This function verifies whether at least one bit in get X register is set according to mask
defined by get Y register. If confirmed, the function returns value 1 in store result column,
else 0.
Example:
hexadecimal binary
get X (register) 04D2 = 0000 0100 1101 0010 (value)
get Y (register) 1820 = 0001 1000 0010 0000 (mask)
store result (bit) 0 = 0
get X (register) 04F2 = 0000 0100 1111 0010 (value)
get Y (register) 1820 = 0001 1000 0010 0000 (mask)
store result (bit) 1 = 1
Mask test
This function verifies whether all bits in get X register defined in mask get Y are set. If
confirmed, the function returns value 1 in store result column, else 0.
Example:
hexadecimal binary
get X (register) 04D2 = 0000 0100 1101 0010 (value)
get Y (register) 1820 = 0001 1000 1110 0010 (mask)
store result (bit) 0 = 0
get X (register) 04F2 = 0001 1100 1111 0010 (value)
get Y (register) 1820 = 0001 1000 1110 0010 (mask)
store result (bit) 1 = 1
Buffer copy
This function copies value of source buffer starting at register (get X) to destination buffer
defined in store result. The length of copied buffer depends on the value in (get Y) register.
The function stops when:
- buffer length value is negative,
- writing attempted beyond the buffer space,
- copied value exceeds allowed value of destination buffer. (For instance, an attempt to
copy -1 from 32 bit register to 16 bit register).
Example:
get X (register) = XREG10
get Y (register) = REG1
store result (register) = DREG2
If REG1 = 4, to function copies 4 values:
DREG5 = XREG13,
DREG4 = XREG12,
DREG3 = XREG11,
DREG2 = XREG10
CAUTION!!!
The function starts copying from the last buffer register and ends at the first register. It
creates an easy way to create a logger keeping the history of selected resources in internal
registers. In section "Examples of programs" a „Logger program” illustrates using this
function.
Summary of Contents for MT-101
Page 1: ......
Page 129: ...126 11 7 Drawings and dimensions ...