Logo 
Search:

Assembly Language Articles

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

AN APPLICATION WHICH DIVIDES 10 8-BIT DATA STORED IN ARRAY BY 20 AND STORE IN 2ND ARRAY QUOTIENT AND THEN REMAINDER

Posted By: Olivia Campbell     Category: Assembly Language     Views: 11341

AN APPLICATION WHICH DIVIDES 10 8-BIT DATA STORED IN ARRAY BY 20 AND STORE IN 2ND ARRAY QUOTIENT AND THEN REMAINDER.

Code for AN APPLICATION WHICH DIVIDES 10 8-BIT DATA STORED IN ARRAY BY 20 AND STORE IN 2ND ARRAY QUOTIENT AND THEN REMAINDER in Assembly Language

.model small
.data
        value db 0010, 0020, 0030, 0040, 0050, 0060, 0070, 0080, 0090, 0100        
        quotient db 10 dup (?)
        remainder db 10 dup (?)

        ent db 0dh, 0ah, '$'

.code
begin:          
        mov ax, @data
        mov ds, ax
        mov es, ax

        lea si, value
        lea di, quotient
        lea bx, remainder

        mov cx, 09h
        mov dl, 20h

counter:
        mov al, [si]
        div dl
        mov [di], al
        mov [bx], ah

        mov ah, 09h
        lea dx, ent
        int 21h

        mov dl, 20h
        inc si
        inc di
        inc bx
        loop counter


mov ax, 4c00h
int 21h

.exit
end begin
  
Share: 



Olivia Campbell
Olivia Campbell author of AN APPLICATION WHICH DIVIDES 10 8-BIT DATA STORED IN ARRAY BY 20 AND STORE IN 2ND ARRAY QUOTIENT AND THEN REMAINDER is from Toronto, Canada.
 
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!