Your limit has been exceed. We have implemented this system because, We got difficulty on managing our servers. Please donate some amount to remove this limit.
Quota: 0 / 30Donate
In the 8085 Instruction set there are four instructions, which belong to the type LXI rp, d16. These instructions are used to load the 16-bit address into the register pair. We can use this instruction to load data from memory location using the memory address, which is stored in the register pair rp.
The rp can be BC, DE, HL or SP.
The LXI instructions and their Hex-codes are as follows.
|Mnemonics, Operand||Opcode (in HEX)||Bytes|
COMPARE is an important instruction widely used in 8085 microprocessor. The 8085 instruction set has two types of Compare operations: Compare with accumulator (CMP) and Compare immediate with accumulator (CPI).
The microprocessor compares a data byte (or register/memory contents) with the contents of the accumulator by subtracting the data byte from (A), and indicates whether the data byte is less than, greater than or equals to the content of accumulator by modifying the flags. However, the contents are not modified. The two types of COMPARE instructions are explained briefly in the following section:
When memory is an operand, its address is specified by HL Pair. No contents are modified; however all remaining flags (S, P, AC) are affected according to the result of subtraction.
Let register B contains data byte 62H and the accumulator A contains 57H. Then,
Instruction- CMP B Before execution: A = 57, B = 62 After execution: A = 57, B = 62
Flags: As A less than B, thus CY is set and Z flag is reset.
Click here to submit your answer.