Program to find out positive and negative numbers-assembly, Assembly Language

Program :

Write an assembly program to find out the number of positive numbers and negative numbers from a given series of signed numbers.

Solution :

Take the ith number in any of the registers.  And rotate it left throughout carry. The status of carry flag, for example the most significant bit of the number will give the information regarding the sign of the number. If CF is 1, the number is negative; or else, it is positive.

1264_program3.jpg

Posted Date: 10/12/2012 7:57:13 AM | Location : United States







Related Discussions:- Program to find out positive and negative numbers-assembly, Assignment Help, Ask Question on Program to find out positive and negative numbers-assembly, Get Answer, Expert's Help, Program to find out positive and negative numbers-assembly Discussions

Write discussion on Program to find out positive and negative numbers-assembly
Your posts are moderated
Related Questions
Tabular comparison for µ PS' Parameters Tables (a) and (b) list the characteristic of Intel microprocessor. Table(a):   Table(b): It has a 64 bit da

NASM assembly language program: Consider a sequence of 19 strictly positive decimal digits, most likely stored in an array. There are obviously duplicates, and the sequence is un

AAD: ASCII Adjust for Division though the names of these 2 instructions (AAM and AAD) seem to be same, there is many difference between their functions. The AAD instruction conver

SHL/SAL : Shift logical/Arithmetic Left: These instructions shift the operand byte or word bit by bit to the left and insert 0 in the newly introduced least significant bits. In c

Compute the Fibonacci sequence - assembly program: Problem: Fibonacci   In this problem you will write a program that will compute the first 20 numbers in the Fibonacci sequ

SBB: Subtract  with Borrow  :- The subtract with borrow instruction subtracts the source operand and the borrow flag (CF) which might reflect the result of the past calculations,

Memory Segmentation : The  memory in an 8086/8088  based system is organized as segmented memory. In this scheme, the whole physically available memory can be divided into a n

You are to write an assembly language program called subfaq.s that computes the generalized subfactorial function of nonnegative integer inputs i0 and n. The generalized subfactori

Write a MIPS/SPIM assembly language program that prints the smallest and largest values found in a non-empty table of N word-sized integers. The address of the first entry in your

can any one help me in my project by using assembly language