Logo 
Search:

Assembly Language Articles

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

PROGRAM TO COUNT TOTAL OF POSTIVE AND NEGATIVE NUMBERS

Posted By: Adelaide Fischer     Category: Assembly Language     Views: 24366

WRITE A PROGRAM TO COUNT TOTAL OF POSTIVE AND NEGATIVE NUMBERS

Code for PROGRAM TO COUNT TOTAL OF POSTIVE AND NEGATIVE NUMBERS in Assembly Language

.MODEL SMALL
.DATA
        cr equ 0dh
        lf equ 0ah
        LIST dW 2579H, 0A500H, 0C009H,0159H,0B900H
    COUNT EQU 05H
.CODE
        mov ax,@data
        mov ds,ax

        XOR BX,BX
    XOR DX,DX
    MOV CL,COUNT
    MOV SI, OFFSET LIST
AGAIN:    MOV AX,[SI]
    SHL AX,01
        JC NEGAT
    INC BX
    JMP NEXT
NEGAT:  INC DX
NEXT:    ADD SI,02    
    DEC CL
    JNZ AGAIN
    
    MOV ah,4ch
        INT 21h

        end 
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM TO COUNT TOTAL OF POSTIVE AND NEGATIVE NUMBERS Or get search suggestion and latest updates.

Adelaide Fischer
Adelaide Fischer author of PROGRAM TO COUNT TOTAL OF POSTIVE AND NEGATIVE NUMBERS is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
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!