Summary of Moving Data

Summary

The opcodes that move data between locations within the 8051 and between the 8051 and external memory have been discussed. The general form and results of these instructions are as follows.

Instruction Type

Result

MOV destination, source

Copy data from the internal RAM source address to the internal RAM destination address

MOVC A, source

Copy internal or external program memory byte from the source to register A

MOVX destination, source

Copy byte to or from external RAM to register A

PUSH source

Copy byte to internal RAM stack from internal RAM source

pop destination

Copy byte from internal RAM stack to internal RAM destination

XCH A, source

Exchange data between register A and the internal RAM source

XCHD A, source

Exchange lower nibble between register A and the internal RAM source

There are four addressing modes: an immediate number, a register name, a direct internal RAM address, and an indirect address contained in a register.

Leave a comment

Your email address will not be published. Required fields are marked *