0

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

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by VirusS
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.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.