Microprocessor Articles

Page 5 of 42

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 907 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 888 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

IN and OUT instructions in 8085 Microprocessor

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

In 8085 Instruction set, there are two instructions in 8085 for communication with I/O ports. They are the IN and OUT instructions. The IN or OUT instruction mnemonics should be followed by an 8-bit port address. Thus we can have 28 = 256 input ports and 256 output ports are possible in 8085-based microcomputers. IN and OUT both are 2-Bytes instructions.Mnemonics, OperandOpcode(in HEX)BytesIN Port-addressDB2OUT Port-AddressD32In case of IN instruction, the current 8-bit content of the PORT# will be made available on to the Accumulator. Let us suppose with the PORT#, 8 DIP switches are connected. And their states are ON-ON-OFF-ON-ON-ON-OFF-ON. ...

Read More

Execution of ‘DAD rp’ instruction

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

In 8085 Instruction set, for 16-bit addition, there is one instruction available that is DAD rp instruction. It is a 1-Byte instruction. With this instruction, with the content of the HL register pair, the contents of the mentioned register pair will get added and the result thus produced will be stored on the HL register pair.Mnemonics, OperandOpcode(in HEX)BytesDAD B091DAD D191DAD H291DAD SP391As an example, let us consider the execution of the DADB instruction. Let us suppose, that the initial content of HL register pair is 5050H and content of BC register pair is 4050H. So now if we execute instruction ...

Read More

HLT instruction in 8085

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

In 8085 Instruction set, HLT is the mnemonic which stands for ‘Halt the microprocessor’ instruction. It is having a size of 1-Byte instruction. Using these particular instructions, as 8085 enters into the halt state, so we can put the8085 from further processing of next instructions. This is indicated by S1 and S0 control signals. During the halt, S1 and S0 output signals will become 0 0. Mnemonics, OperandOpcode(in HEX)BytesHLT761The 8085 comes out of the Halt state when a valid interrupt occurs. In such a case, it executes the corresponding interrupt service subroutine depending upon the interrupt number and then it continues ...

Read More
Showing 41–50 of 417 articles
« Prev 1 3 4 5 6 7 42 Next »
Advertisements