Found 558 Articles for Microprocessor

8085 program to divide two 16 bit numbers

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

2K+ Views

Here we will see how to divide two 16 bit numbers using 8085.Problem StatementWrite 8085 Assembly language program to divide two 16-bit numbers.Discussion8085 has no division operation. To perform division, we have to use repetitive subtraction. To perform 16-bit division, we have to do the same but for the register pairs. As the register pairs are used to hold 16-bit data.The Divisor is stored at location FC00 and FC01, the dividend is stored at FC02 and FC03. After division, the quotient will be stored at FC04 and FC05, and the remainder will be stored at FC06 and FC07.InputAddressDataFC008AFC015CFC025AFC031D Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00001, ... Read More

8085 program to determine if the number is prime or not

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

2K+ Views

In this program we will see how to check a number is prime or not using 8085.Problem StatementWrite 8085 Assembly language program to check whether a given number is prime or not.DiscussionHere the approach is little bit different. We are actually counting the number of unique factors. For prime numbers the factors are only two. The 1 and the number itself. So if the result is 02H, then it is prime, otherwise not a prime number. As there is no division operation, we have to perform division by subtracting repeatedly.InputAddressDataF10007 AddressDataF100FF AddressDataF1002F Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, F1 LXI H, F100Point to F100 to take ... Read More

8085 program to count total odd numbers in series of 10 numbers

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

2K+ Views

In this program we will see how to count number of odd numbers in a block of elements.Problem StatementWrite 8085 Assembly language program to count number of odd numbers in a block of data, where the block size is 10D. The block is starting from location 8000H.DiscussionThe Odd Even checking is very simple. we can determine one number is odd or even by checking only the LSb. When LSb is 1, the number is odd, otherwise it is even. In this program we are taking a number from memory and then ANDing 01H with it. if the result is nonzero, ... Read More

8085 program to count number of elements which are less than 0A

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

391 Views

In this section we will count elements which are lesser than 0AH using 8085.problem StatementThere is an array of some elements. Write 8085 Assembly language program to count number of elements that are lesser than 0AH.DiscussionThe array is placed at location F051H onwards. The F050 is holding the size of the array. The logic is simple. At first we will take the array size into the B register. The C register will count number of elements less than 0AH. We will take numbers one by one from memory, then compare it with 0A. if the CY flag is set it ... Read More

8085 program to check whether both the nibbles of 8 bit number are equal or not

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

486 Views

Here we will see how to check whether two nibbles of a number are same or not.Problem StatementWrite 8085 Assembly language program to check whether upper nibble and lower nibbles are same or not.DiscussionTo check the nibbles, we have to mask at first. So we need to mask the lower nibble and upper nibble and store them into different registers. The upper nibble will be shifted to the right four bits to make it lower nibble. Then we can check both are same or not. If they are same store 00 at F150 location, otherwise store FF at F150 location.InputAddressDataF050FE AddressDataF050AA Flow ... Read More

8085 program for pulse waveform

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

3K+ Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to generate pulse waveform.Problem Statement:Write 8085 Assembly language program to generate continuous square wave.DiscussionTo generate square wave with 8085, we will rotate 10101010 (AAH) continuously. We have to send D0 as output. We will mask the accumulator content by 01H. If this is 0, then output will be 0, if it is 1, output will be 1, thus the pulse will be generated.InputNo input is given in this caseFlow Diagram programAddressHEX CodesLabelsMnemonicsComments800016, AA MVI D, AAHLoad 10101010 into D80027AROTATEMOV A, DLoad D to A800307 RLCRotate A ... Read More

8085 program for hexadecimal counter

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

922 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to simulate the hexadecimal counter.Problem StatementWrite 8085 Assembly language program to simulate hexadecimal counter.DiscussionHexadecimal counters in 8085 is similar to the binary counter. There are two different parts. The main counting part and the delay part. We have to define a delay subroutine to generate delay between each number while counting. We are considering that we have some external display which are connected through IO port, that will display the result in hexadecimal form.InputHere we are not providing any input.Flow Diagram ProgramAddressHEX CodesLabelsMnemonicsCommentsF00006, FF MVI ... Read More

8086 program to determine modulus of first array elements corresponding to another array elements

Nishtha Thakur
Updated on 30-Jul-2019 22:30:26

221 Views

In this program we will see how to perform modulus of the first array corresponding to the next array.Problem StatementWrite 8086 Assembly language program perform modulus of the first array corresponding to the next array.DiscussionIn this example there are two different arrays. The arrays are stored at location 501 onwards and 601 onwards. The size of these two arrays are stored at offset location 500. We are taking the array size to initialize the counter, then by using loops we are getting the modulus of the elements one by oneInputAddressData……500045010F5020B5030550408……601046020A6030260403……Flow DiagramProgram    MOV SI, 500     ;Point Source index ... Read More

8086 program to determine subtraction of corresponding elements of two arrays

Smita Kapse
Updated on 30-Jul-2019 22:30:26

221 Views

In this program we will see how to subtract the contents of two different arrays.Problem StatementWrite 8086 Assembly language program to subtract the contents to corresponding elements which are stored in two different arraysDiscussionIn this example there are two different arrays. The arrays are stored at location 501 onwards and 601 onwards. The size of these two arrays are stored at offset location 500. We are taking the array size to initialize the counter, then by using loops we are subtracting the elements one by oneInputAddressData……5000450109502035030850406……60104602016030260403……Flow DiagramProgram    MOV SI,  500     ;Point Source index to 500     MOV CL,  [SI]    ;Load the ... Read More

Merits of I/O-mapped I/O and demerits of memory-mapped I/O

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

1K+ Views

Before having a discussion regarding the merits of I/O mapped I/O and demerits of memorymapped I/O, let us have a generic discussion regarding the difference between I/O mapped I/O and memory mapped I/O.In Memory Mapped Input Output −We allocate a memory address to an Input Output device.Any instructions related to memory can be accessed by this Input Output device.The Input Output device data are also given to the Arithmetic Logical Unit.Input Output Mapped Input Output −We give an Input Output address to an Input Output device.Only IN and OUT instructions are accessed by such devices.The ALU operations are not directly ... Read More

Previous 1 ... 7 8 9 10 11 ... 56 Next
Advertisements