Syntax: IN 8-bit Where 8-bit is an output port address. Byte: 2byte Addressing Mode: Direct Addressing Working: 1. 2. Example: IN 35H Where [35H]= 20 H After execution of above [A] = 20H
Syntax: RRC Byte: 1byte Addressing Mode: Implicit Addressing Working: 1. This is one byte instruction. 2. Microproccessor will allocate one byte for opcode RRC and operand is Accumulator i.e. operand will not need memory allocation during execution. 3. Thi s instruction rotates content of Accumulator one bit position towards Right. i.e. The bit A0 is stored in carry flag AS WELL AS will get stored in A7 bit position. 4. C Flag will get affected. Example: RRC where [A]= 21H After execution of RRC [A] = 90H A= 21 = 0010 0001 A7 -> A6 -> A5 -> A4 -> A3 -> A2 -> A1 -> A0 -> Cy |___<-____________________________<-_ __| 0 0 1 0 0 ...
EXAMPLES: CMP M ......... Register Indirect Addressing MOV A, M MOV M, A ANA M ORA M XRA M SUB M ADD M ADC M SBB M LXI H 3000H ; HL = 3000H MOV A,M ; M = 10H ; M -> A INX H ; HL = 3001H CMP M ; M = 11H, IF [A] ? [M] ----- ----- [3000H] = 10 [3001H] = 11
Comments
Post a Comment