Microprocessor/Computer and Communication Departments/2 Experiment No: 2 AIM: Write and execute an Assembly Language Pro
Posted: Tue May 24, 2022 8:09 am
Microprocessor/Computer and Communication Departments/2 Experiment No: 2 AIM: Write and execute an Assembly Language Program (ALP) to 8086 Processor to find the sum of numbers in an array ALGORITHM: 1. Start 2. Initialize counter-10. 3. Initialize array pointer. 4. Sum-0. 5. Get the array element pointed by array pointer. 6. Add array element in the Sum 7. Increment array pointer decrement counter. 8. Repeat steps 4, 5 & 6 until counter-0. 9. Display Sum 10. Stop. EXAMPLE: DATA:12H, 24H, 26H, 63H, 25H, 86H, 2FH, 33H, 10H, 35H MOV CL, (10) MOV DLO LEA BX, ARRAY MOV SUM,0 BACK: MOV AL,[BX+DIJ ADD SUM, AL INC DI DEC CL JNZ BACK Problems: 1. Write and execute an Assembly Language Program (ALP) to 8086 Processor to find average of 8 bit numbers in an array Iraq University College Microprocessor/Computer and Communication Departments/2 year 2. Write and execute an Assembly Language Program (ALP) to 8086 Processor to find product of 8 bit numbers in an array 3. Write and execute an Assembly Language Program (ALP) to 8086 Processor to find the factorial of 8 bit numbers in an array