Briefly explain following 8085 branch instructions: JMP, JC, JNC, JZ, JNZ, CALL, RET. Also write an assembly language code in gnusim8085 to find whether the given number is even or odd.


1. JMP: -  (unconditionally jump) The program sequence is transferred to the memory location specified by the the16-bit address given in the operand.
Eg: - JMP 2034H ( jump to location 2034H) there is no condition to jump.
         JMP ABC (jump to ABC level)


2. JC: - (conditional jump)  The program sequence is transferred to a particular level or a 16-bit address if C=1 (or carry is 1)
Eg: - JC ABC (jump to the level ABC if C=1)

3. JNC:- (conditional jump) The program sequence is transferred to a particular level or a 16-bit address if C=0 (or carry is 0)
Eg: JNC ABC (jump to the level abc if C=0)

4. JZ: - (conditional jump) The program sequence is transferred to a particular level or a 16-bit address if Z=1 (or zero flag is 0)
 Eg: - JZ ABC (jump to the level ABC if Z=1)

5. JNZ: - (conditional jump) The program sequence is transferred to a particular level or a 16-bit address if Z=0 (or zero flag is 0)
 Eg: - JNZ ABC (jump to the level ABC if Z=0)


6. CALL: -  The call instruction transfers the program sequence to the memory address given in the operand. Before transferring, the address of the next instruction after CALL is pushed onto the stack. Call instructions are 2 types: Unconditional Call Instructions and Conditional Call Instructions


7. RET:-  The RETI instruction is used to end an interrupt service routine. This instruction pops the high-order and low-order bytes of the PC (and decrements the stack pointer by 2) and restores the interrput logic to accept additional interrupts. No other registers are affected by this instruction.

write an assembly language code in gnusim8085 to find whether the given number is even or odd.




12)write an assembly language code in gnusim8085 to transfer a block of data (10 numbers) in reverse order.  Ans:-  (Click here to View)


10)Briefly explain the following 8085 shift instructions: RAL, RAR. Also, write an assembly language code in gnusim8085 to multiply and divide the 8-bit number by value 4. Ans:-  (Click here to View)


No comments:

Get new posts by email:


APY Logo