Thursday, June 20, 2019

Assembly Language Program to COUNT NUMBER OF 1’s IN ARRAY

For many other Assembly Language  Programs related to microprocessor 8086, C++ , DataStructures  visit our  BLOG 

DATA SEGMENT        
ARRAY DB 9H,8H,50H,3H,20H,6H        
ONES  DB ?        
DATA ENDS
CODE SEGMENT
START: ASSUME CS:CODE, DS:DATA 
MOV AX, DATA 
MOV DS, AX        
MOV AL, NUM     
MOV CL , 06H 
MOV SI , OFFSET ARRAY
UP : MOV AL , [SI]
ROR AL, 1            
JNC EXIT
INC ONES     
JMP EXIT
EXIT:INC SI
 DEC CL
JNZ UP
 MOV AH,4CH 
INT 21H
CODE ENDS
END START 

Programs:-


For many other Assembly Language  Programs related to microprocessor 8086, c++ , datastructures  visit our  BLOG

There are programs of largest ,smallest ,division ,multiplication,odd/even,block operation ,string operations ,etc

No comments:

Post a Comment