ASM program to count number of positive and negative numbers from a given series of numbers

Monday, June 4th, 2012

Aim: – To write an assembly language program to count number of positive and negative numbers from a given series of numbers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
MOV AX, DATA
MOV DS, AX
MOV CL, 05
XOR BL, BL
XOR DL, DL
LEA SI, SERIES
 
NEXT2:	MOV AL, [SI]
SHR AL, O1
JNC NEXT1
INC BL
JMP NEXT3
NEXT1:	INC DL
NEXT3:	INC SI
DEC CL
JNZ NEXT2
MOV POS, DL
MOV NEG, BL
END

Result: The numbers of positive and negative numbers are counted from the given series.

Avatar of chitra

Author Name :
chitra

Total : 0 Comment


Leave a Reply

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: