MOVB: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(MOVB instruction)
 
(Typo fix)
 
Line 8: Line 8:
}}
}}


'''MOVB''' is an assembly instruction. A block of bytes are copied from the location specified for the source operand to the location specified for the destination operand. Overlap is taken care of.
'''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 register|A]] and [[D register|D registers]]. The destination operand is defined by the [[X register|X]] and [[T register|T registers]].
The source operand is defined by the [[A register|A]] and [[D register|D registers]]. The destination operand is defined by the [[X register|X]] and [[T register|T registers]].
Line 14: Line 14:
See [[BFILL]] for an explanation of how the operands are defined. Source: A and D registers. Destination: 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 lenght value of the two operands.
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.
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.

Latest revision as of 13:56, 26 July 2010

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.