Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to print average of 2 numbers

Posted By: Adalricus Fischer     Category: Assembly Language     Views: 4931

Write a Program to print average of 2 numbers.

Code for Program to print average of 2 numbers in Assembly Language

stack segment
stack ends

data segment

  temp1 dw 2h
  temp2 dw 2h
  avg1 db 2h
  temp3 db ?

data ends


code segment


   assume cs:code,ds:data

   start:
      mov ax,data      
      mov ds,ax        

      mov ax,temp1      
      add ax,temp2

      div avg1          
      mov temp3,al      

      mov ax,4c00h     
      int 21h

code ends               
  end start             

  
Share: 


Didn't find what you were looking for? Find more on Program to print average of 2 numbers Or get search suggestion and latest updates.

Adalricus Fischer
Adalricus Fischer author of Program to print average of 2 numbers is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 

Other Interesting Articles in Assembly Language:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!