MOVBF

From NDWiki
Revision as of 13:55, 26 July 2010 by TArntsen (talk | contribs) (MOVBF instruction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MOVBF
Description Move bytes forward
Format MOVBF
Code 140 1328
Affected P,A,D,X,T, memory region defined by X,T
Type User
Architecture ND-100, ND-110

MOVBF 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. The instruction is similar to MOVB except that overlap is not taken care of. In case of overlap causing data destruction there will be an error return (no skip return).

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 without error, i.e. any instruction directly following MOVBF will not be executed. In case of forbidden overlap (source data to be moved will be destroyed) the P register is incremented by one instead of two.

References

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