Assembly language program to find the average of 3 numbers


Asked by admin @ in Computer Science viewed by 291 People


Write an assembly language program to find the average of 3 numbers

Answered by admin @



 the average of three given numbers stored in memory.

Let’s identify variables needed for this program.
First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1, NUM2 and NUM3. Other variables will be holding the Output or Result of the Average and it will be AVG So in all Four variables.
The identified variables are NUM1, NUM2, NUM3 and AVG.

First Line – DATA SEGMENT

DATA SEGMENT is the starting point of the Data Segment in a Program and DATA is the name given to this segment and SEGMENT is the keyword for defining Segments, Where we can declare our variables.

Next Line – NUM1 DB 5
NUM2 DB 9
NUM3 DB 7
AVG  DB ?

We are initializing NUM1 to 5 (Blank (or Nothing after number) stands for Decimal ( By Default) ),  NUM2 to 9 ((Blank (or Nothing after number) stands for Decimal ( By Default) ), NUM3 to 7 (Blank (or Nothing after number) stands for Decimal ( By Default) ), AVG to ? (?stands for blank value). Detailed explanation is given below.

Next Line – DATA ENDS

DATA ENDS is the End point of the Data Segment in a Program. We can write just ENDS But to differentiate the end of which segment it is of which we have to write the same name given to the Data Segment.

Now, Selection of data type is DB data type the numbers which we are adding will be integers so DB is sufficient.


Similar Questions

Write a program to find average of three numbers

Asked by admin @ in Computer Science viewed by 337 persons

Write a program to find average of three numbers.

Program to find sum of two numbers in c++

Asked by admin @ in Computer Science viewed by 353 persons

Write a program in C++ to display the sum of two numbers 20 and 30.

How to find the average when a number is missing

Asked by admin @ in Mathematics viewed by 314 persons

The mean of six numbers is 6.8. Find two missing numbers that would make this true. 8.9 ? 12.4? 5.4? 3.2 ?​

How to find weighted average number of common shares outstanding

Asked by admin @ in Business viewed by 333 persons

In computing the weighted-average number of shares outstanding during the year, which of the followingmidyear events must be treated as if it had occurred at the beginning of the year?a. …

Program to find greatest of three numbers in python

Asked by admin @ in Computer Science viewed by 341 persons

Write a program in python to find the greatest number among three numbers​

Program to find largest number in an array in 8051

Asked by admin @ in Computer Science viewed by 289 persons

Program to find largest number in an array in 8051

The translator program used in assembly language is called

Asked by admin @ in Computer Science viewed by 366 persons

The translator program used in assembly language is called a. Compiler b. Interpreter c. Assembler d. Translator

Algorithm and flowchart to find average of n numbers

Asked by admin @ in Computer Science viewed by 352 persons

algorithm and flowchart of the program to read n integers ,store them in array and find their sum and average.

Find the average of first 40 natural numbers

Asked by admin @ in Math viewed by 330 persons

Find the average of first 40 natural numbers

A program written in assembly language is called

Asked by admin @ in Computer Science viewed by 311 persons

A program written in assembly language is called the​

A program written in the assembly language is called

Asked by admin @ in Computer Science viewed by 350 persons

A program written is assembly language is called ​

Find the average of first six multiples of 3

Asked by admin @ in Math viewed by 341 persons

Find the average of first six multiples of 3

Find six rational number between 2 and 3

Asked by admin @ in Math viewed by 288 persons

Find six rational number between 2 and 3

Find the rational number between 2 and 3

Asked by admin @ in Math viewed by 358 persons

Find two rational number between 2 and 3

Find a rational number between 2 and 3

Asked by admin @ in Math viewed by 322 persons

Find two rational number between 2 and 3

Most viewed questions in Computer Science


A programmer mistakenly writes gor instead of for

Asked by admin @ in Computer Science viewed by 19019 persons


Domestic data entry operator ncert book class 9 solutions

Asked by admin @ in Computer Science viewed by 15806 persons


Information technology code 402 class 9 solutions chapter 1

Asked by admin @ in Computer Science viewed by 10970 persons



Ncert solutions for class 8 computer chapter 1 computer system

Asked by admin @ in Computer Science viewed by 10401 persons


A scrum team works on a 4 weeks sprint

Asked by admin @ in Computer Science viewed by 8721 persons


Which of the following occupies more memory in c

Asked by admin @ in Computer Science viewed by 8135 persons



A database of motor vehicles has the base entity

Asked by admin @ in Computer Science viewed by 7841 persons


The network architecture can be termed as a mcq

Asked by admin @ in Computer Science viewed by 6486 persons


Cat5 and cat6 cabling refer to which reference model layer

Asked by admin @ in Computer Science viewed by 5788 persons



Class 7 computer chapter 3 questions and answers

Asked by admin @ in Computer Science viewed by 5691 persons


Choose the correct options about usability and user experience

Asked by admin @ in Computer Science viewed by 5474 persons


Which advocates daily team meetings for coordination and integration

Asked by admin @ in Computer Science viewed by 4980 persons



Which three security features match the database security level

Asked by admin @ in Computer Science viewed by 4970 persons


Which of the dbms package is not available

Asked by admin @ in Computer Science viewed by 4682 persons


________ aid a business grow and attain its objectives

Asked by admin @ in Computer Science viewed by 4487 persons