Syntax: ACI 8-bit Where 8-bit is an immediate value. Byte: 2 byte Addressing Mode: Immediate Addressing Working: 1. 2. 3. 4. Flag Example: ACI 22H where [c flag] = 1 And [A]= 11H After execution of ACI 22H [A] = 34H Program: write an ALP for addition of Register A that is 44H and carry flag is 1 with immediate value 30H. Store result at memory location 5000H. Label Mnemonics Comments Start: ACI 30H ; a= a+cy+ 30h...a= 75h STA 5000H Stop: HLT Output: [5000H]= 75H
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
Comments
Post a Comment