954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

count smaller in assembly language MASM615

good morning \ afternoon \ evening

i need a help in the assebly code ,,

my brain about to explore !!

so here's the Q:

this program reads an array of integers and an integer number .the program then checks if there are any numbers in the array smaller than this number . at the end the program print the count of these numbers .

i need the code in MASM615

VirusS
Newbie Poster
2 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

>>i need the code in MASM615

And I need $1Billion too, but like you I'm not likely to get it without some effort on my part. Post the code you have written.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

oh !! i forget to post the code !!

so here's what i've done so far !

INCLUDE Irvine32.inc

.data

ARRAY BYTE 5,6,7,2,8,-1
scount BYTE ?

msg1 BYTE "Plz enter an integer number: ",0

.code
main PROC

mov ecx, LENGTHOF ARRAY
mov edx, offset msg1

call writestring
call readInt
mov num, eax
Call clrscr
mov eax, data
mov ds, eax
mov ecx, offset ARRAY
mov eax, [esi]
mov smallest, eax
mov ecx, 6
L1:
mov eax, [esi]
cmp eax, smallest
mov smallest, eax
JMP L2

L2:

add ecx,2
LOOP L1

exit;
main ENDP
END main

i'm new in the language and i dont know how to do it !!

VirusS
Newbie Poster
2 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: