Syntax: ANA R Where R can be any of the general purpose registers (A,B,C,D,E,H and L) Byte: 1byte Addressing Mode: Register Addressing Working: 1.This is 1 byte instruction. 2. Microprocessor will allocate first byte for opcode. 3. During execution of this instruction, microprocessor will perform Logical ANDing operation between content of Accumulator and content of operand register. 4. S, Z and P are modified . Cy is reset(Cy=0) and Ac is set (Ac=1) . Example: ANA B where [B] = 22H [A]= 11H After execution of ANA B [A] = 00H [B] = 22H A= 11 = 0001 0001 B =22 = 0010 0010 A=00 0000 0000 FLAG= 01 0 1 0 0 0 0 = 50H
Syntax: LDA 16-bit Where 16-bit is for memory location. Byte: 3byte Addressing Mode: Direct Addressing Working: for execution of this instruction, microprocessor will allocate first byte for opcode, second byte for lower order address and third byte for higher order. Example: LDA 4000H where [4000H] = A0 H After execution of LDA 4000H [A]= A0 H
Syntax: XRA R Where R can be any of the general purpose registers (A,B,C,D,E,H and L) Byte: 1byte Addressing Mode: Register Addressing Working: 1.This is 1 byte instruction. 2. Microprocessor will allocate first byte for opcode during execution. 3. During execution of this instruction, microprocessor will perform Logical XORing operation between content of Accumulator and operand register. 4. S, Z and P are modified . Cy and Ac are reset . Example: XRA B where [B] = 52H and [A]= 11H After execution of XRA B [A] = 43H [B] = 22H A= 11 = 0001 0001 B= 52 = 0101 0010 A=43 0100 0011 FLAG = 00 0 0 0 0 0 0 = 0 0H
Comments
Post a Comment