Conditional Jump Instructions in 8085 Microprocessor

Ankith Reddy
Updated on 27-Jun-2020 14:44:57

4K+ Views

In 8085 Instruction set, there are a set of jump instructions, which can transfer program control to a certain memory location. So after these branching mnemonics, we shall have to mention 16-bit target address of the location. These jump instructions can be divided into two categories– Unconditional jump instructions andConditional jump instructionsHere we shall discuss conditional jump instructions in details. Under conditional Jump instructions, we are having 8 different mnemonics. We know that there are 5 flag bits in 8085 Flag register. They are S, Z, P, Cy, AC. Out of them only on AC flag bit, there is no jump ... Read More

Jump If Carry (JC) in 8085 Microprocessor

Chandu yadav
Updated on 27-Jun-2020 14:43:31

6K+ Views

In 8085 Instruction set, we are having one mnemonic JC a16, which stands for “Jump if Carry” and “a16” stands for any 16-bit address. This instruction is used to jump to the address a16 as provided in the instruction. But as it is a conditional jump so it will happen if and only if the present carry flag value is 1.If carry flag value is 0, program flow continues sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesJC LabelDA3Let us consider one example of this instruction type JC 4000H. It is a 3-Byte instruction. The result of execution of this instruction ... Read More

Jump If Not Zero (JNZ) Result in 8085 Microprocessor

George John
Updated on 27-Jun-2020 14:43:01

11K+ Views

In 8085 Instruction set, we are having one mnemonic JNZ a16, which stands for “Jump if Not Zero” and “a16” stands for any 16-bit address. This instruction is used to jump to the address a16 as provided in the instruction. But as it is a conditional jump so it will happen if and only if the present zero flag value is 0. If zero flag value is 1, program flow continues sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesJNZLabelC23Let us consider one example of this instruction type JNZ 4000H. It is a 3-Byte instruction. The result of execution of this ... Read More

Jump If Zero (JZ) Result in 8085 Microprocessor

Ankith Reddy
Updated on 27-Jun-2020 14:42:29

3K+ Views

In 8085 Instruction set, we are having one mnemonic JZ a16, which stands for “Jump Zero” and “a16” stands for any 16-bit address. This instruction is used to jump to the address a16 as provided in the instruction. But as it is a conditional jump so it will happen if and only if the present zero flag value is 1. If the zero flag value is 0, program flow continues sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesJZ LabelCA3Let us consider one example of this instruction type JZ 4000H. It is a 3-Byte instruction. The result of execution of this instruction ... Read More

Jump if Parity Odd (JPO) in 8085 Microprocessor

Arjun Thakur
Updated on 27-Jun-2020 14:42:13

964 Views

In 8085 Instruction set, we are having one mnemonic JPO a16, which stands for “Jump if Parity Odd” and “a16” stands for any 16-bit address. This instruction is used to jump to the address a16 as provided in the instruction. But as it is a conditional jump so it will happen if and only if the present parity flag value is 0. If parity flag value is 1, program flow continues sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesJPO LabelE23Let us consider one example of this instruction type JPO 4000H. It is a 3-Byte instruction. The result of execution of ... Read More

Jump if Parity Even (JPE) in 8085 Microprocessor

Ankith Reddy
Updated on 27-Jun-2020 14:41:43

2K+ Views

In 8085 Instruction set, we are having one mnemonic JPE a16,  which stands for “Jump if Parity Even” and “a16” stands for any 16-bit address. This instruction is used to jump to the address a16 as provided in the instruction. But as it is a conditional jump so it will happen if and only if the present parity flag value is 1. If the parity flag value is 0, program flow continues sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesJPE LabelEA3Let us consider one example of this instruction type JPE 4000H. It is a 3-Byte instruction. The result of execution ... Read More

Python Exit Handlers with atexit

Daniol Thomas
Updated on 27-Jun-2020 14:38:59

756 Views

The atexit module in the standard distribution of Python has two functions – register() and unregister(). Both functions take some existing function as an argument. Registered functions are executed automatically when the interpreter session is terminated normally.If more than one functions are registered, their execution is in the reverse order of registration. It means, functions f1(), f2() and f3() are registered one after other, their order of execution will be f3(), f2() and f1().The unregister() function removes the specified function from list of functions to be automatically invoked.Following code shows how a function is registered for automatic execution upon termination ... Read More

Measure Execution Time of Small Python Code Snippets using timeit

Nancy Den
Updated on 27-Jun-2020 14:38:42

285 Views

The Timer class and other convenience functions in timeit module of Python's standard library are designed to provide a mechanism to measure time taken by small bits of Python code to execute. The module has a command line interface and the functions can be called from within program as well.Easiest way to measure time of execution is by using following convenience functiontimeit()This function returns object of Timer class. It mainly requires two parameters.stmt − a string containing valid Python statement whose execution time is to be measured.setup − a string containing Python statement which will be executed once, primarily to ... Read More

The Python Debugger (pdb)

Jennifer Nicholas
Updated on 27-Jun-2020 14:38:10

2K+ Views

In software development jargon, 'debugging' term is popularly used to process of locating and rectifying errors in a program. Python's standard library contains pdb module which is a set of utilities for debugging of Python programs.The debugging functionality is defined in a Pdb class. The module internally makes used of bdb and cmd modules.The pdb module has a very convenient command line interface. It is imported at the time of execution of Python script by using –m switchpython –m pdb script.pyIn order to find more about how the debugger works, let us first write a Python module (fact.py) as follows ... Read More

Jump If Positive (JP) in 8085 Microprocessor

George John
Updated on 27-Jun-2020 14:37:55

3K+ Views

In 8085 Instruction set, we are having one mnemonic JP a16, which stands for “Jump if Positive” and “a16” stands for any 16-bit address. This instruction is used to jump to the address a16 as provided in the instruction. But as it is a conditional jump so it will happen if and only if the present sign flag value is 0. If the sign flag value is 1, program flow continues sequentially. It is a3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesJPLabelF23Let us consider one example of this instruction type JP 4000H. It is a 3-Byte instruction. The result of execution of this instruction ... Read More

Advertisements