answersLogoWhite

0


Best Answer

8096

User Avatar

Nadia Heidenreich

Lvl 10
βˆ™ 3y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

βˆ™ 13y ago

ASSUME CS: CODE ,DS: DATA

DATA SEGMENT

op1 dw 1000h

op2 dw 2000h

result dw 01 DUP (?)

DATA END

CODE SEGMENT

START:

MOV AX,2000H

MOV DS,AX

MOV AX,op1

MOV BX,op2

clc

ADD AX,BX

MOV DI,OFFSET result

MOV [DI] ,AX

MOV AH,4CH

INT 21H

CODE ENDS

END START

This answer is:
User Avatar
User Avatar

bhargavi chowdary

Lvl 1
βˆ™ 1y ago
I want sum of first 10 numbers

User Avatar

Wiki User

βˆ™ 12y ago

.model small

.STACK 100

.data

.code

START:

MOV CL, 10 ; the counter is in cx

MOV AX, 0 ; use ax as sum holder

MOV BX, 0

BACK:

ADD BX, 2

ADD AX, BX

DEC CL

JNZ BACK

END START

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the 8086 program to find the sum of n numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Java program to find sum on even numbers from 12-45?

sum = 0; for (int i = 12; i


How do you find sum of 100 numbers using fortran programme?

The following is for F95 and later (due to the use of intrinsic SUM ): My assumptions: -Your numbers are integers -Your numbers are stored in an array -The numbers you are describing are 0-100 program findSum !I assumed integer, replace this with your data type integer, dimension(100) :: numbers integer :: sumOfNumbers !We populate an array with our numbers !Replace this with your numbers do i=1,(size(numbers)+1) numbers = i end do !We find the sum of those numbers sumOfNumbers = sum(numbers) !We write out the sum to prompt write(*,*) 'Sum is: ', sumOfNumbers end program findSum


Write a C program to find the sum of all prime numbers?

Since there is an infinite set of prime numbers the answer would be infinity.


Shell program to find the sum of cube of individual digits of a number?

Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.


Program to find sum of n numbers using recursion function?

int sum(n) { if (n==0) return 0; else return n+sum(n-1); }


Write a program to find the sum of even numbers from 2 to50?

In Java:sum = 0;for (i = 2; i


Write a program that read 10 numbers from the user and display their sum?

#include<stdio.h> void main() { int num, sum=0, i; printf("Enter ten numbers: \n"); for(i=0;i<10;i++) { scanf("%d",&num); sum += num; } printf("\n The sum of the numbers is %d",sum); getchar(); }


How do you find the sum of five numbers if the average of the five numbers is 790.6?

The average of a group of numbers is equal to the sum of the numbers divided by the number of numbers. If you want to find the sum of the five numbers, just multiply 790.6 by 5 to get the sum, which is 3953


How do you find the sum?

adding numbers together has the answer to the sum.


Write a java program to find sum of even and odd numbers in given array?

for(int i = 1; i < 100; i+=2) { System.out.println(i); }


What is a variable that accumulates the sum of several numbers?

A total is a variable that accumulates the sum of several numbers. Answer is based on C How to Program (6th Edition)