Click here for important information about

hello :( i need help

January 8, 2011 at 00:28:52
Specs: Macintosh
how can i write this program in Assembly language "MASM"

This program reads an array of integers then it calculates the sum of the numbers in even indexes 0,2,4,… and the sum of the integers in odd indexes 1,3,5, …. It then compares the two sums if they are equal a message is displayed saying that this is a magic array. If not then a message saying they're not is displayed.

See More: hello :( i need help

January 8, 2011 at 15:30:51
Maybe with C# or C++, but I dont know these languages ;(

Happy is ONE who says I am an OttoMAN.

Report •

January 9, 2011 at 12:36:48
thank u MUs , i do it with java language as my Instructor told me and she asked me to convert it to assembly as our project required , and i'm stuck in the middle :s

i still need help :'''''''''(
pllz who knows Assembly language help me

Report •

January 10, 2011 at 00:24:30
If you have already written the program but are having difficulty getting it to work, then show us what you have done and someone may be able to give you some pointers as to the problem.

But if it's a question of not knowing where to start, then I'm not sure this is the appropriate place to ask. I think you should, in that case, discuss it with your course tutor.

Report •

Related Solutions

January 10, 2011 at 00:42:11
this is what i did till now

I_Array BYTE 1,2,3,4,5,6,7,8,9,10
Even_Counter WORD 0
Odd_Counter WORD 0
msg1 BYTE "This Is a Magic Array",0
msg2 BYTE "they're not displayed"


move ecx,10

SET r1, 0; //r1 will take the place of i
SET r2, 1; //r2 will hold the value to increment each time

SET m, ?
MOD m,r1,2
mov( m, eax );

cmp( eax, 0 );

jne ElsePart;

ADD Even_Counter,Even_Counter,I_Array[r1];

jmp EndOfIf;


ADD Odd_Counter, Odd_Counter, I_Array[r1];

ADD r1, r1, r2;

Loop I_Loop

mov ( Even_Counter, eax)
cmp (eax, Odd_Counter)

jne ElsePart;

call ReadString
mov edx,offset msg1
jmp EndOfIf;

call ReadString
mov edx,offset msg2


Report •

Ask Question