8085 Articles

Page 4 of 36

Conditional and Unconditional JUMP instructions in 8085 Microprocessor

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 11K+ 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 instructionsUnder unconditional jump instructions there is only one mnemonic i.e. JUMP. But 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 ...

Read More

Jump if carry (JC) in 8085 Microprocessor

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 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

Unconditional call and return instructions in 8085 Microprocessor

Arjun Thakur
Arjun Thakur
Updated on 27-Jun-2020 16K+ Views

Sometimes in 8085assembly language coding, we require to repeat a certain program segment for multiple times. In those situations, we can define sub-routines. In those subroutines, we can enclose our repeatedly reusable Instruction set or code. And then as when required we shall call those sub-routines accordingly. Sub-routines can also be called as procedures.Whenever the instructions in a subroutine are required to be executed, we branch program control to the subroutine using th CALL instruction.  CALL is a 3-Byte instruction, with 1 Byte for the opcode, and 2 Bytes for the address of the subroutine. CALL mnemonics stands for “call ...

Read More

Conditional call instructions in 8085 Microprocessor

Ankith Reddy
Ankith Reddy
Updated on 27-Jun-2020 4K+ Views

In 8085 Instruction set, depending upon one of the flag bit values (excluding AC flag bit), the conditional call instructions will branch to a subroutine. The branch takes place based on the value of Cy flag, Z flag, P flag, or S flag. There is no call instruction based on the value of AC(Auxiliary Carry) flag bit. This is because generally, no one is interested in branching to a subroutine based on this flag bit value. The conditional call instructions are 3 Bytes in length, 1 Byte for the opcode, and another 2 Bytes for the subroutine address i.e.low-order Byte ...

Read More

Call if carry (CC) in 8085 Microprocessor

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 930 Views

In 8085 Instruction set, CC is a mnemonic, which stands for “Call if Carry”. This instruction is used to branch to the subroutine whose 16-bit address is provided in the instruction, only if Cy flag value is 1. If Cy flag value is 0, program flow continues in the main program sequentially. It is a3-Byte instruction.Mnemonics, OperadOpcode(in HEX)BytesCC LabelDC3Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address20033EMVI A, 40HA ← 40H, Initializing the Accumulator with initial value 40H20044040H as operand200506MVI ...

Read More

Return if carry (RC) in 8085 Microprocessor

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 911 Views

In 8085 Instruction set, RC is a mnemonic, which stands for “Return if Carry”. This instruction is used to return to the main program, only if Cy flag value is 1. If Cy flag value is 0, program flow continues in the subroutine sequentially. It is a 1-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesRCD81Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address200321LXI H, 4050HHL ← 4050H, Initializing the HL register pair200450Low order Byte of the address200540High order Byte of the address2006CDCALL 200BHCalling the ...

Read More

8085 Program to Check the fourth bit of a byte

George John
George John
Updated on 27-Jun-2020 2K+ Views

In this program, we will see how to check the 4th bit of an 8-bit number.Problem StatementWrite 8085 Assembly language program to check whether the fourth bit of a byte is 0 or 1.When it is 0, store 00H at any specified location, and when it is 1, store FFH at the specified location.DiscussionWe are considering the 8-bit number, and storing 00H or FFH by checking the 4th bit on the number from left. The logic behind it is very simple. We are just performing bit-wise and operation on the given data with 08H. If the result is non-zero, then the 4th ...

Read More

8085 Program to Multiply two numbers of size 8 bits

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 1K+ Views

In this program, we will see how to multiply two 8-bit numbers using 8085 microprocessor.Problem StatementWrite 8085 Assembly language program to multiply two 8-bit numbers stored in a memory location and store the 16-bit results into the memory.DiscussionThe 8085 has no multiplication operation. To get the result of multiplication, we should use the repetitive addition method. After multiplying two 8-bit numbers it may generate 1-byte or 2-byte numbers, so we are using two registers to hold the result.We are saving the data at location 8000H and 8001H. The result is storing at location 8050H and 8051H.InputAddressData......8000DC8001AC......Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, 80LXI H, ...

Read More

Restart instructions (RSTn) in 8085 Microprocessor

George John
George John
Updated on 27-Jun-2020 13K+ Views

In 8085 Instruction set, RSTn is actually standing for “Restart n”. And in this case,  n has a value from 0 to 7 only. Thus the eight possible RST instructions are there, e.g. RST 0, RST 1, …, RST 7. They are 1-Byte call instructions. Functionally RST n instruction is similar with:RST n = CALL n*8For example, let us consider RST 4 is functionally equivalent to CALL 4*8, i.e. CALL 32 = CALL 0020H. The advantage of RST 2 is that it is only 1 Byte, whereas CALL 0010H is 3-Byte long. Thus RST instructions are useful for branching to frequently used subroutines.Mnemonics, OperandOpcode(in ...

Read More

OUT a8 instruction in 8085 Microprocessor

Arjun Thakur
Arjun Thakur
Updated on 27-Jun-2020 10K+ Views

In 8085 Instruction set, OUT is a mnemonic that stands for OUTput Accumulator contents to an output port whose8-bit address is indicated in the instruction as a8. It occupies 2 Bytes in the memory. First Byte specifies the opcode, and the next Byte provides the 8-bit port address. Mnemonics, OperandOpcode(in HEX)BytesOUT Port-AddressD32OUT F0H is an example instruction of this type. The result of execution of this instruction is shown below with an example.BeforeAfter(A)ABHABHOutput Port F0HAny ValueABHOUT instruction is the only instruction using whichAccumulator contents can be sent out to an output port. A possible chip select circuit to connect an output ...

Read More
Showing 31–40 of 357 articles
« Prev 1 2 3 4 5 6 36 Next »
Advertisements