Data Transfer Instructions
This category of instructions has the job of transferring or moving data from one place to another within a microprocessor, we are referring only to the “net effect” of the transfer, and that nothing actually moved.Where Data is transferred?
- Data is moved between registers and memory.
- The number of possible combinations depends on the microprocessor and how many registers it has.
How Data is transferred?
When a move, load, transfer, or store instruction is executed, a duplicate of the data is actually being placed in the target register or destination.
The MOVE Instruction (MOV)
The move (MOV) instruction is used to transfer a byte or a word of data from a source operand to a destination operand.
No Operation Instruction (NOP)
- The no operation instruction does exactly that: It does nothing. This is a waste of time, and wasting time is what this instruction does best.
- A microprocessor is quite fast, in some situations too fast. We can give it a certain number of this operation instruction to stall it until a certain amount of time passes.
- By adding some no operation instructions at various locations in the program when you first write it, some spaces will have been created where new instructions can go.
- The new instruction can simply take the place of the “no operation” instruction.
Halt Instruction (HLT)
- Called wait, halt, or break (depending on the microprocessor), this instruction has the obvious purpose of stopping the microprocessor.
- There is no go instruction; we’ll see how that I done shortly, but there must be a way to stop the program.
- In some microprocessor families this is not the only function of this instruction, but this is all we need to be concerned with at this time.



Hi Sir Ckey! What do you mean about the word "net effect"? Thank you in advance.
ReplyDeleteHi Christine! The means of "net effect" in data transferring is the flow of the program. Data transfer affect when there is a net traffic in the program.
DeleteJust wondering, how are data transfered from memories and registers?
ReplyDeleteHi John! Data transferred into memories and registers by the use of addressing.
DeleteData is transferred from CPU to memory by using address bus and data bus. The process of transferring data from CPU to memory consists of different steps.
These steps are as follows:
CPU places the address of main memory on address bus.
CPU places the address of the data location on address bus.
Main memories see the address on address bus.
Is there any other operation that can be used in transferring data aside from MOV?
ReplyDeleteHi Shena! Yes, there are other instructions used to transfer data aside from MOV.
DeleteYou can use:
PUSH : Push to Stack
This instruction pushes the contents of the specified register/memory location on
to the stack. The stack pointer is decremented by 2, after each execution of the
instruction.
E.g. PUSH AX
• PUSH DS
• PUSH [5000H]
POP : Pop from Sack
This instruction when executed, loads the specified register/memory location with the
contents of the memory location of which the address is formed using the current stack
segment and stack pointer.
The stack pointer is incremented by 2
Eg. POP AX
POP DS
POP [5000H]
XCHG : Exchange byte or word
This instruction exchange the contents of the specified source and destination
operands
Eg. XCHG [5000H], AX
XCHG BX, AX
LEA :
Load effective address of operand in specified register.
[reg] offset portion of address in DS
Eg. LEA reg, offset
LDS:
Load DS register and other specified register from memory.
[reg]<– [mem]
[DS] <– [mem + 2]
Eg. LDS reg, mem
LES:
Load ES register and other specified register from memory.
[reg] <– [mem]
[ES] <– [mem + 2]
Eg. LES reg, mem
What do you think is the reason why they made a operation "NOP"?, because as you say here it doesn't do anything or just a waste of time.
ReplyDeleteHi Karen! They made NOP instruction because it is typically used to generate a delay in execution or to reserve space in code memory.
DeleteI forgot to use HLT at the end of my program. What will happen Sir? Will it cause any problem?
ReplyDeleteHi Micah! Yes, If you forget to use HLT at the end of your program, it will cause to an error that can be the reason why you can not get the accurate value or the right answer to your program.
DeleteThe data transfer rate (DTR) is the amount of digital data that is moved from one place to another in a given time. The data transfer rate can be viewed as the speed of travel of a given amount of data from one place to another. In general, the greater the bandwidth of a given path, the higher the data transfer rate.
ReplyDeleteIn telecommunications, data transfer is usually measured in bits per second. For example, a typical low-speed connection to the Internet may be 33.6 kilobits per second (Kbps). On Ethernet local area networks, data transfer can be as fast as 10 megabits per second. Network switches are planned that will transfer data in the terabit range. In earlier telecommunication systems, data transfer was sometimes measured in characters or blocks (of a certain size) per second. Data transfer time between the microprocessor or RAM and devices such as the hard disk and CD-ROM player is usually measured in milliseconds.
In computers, data transfer is often measured in bytes per second. The highest data transfer rate to date is 14 terabits per second over a single optical fiber, reported by Japan's Nippon Telegraph and Telephone (NTT DoComo) in 2006.
What do you mean by register? Is it the same as memory? Please state their differece Sir if there is any.
ReplyDeleteHi Lourdes!
DeleteRegisters are temporary storage locations inside the CPU that hold data and addresses.
Registers are storage locations internal the the processor. CPU instructions operate on these values directly. On RISC processors, all data must be moved into a register before it can be operated. On CISC (Intel) chips, there are a few operations that can load data from RAM, process it, and save the result back out, but the fastest operations work directly with registers.
While memory, or RAM, is located external to the CPU. Generally speaking, data has to be loaded into a CPU register from memory before the CPU can process it, RAM is much slower than registers, there is a lot more RAM than registers, and generally memory can be addressed on a byte boundaries, where registers may not be able to access all the bytes in a register.
to summarize: registers are temporary storage in the CPU that holds the data the processor is currently working on, while RAM holds the program instructions and the data the program requires.