Found 557 Articles for Microprocessor

8086 program to add two 16-bit numbers with or without carry

Chandu yadav
Updated on 30-Jul-2019 22:30:25

20K+ Views

In this program we will see how to add two 16-bit numbers with and without carry.Problem StatementWrite 8086 Assembly language program to add two 16-bit number stored in memory location 3000H – 3001H and 3002H – 3003H.Discussion8086 is 16-bit register. We can simply take the numbers from memory to AX and BX register, then add them using ADD instruction. When the Carry is present store carry into memory, otherwise only store AX into memory.We are taking two numbers BCAD + FE2D = 1BADAInput:AddressData……3000AD3001BC30022D3003FE…… Flow Diagram ProgramOutputAddressData……3004DA3005BA300601……

8086 program to add two 8 bit BCD numbers

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

6K+ Views

In this program we will see how to add two 8-bit BCD numbers.Problem StatementWrite 8086 Assembly language program to add two 8-bit BCD number stored in memory address offset 600.DiscussionThis task is too simple. Here we are taking the numbers from memory and after adding we need to put DAA instruction to adjust the accumulator content to decimal form. The DAA will check the AC and CY flags to adjust a number to its decimal form.InputAddressData……5009950125…… Flow Diagram Program OutputAddressData……6002560101…… 

Difference between CALL and JUMP instructions

Kiran Kumar Panigrahi
Updated on 20-Feb-2023 16:26:20

14K+ Views

A CALL instruction is used to call a subroutine, while a JUMP instruction updates the program counter value and makes it point to another location inside the program. Read this article to learn more about CALL and JUMP instructions and how they are different from each other. What is a CALL Instruction? A CALL instruction is utilized to call a sub-routine. Using a CALL instruction, the program control is transferred to a location in memory that is not a part of the main program. A CALL instruction necessarily requires the initialization of a Stack Pointer (SP). It is basically ... Read More

Reset Accumulator (8085 & 8086 microprocessor)

George John
Updated on 30-Jul-2019 22:30:25

3K+ Views

In this section we will see how to reset the accumulator content in Intel 8085 and 8086 microprocessors.In both of the microprocessors, there are four instructions to do the work. These instructions are doing the same in both cases.Let us see the 8085 instructions first to reset the Accumulator.MnemonicsDescriptionMVI A, 00HThis instruction loads 00H into the accumulator. This is two-byte instruction.ANI 00HThis instruction performs AND operation between accumulator and 00H. This is also a two-byte instruction.XRA AThis one-byte instruction is performing the XOR operation with accumulator itself.SUB ASUB A is another one-byte instruction. It subtracts accumulator value from the accumulator. The ... Read More

Program execution transfer instructions in 8086 microprocessor

Chandu yadav
Updated on 30-Jul-2019 22:30:25

9K+ Views

These instructions are used to transfer/branch the instructions during an execution. There are two types of branching instructions. The unconditional branch and conditional branch.The Unconditional Program execution transfer instructions are as follows.OpcodeOperandDescriptionCALLaddressUsed to call a procedure and save their return address to the stack.RET----Used to return from the procedure to the main program.JMPaddressUsed to jump to the provided address to proceed to the next instruction.LOOPaddressUsed to loop a group of instructions until the condition satisfies, i.e., CX = 0 Now let us see the Conditional Program execution transfer instructions.OpcodeOperandDescriptionJCaddressUsed to jump if carry flag CY = 1JNCaddressUsed to jump if no ... Read More

String manipulation instructions in 8086 microprocessor

George John
Updated on 30-Jul-2019 22:30:25

11K+ Views

String is a group of bytes/words and their memory is always allocated in a sequential order. String is either referred as byte string or word string. Here we will see some instructions which are used to manipulate the string related operations.The String manipulation instructions are as follows.OpcodeOperandDescriptionREPInstructionUsed to repeat the given instruction till CX ≠ 0.REPE/REPZInstructionUsed to repeat the given instruction until CX = 0 or zero flag ZF = 1.REPNE/REPNZInstructionUsed to repeat the given instruction until CX = 0 or zero flag ZF = 1.MOVS/MOVSB/MOVSW----Used to move the byte/word from one string to another.COMS/COMPSB/COMPSW----Used to compare two string bytes/words.INS/INSB/INSW----Used ... Read More

Process control instructions in 8086 microprocessor

Chandu yadav
Updated on 30-Jul-2019 22:30:25

3K+ Views

These instructions are used to control the processor action by setting/resetting the flag values.These are the process/processor control instructions.OpcodeOperandDescriptionSTC----Used to set carry flag CY to 1CLC----Used to clear/reset carry flag CY to 0CMC----Used to put complement at the state of carry flag CY.STD----Used to set the direction flag DF to 1CLD----Used to clear/reset the direction flag DF to 0STI----Used to set the interrupt enable flag to 1, i.e., enable INTR input.CLI----Used to clear the interrupt enable flag to 0, i.e., disable INTR input.  

Data transfer instructions in 8086 microprocessor

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

6K+ Views

These instructions are used to transfer the data from the source operand to the destination operand. These are also known as copy instructions.Let us see the data transfer instructions of 8086 microprocessor. Here the D and S are destination and source respectively. D and S can be either register, data or memory address.OpcodeOperandDescriptionMOVD, SUsed to copy the byte or word from the provided source to the provided destination.PUSHDUsed to put a word at the top of the stack.POPDUsed to get a word from the top of the stack to the provided location.PUSHA----Used to put all the registers into the stack.POPA----Used ... Read More

Logical instructions in 8086 microprocessor

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

9K+ Views

These instructions are used to perform operations where data bits are involved, i.e. operations like logical, shift, etc. We can say that these instructions are logical instructions. In 8086, the destination register may or may not the Accumulator.Let us see the logical instructions of 8086 microprocessor. Here the D, S and C are destination and source and count respectively. D, S and C can be either register, data or memory address.OpcodeOperandDescriptionANDD, SUsed for adding each bit in a byte/word with the corresponding bit in another byte/word.ORD, SUsed to multiply each bit in a byte/word with the corresponding bit in another ... Read More

Arithmetic instructions in 8086 microprocessor

George John
Updated on 30-Jul-2019 22:30:25

17K+ Views

These instructions are used to perform arithmetic operations like addition, subtraction, multiplication, division, etc. In 8086 the destination address is need not to be the accumulator.Let us see the arithmetic instructions of 8086 microprocessor. Here the D and S are destination and source respectively. D and S can be either register, data or memory address.OpcodeOperandDescriptionADDD, SUsed to add the provided byte to byte/word to word.ADCD, SUsed to add with carry.INCDUsed to increment the provided byte/word by 1.AAA----Used to adjust ASCII after addition.DAA----Used to adjust the decimal after the addition/subtraction operation.SUBD, SUsed to subtract the byte from byte/word from word.SBBD, SUsed ... Read More

Advertisements