| These instructions move data within the computer and to or from input/output devices
| | Possible data movements are:
- Memory-to-Memory
- Memory-to-CPU (i.e. to CPU registers)
- Constant-to-CPU (the constant would be specified in the instruction itself)
- Input-to-CPU
- CPU-to-Memory
- CPU-to-Output
The more the allowable data movements the more complex the CPU design become. A decision can be made to simplify the CPU by restricting data movement to or from the CPU registers (i.e. either the source or the destination has to be a register).
|
| | The moved data size might range from a single byte to hundreds of bytes
The longer the length of the moved data in a single instruction, the more complex the resulting CPU design. Requiring more than one instruction to move longer words of data would simplify the CPU design. Depending on the intended applications, the maximum size of data word that can be moved in one instruction is selected to minimize the overall execution time.
|
| | Separate instructions might deal with different data types. Possible data types are integers, floating point, characters, and address data type. This would complicate the CPU design further.
|
The table below shows examples of data movement instructions from different machines illustrating the different options discussed above.
| Examples of data movement instructions from several machines
|
|
Instruction | Description | Machine
| MOV A, B | Move 16-bit data from memory location A to memory location B | VAX11
| LDA A, Addr | Load the accumulator A with the byte at memory location Addr | M6800
| lwz R3, A | Move 32-bit data from memory location A to register R3 | PPC601
| li $3, 455 | Load the 32-bit integer constant 455 into register $3 | MIPS R3000
| mov R4, dout | Move 16-bit data from register R4 to output port dout | DEC PDP11
| IN AL, KBD | Load a byte from input port KBD to the lower 8-bits of the accumulator register | Intel Pentium
| LEA.L (A0), A2 | Load the address pointed to by A0 into A2 | MC68000
|
|
|
|