MOVB

From NDWiki
Jump to navigation Jump to search
MOVB
Description Move bytes
Format MOVB
Code 140 1318
Affected P,A,D,X,T, memory region defined by X,T
Type User
Architecture ND-100, ND-110

MOVB is an assembly instruction. A block of bytes is copied from the location specified for the source operand to the location specified for the destination operand. Overlap is taken care of.

The source operand is defined by the A and D registers. The destination operand is defined by the X and T registers.

See BFILL for an explanation of how the operands are defined. Source: A and D registers. Destination: X and T registers.

The number of bytes copied is the shortest field length value of the two operands.

After execution both operands point to the end of the respective source- and destination fields (after the last byte copied). Bits 0-11 (field length) of the D register equals zero and bits 0-11 of the T register contain the number of bytes moved.

Bits 12-13 of the T register and bit 12 of the D register are used during execution, and are left cleared. Bit 13 must be zero before execution, it is used as an interrupt mark.

The P register is incremented by two when this instruction is finished, i.e. any instruction directly following MOVB will not be executed.

References

The older document is more accurate and detailed for this instruction.