8051 Programs for Sorting
Programs for Sorting THEORY: The sorting technique used here is relatively simple. First consider the first two numbers of the array. INPUT: 8600 05H, 08H, 07H, 06H, 04H OUTPUT: 8600 04H, 05H, 06H, 07H,...
Programs for Sorting THEORY: The sorting technique used here is relatively simple. First consider the first two numbers of the array. INPUT: 8600 05H, 08H, 07H, 06H, 04H OUTPUT: 8600 04H, 05H, 06H, 07H,...
Smallest Element in an Array THEORY: Let Internal memory location (say 40H) has the biggest number i.e. zero. Now the biggest number in internal memory location is stored in memory as the Result. Now...
Largest Element in an Array THEORY: Let Internal memory location (say 40H) has the biggest number i.e. zero. Now the biggest number in internal memory location is stored in memory as the Result. Now...
Multi Byte Addition THEORY: The multi-byte addition program adds only in sets of 8-bits. The LSD of the two numbers is added first. Now, the next set of 8-bits is added, Taking into consideration...
8-Bit Division THEORY: Using the accumulator, Division is performed and the result is stored. Immediate addressing is employed. The div instruction writes the result in the accumulator INPUT: MOV A,# 08H MOV F0,#02H OUTPUT:...
8-BIT Multiplications THEORY: Using the accumulator, Multiplication is performed and the result is stored. Immediate addressing is employed. The MUL instruction writes the result in the accumulator INPUT: MOV A,# 06H MOV F0,#02H OUTPUT:...
8051 Specifications In 1981, Intel Corporation introduced an 8-bit micro controller called the 8051. This micro controller had 128 bytes of RAM, 4K bytes of on-chip ROM, two timers, one serial port, and four...
ALGORITHM: Initialize the pointer to the memory for data and result. The SUBB instruction writes the result in the accumulator. Store the result into Memory from A registers. INPUT: MOV A,# 20 SUBB A,#10 ...
Recent Comments