Syntax: SBI 8bit Where 8-bit is an immediate data operand. Byte: 2byte Addressing Mode: Immediate Addressing Working: 1. 2. A= A- 8bit -b 3. 4. Flag Example: SBI 10H where [A]= 22H and [c flag]= 1 After execution of SBI 10H [A] = 11H // A= A-8bit-b => 22-10-1 =11H Program: write an ALP for subtraction of 30H value from Registers A Where A carries 44H and Cy flag carries borrow value 1. Store result at memory location 5000H. Label Mnemonics Comments Start: SBI 30H ; a= a-8bit- cy... ; A= 44- 30 -1 = 13h STA 5000H Stop: HLT Output: [5000H]= 13H
Syntax: RLC Byte: 1byte Addressing Mode: Implicit Addressing Working: 1. This is one byte instruction. 2. Microproccessor will allocate one byte for opcode RLC 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 left. i.e. The bit A7 is stored in bit position A0 as well as in carry flag. 4. C flag will get affected. Example: RLC where [A]= 21H After execution of RLC [A] =42H A= 21 = 0010 0001 Cy <- A7<-A6<-A5<-A4<-A3<-A2<-A1<-A0 |___->__________________________->_| 0 0 1 0...
Syntax: INX Rhp Where Rhp is the higher order register of the pair BC or DE or HL. Byte: 1byte Addressing Mode: Register Addressing Working: 1. 2. 3. 4. Flag Example: INX H Where [HL]= 1000H After execution of INX H [HL]= 1001H
Comments
Post a Comment