Question: Your task for this assignment is to use Microsoft Assembly (MASM) language to sum the first 10 positive even integers. 1. Sum the first 10

Your task for this assignment is to use Microsoft Assembly (MASM) language to sum the first 10 positive even integers. 1. Sum the first 10 positive even integers using a loop. Use the MASM programming language. The program should begin by setting a general purpose register to zero for a sum and another general purpose register to zero for an integer counter. Execute a loop in the program 10 times, each time incrementing the integer counter and adding the counter to the sum, as discussed in class. 2. The program should produce no output. The contents of the register containing the sum of the integers will be examined using a debugger. 

I'm trying something like this but it's not working

.386 .model flat, stdcall .code main:

mov cx, 0 mov ax, 0

StartLoop: inc cx add ax, 2 add ax,cx cmp cx,10 loop StartLoop END main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!