Assembly Language

Using the Windows Starter Visual Studio project create the following two programs.

1. Write a program that will loop until the index is 5 using a For loop .

2. Write a program using a For loop that adds the number five to each value value of the array

 

Using the Windows Starter Visual Studio project create the following two programs.

1. Write a program that will loop three times and raise the number 25 to the third power.
(25*25*25) Note: Make sure you have a large enough memory for the final number

2. Write a program using a whileSum that adds one to the index until it is five.

Sample:

mov  sum, 0     ; sum := 0

        mov  ecx, 1     ; count := 1

whileA: cmp  sum, 1000  ; sum < 1000 ?

        jnl  endwhileA  ; exit if not

        add  sum, ecx   ; add count to sum

        inc  ecx        ; add 1 to count

        jmp  whileA     ; repeat

endwhileA:

 

moveax, nmbr
whileCount: cmpicount, 3
jnlendwhileCount
imuleax, 25
movrslt, eax
add icount, 1
jmpwhileCount
endwhileCount:

 

Last Updated on March 31, 2019

Don`t copy text!
Scroll to Top