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

>>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.

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 !!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.