Purpose: | To copy a character string or block of memory | ||||||
Format: | opcode srclen.rw, srcadr.ab, dstadr.ab opcode srclen.rw, srcadr.ab, fill.rb, dstlen.rw, dstadr.ab |
||||||
Operation: |
MOVC3
MOVC5 if srclen = dstlen {copy srclen bytes from the src address to the dst address}; {C <- 0; Z <- 1} MOVC5 if srclen > dstlen {copy dstlen bytes from the src address to the dst address}; {C <- 0; Z <- 0} MOVC5 if srclen > dstlen {copy srclen bytes from the src address to the dst address}; {fill (dstlen - srclen) bytes from (dst address + srclen) to (dst address + dstlen - 1)}; {C <- 1; Z <- 0} |
||||||
Condition Codes: |
N <- srclen LSS dstlen; Z <- srclen EQL dstlen; V <- 0; C <- srclen LSSU dstlen; |
||||||
Exceptions: | None | ||||||
Opcodes: |
|
||||||
Description: | In the 3 operand format, the destination string specified by the length an destination address operands is replaced by the source string specified by the length and the source address operands.
In the 5 operand format, the destination string specified by the destination length and the destination address operands is replaced by the source string specified by the source length and source address operands. If the destination string is longer than the source string, the remaining bytes are replaced by the fill operand. If the destination string is shorter than the source string, only the number of bytes specified by the destination string length operand are copied. The operation of the instruction is such that overlap of the source and destination strings does not affect the result. |
||||||
Notes: |
|